How kleneway/next-ai-starter works
Project type and purpose
• This is a full-stack Next.js 14 “Modern Stack” web application template optimized for AI-driven development.
• It provides an App-Router-based React frontend, serverless API routes (tRPC + Next.js handlers), a Prisma/Supabase Postgres database, background jobs (Inngest), and integrations with AI providers, email (Resend), and AWS S3 storage.
File structure
• Top-level:
• Configuration: next.config.ts, tsconfig.json, postcss.config.mjs, tailwind.config.ts, vercel.json
• CI / scripts: scripts/init.sh
• Infrastructure: prisma/schema.prisma, .env.example
• Storybook: .storybook/
• src/app – Next.js App Router pages & API endpoints
• /api/auth – NextAuth routes
• /api/trpc – tRPC endpoint
• /api/inngest, /api/transcribe, /api/upload – custom serverless handlers
• /auth, /layout.tsx, /page.tsx – React page structure
• src/components – reusable UI (Button, Toasts, SpeechToTextArea)
• src/lib – domain logic & integrations
• /api – server tRPC routers
• /auth – NextAuth helpers
• /db.ts – Prisma client
• /email – Resend integration
• /inngest.ts – Inngest client config
• /storage.ts – AWS S3 helper
• /trpc – client & server setup
• /utils, /zod – shared utilities & validation
• Other: public/ (static assets), screenshots/, stories/ (Storybook stories)
Extract additional insights from README
• Key patterns:
• App Router (file-based routing for pages and API)
• End-to-end typesafe tRPC
• Prisma ORM with Supabase Postgres
• NextAuth for authentication (adapter via Prisma)
• Inngest for event-driven background jobs
• Modular AI client abstraction (OpenAI, Anthropic, etc.)
• Deployment target: Vercel with environment variables.