Production-grade Next.js 15 starter for shipping AI SaaS that stays maintainable: spec-driven workflows, typed integrations, and batteries-included tooling from auth to observability.
⭐️ Star the repo, then clone it and start building.
- Spec-driven development keeps AI agents aligned and kills rework.
- Multi-provider AI playgrounds stream results with typed, structured output.
- Better Auth, Drizzle, and Neon give you secure login, sessions, and migrations on day one.
- Resend emails, R2 file uploads, Stripe payments, and background jobs are wired for real customer flows.
- Langfuse, Pino, Umami, and Vitest ensure you monitor, log, and test before launch.
- Next.js 16 App Router, TypeScript, Tailwind, and shadcn/ui components.
- Vercel AI SDK preconfigured for OpenAI, Anthropic, Google Gemini, and Claude Code MCP.
- Modular services with dependency injection plus Drizzle ORM schemas and seeds.
- Spec-first QA with Gherkin, Vitest unit/integration suites, Playwright, and Supertest templates.
- Documentation hub covering AI patterns, authentication, database, testing, and analytics.
git clone https://github.com/XamHans/fullstack-ai-starter.git && cd fullstack-ai-starter- Install dependencies:
pnpm install(ornpm installif you prefer). cp .env.example .env.localand add database, AI provider, auth, storage, and analytics keys.- Prime the database:
pnpm db:generate && pnpm db:migrate. - Run the app:
pnpm devand visithttp://localhost:3000. - Docs are available via
pnpm docsor by reading the.mdxfiles indocs/.
Get started with Stripe Checkout in minutes:
- Get API keys from Stripe Dashboard
- Add to
.env.local:STRIPE_SECRET_KEY="sk_test_..." NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..." STRIPE_WEBHOOK_SECRET="whsec_..."
- Setup webhook (local dev):
stripe listen --forward-to http://localhost:3000/api/payments/webhook
- Run migrations:
pnpm db:migrate
See Payment Integration Guide for full details.
- Leave
originpointing at your fork and add this starter as anupstreamremote:git remote add upstream https://github.com/our-org/starter-kit.git. - Do feature work on branches off your
main, then sync with the starter by fetching and rebasing (or merging):git fetch upstream && git rebase upstream/main. - Resolve conflicts locally, run your test suite, then push back to your repo:
git push origin main(or the feature branch you are updating). - If you used the GitHub template flow, the “Sync fork” button performs the fetch/merge for you—just pull those changes into your local clone afterward.
- Keep notes on tweaks you reapply each update so future merges stay quick; try the flow on a scratch branch first if you want a dry run.
- Deployment, auth, database, and AI guides live in
docs/*.mdx. - Testing patterns and DI examples:
docs/testing.mdx. - Observability and analytics setup:
docs/observability.mdxanddocs/umami-analytics.mdx.