Skip to main content

Version Reference

This page provides a comprehensive list of recommended versions for all tools and libraries used in the Next.js TS Tailwind Supabase Starter template.

Core Framework and Libraries

TechnologyRecommended VersionNotes
Next.js14.2.xIntroduces the stable App Router, improved server components, and Turbopack improvements
React18.3.xIncludes concurrent rendering, automatic batching, and Suspense improvements
TypeScript5.4.xIncludes decorators, type-only imports, and the satisfies operator
TailwindCSS3.3.xJIT compilation by default, arbitrary values, and better dark mode support

Development Tools

ToolRecommended VersionNotes
ESLint8.xBest compatible with modern TypeScript and React
Prettier3.xImproved performance and better handling of TypeScript
Jest29.xBetter TypeScript support and improved performance
React Testing Library14.xCompatible with React 18
Playwright1.40+Reliable end-to-end testing across browsers

Backend and Data Management

TechnologyRecommended VersionNotes
Supabase2.xStable APIs for auth, database, and storage
@supabase/supabase-js2.xClient library with TypeScript support
PostgreSQL15.xUsed by Supabase under the hood

Form Management and Validation

LibraryRecommended VersionNotes
Zod3.xTypeScript-first schema validation
React Hook Form7.xPerformant form management for React

UI Components and Styling

LibraryRecommended VersionNotes
shadcn/uiLatest as of Oct 2024Reusable components built on Radix UI
Radix UI1.xAccessible component primitives
Lucide React0.263.xSVG icon components

Data Fetching and State Management

LibraryRecommended VersionNotes
TanStack Query (React Query)5.xData fetching and caching
Zustand4.xLightweight state management

Utility Libraries

LibraryRecommended VersionNotes
date-fns2.xModern JavaScript date utility library
clsx2.xUtility for constructing className strings
lodash4.xUtility library for common operations

Authentication Features in Supabase

Supabase 2.x offers the following authentication methods:

  1. Email/password authentication
  2. Magic link authentication
  3. OAuth providers (Google, GitHub, etc.)
  4. Phone authentication
  5. Anonymous sessions
  6. Row Level Security (RLS) policies

Realtime Features in Supabase

Supabase 2.x Realtime includes:

  1. Broadcast - Simple pub/sub messaging
  2. Presence - Track online users and their states
  3. Postgres Changes - Subscribe to database changes

Special Considerations

  1. Next.js App Router: The App Router in Next.js 14 uses a different folder structure than the Pages Router. All routes should be placed in the app/ directory.

  2. React Server Components: Next.js 14 uses React Server Components by default. Client components should be marked with "use client" directive.

  3. TypeScript Configuration: Configure TypeScript for strict mode to take advantage of all type-checking features.

  4. Supabase Authentication: Configure proper session handling and refresh mechanisms.

  5. Edge Functions: Supabase provides Edge Functions for serverless logic if needed.

  6. Shadcn/UI: These are not installed as a dependency but copied into your project. Follow their documentation for installation.

Environment Variables

For Next.js 14 and Supabase 2.x, the following environment variables are recommended:

# Next.js
NEXT_PUBLIC_APP_URL=http://localhost:3000

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# Optional for email services
EMAIL_SERVER_HOST=smtp.example.com
EMAIL_SERVER_PORT=587
EMAIL_SERVER_USER=example_username
EMAIL_SERVER_PASSWORD=example_password

Version Compatibility Matrix

Next.jsReactTypeScriptTailwindCSSSupabase Client
14.0.x18.2.x5.2.x-5.3.x3.3.x2.x
13.x18.2.x5.1.x-5.2.x3.3.x2.x
12.x18.1.x4.9.x-5.0.x3.0.x-3.2.x2.x

Upgrading Dependencies

When upgrading dependencies, take these steps:

  1. Check the changelog of each package for breaking changes
  2. Run tests after each major upgrade
  3. Update TypeScript types if necessary
  4. Test authentication flows after upgrading Supabase
  5. Follow the Next.js migration guide when upgrading major versions