A modern starter template for building authenticated user profile management apps with Next.js 15+, Supabase, TypeScript, Tailwind and Zod.
- Next.js 15, for the frontend
- Supabase, for the backend
- TypeScript, for type safety
- Tailwind CSS, for styling
- Zod, for validation
- Full authentication
- User signup
- with password (uses server action)
- with magic link (uses server route)
- User login
- with password (uses server action)
- with magic link (uses server route)
- Email verification (uses server route)
- Password recovery (uses server route)
- Password change (uses server action)
- User signup
- User profile management (username, full name, avatar, website)
- Protected routes via middleware (anything under
/profilerequires authentication) - Zod validation and robust error handling
-
Install dependencies:
yarn install # or npm install # or pnpm install # or bun install
-
Create an initialize your Supabase project:
- Go to Supabase
- Create a new project
- Run the migration file present in the
supabase/migrationsdirectory using theSQL Editor
-
Create your environment file:
Copy the following template into a new file called
.env.localin the root of your project, and fill in your Supabase credentials:NEXT_PUBLIC_SUPABASE_URL=your-supabase-project-url NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key NEXT_PUBLIC_SITE_URL=your-site-url
NEXT_PUBLIC_SUPABASE_URL: The URL of your Supabase project (from the Supabase dashboard, under Project Settings > Data API)NEXT_PUBLIC_SUPABASE_ANON_KEY: The public anon key for client-side access (from the Supabase dashboard, under Project Settings > API Keys)NEXT_PUBLIC_SITE_URL: The URL of your site for redirecting after authentication (e.g.https://localhost:3000for local development)
-
Run the development server:
yarn dev # or npm run dev # or pnpm dev # or bun dev