This is a super simple starter template using Next.js 15, tRPC, Supabase Auth, and Tailwind CSS. It’s meant to be a clean base with the basics set up — auth, route protection, and type-safe APIs.
Nothing fancy, just a solid starting point so you can jump straight into building and add whatever packages or features you need.
git clone https://github.com/yourusername/nextjs-15-app-router-supabase-auth-template.git
cd nextjs-15-app-router-supabase-auth-template
npm install
# or
yarn install
Copy the example environment file and update it with your Supabase credentials:
cp .env.local.example .env.local
Update the following variables in .env.local
:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
├── app/ # Next.js app directory
│ ├── (protected)/ # Protected routes
│ ├── api/ # API routes
│ ├── auth/ # Auth callback routes
│ ├── error/ # Error handling
│ ├── login/ # Login page
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # React components
├── public/ # Static assets
├── supabase/ # Supabase client configuration
├── trpc/ # tRPC configuration and routers
├── middleware.ts # Next.js middleware for auth
└── next.config.ts # Next.js configuration
npm run dev
- Start development servernpm run build
- Build for productionnpm run start
- Start production servernpm run lint
- Run ESLintnpm run type-check
- Run TypeScript type checking