Auth + API Starter

A clean full-stack starter for MVPs: auth, protected routes, and production-ready API patterns.

Next.jsJWTRESThttpOnly cookiesProtected routes
Open source

What you get

A real starter that you can extend without rewriting everything.

Features
  • • JWT auth + protected routes (client + server)
  • • Clean API structure (route handlers + shared server libs)
  • • Consistent error shape + safe defaults
  • • Env-first configuration (local/preview/prod)
  • • Ready for Vercel deployment

Folder structure

App Router layout that stays clean as your project grows.

Structure
/src
  /app
    /api
      /auth
        /register/route.ts
        /login/route.ts
        /me/route.ts
        /logout/route.ts
    /projects/auth-starter/page.tsx
    /dashboard/page.tsx
  /lib
    auth.ts
    db.ts
  /models
    User.ts
Want it as a monorepo later? Easy: split backend into a separate app.