A modern, type-safe, and high-performance SaaS starter template built with a monorepo architecture.
- π Documentation: For comprehensive documentation, visit https://zerostarter.dev/docs.
- π€ AI/LLM Users: For optimized documentation, use https://zerostarter.dev/llms.txt.
- π¦ X: Follow @nrjdalal for updates and don't forget to star the repository!
Important
ZeroStarter is currently in Release Candidate (RC) status. All implemented features are stable and production-ready. We're actively adding new features and integrations day-by-day.
Note
For detailed information about the architecture and tech stack, see the Architecture documentation.
- Runtime & Build System: Bun + Turborepo
- Frontend: Next.js 16
- Backend: Hono
- RPC: Hono Client for end-to-end type safety with frontend client
- Database: PostgreSQL with Drizzle ORM
- Authentication: Better Auth
- Analytics: PostHog for product analytics, feature flags, and session recordings
- Styling: Tailwind CSS
- UI Components: Shadcn UI
- Data Fetching: TanStack Query
- Validation: Zod
- Bundling, Linting & Formatting: tsdown, Oxlint and Oxfmt
- API Documentation: Scalar with auto-generated OpenAPI spec at
/api/docs - Documentation: Fumadocs with auto-generated llms.txt
- Automated Releases: Automatically updated Changelog on release
This project is a monorepo organized as follows:
.
βββ api/
β βββ hono/ # Backend API server (Hono)
βββ web/
β βββ next/ # Frontend application (Next.js)
βββ packages/
βββ auth/ # Shared authentication logic (Better Auth)
βββ db/ # Database schema and Drizzle configuration
βββ env/ # Type-safe environment variables
βββ tsconfig/ # Shared TypeScript configuration
π View full architecture β
We're actively working on integrations for AI, analytics, background tasks, email, payments, and more.
π View detailed roadmap β
Architecture & Best Practices as a Service β ZeroStarter isn't just a starter template, it's a complete blueprint for building production-ready SaaS applications with battle-tested patterns and practices.
- Modular Architecture β Clean, plug-and-play packages that work independently or together. Swap components, extend functionality, or customize without breaking the system
- End-to-End Type Safety β Hono RPC ensures type safety from database to frontend. Catch errors at compile time, ship with confidence
- Clean Code Practices β Well-structured monorepo with separation of concerns, making it easy to understand, maintain, and scale
- Production-Ready Performance β Optimized with Bun runtime and Turborepo for blazing-fast development and builds
- Beautiful UI Out of the Box β Shadcn UI components with Tailwind CSS, ready to customize or use as-is
- Enterprise-Grade Auth β Better Auth integration with GitHub, Google, and more β fully configured and ready to extend
- Comprehensive Documentation β Every pattern, practice, and decision documented with Fumadocs and AI-optimized llms.txt
- Deploy-Ready β Docker and Vercel configurations included, so you can ship to production in minutes, not days
π View full why ZeroStarter? β
Note
For comprehensive details and examples, see the Type-Safe API documentation.
This starter utilizes Hono RPC to provide end-to-end type safety between the backend and frontend.
- Backend: Routes defined in
api/hono/src/routersare exported asAppTypeatapi/hono/src/index.ts. - Frontend: The client at
web/next/src/lib/api/client.tsinfersAppTyperequest/response types usinghono/client. - API Docs: Interactive API documentation available at
/api/docspowered by Scalar.
import { apiClient } from "@/lib/api/client"
// Fully typed request and response
const res = await apiClient.health.$get()
const { data } = await res.json()π Type-Safe API documentationβ
# Clone the template
bunx gitpick https://github.com/nrjdalal/zerostarter/tree/main
cd zerostarter
# Install dependencies
bun install
# Set up environment variables (see docs)
cp .env.example .env
# Set up database
bun run db:generate
bun run db:migrate
# Start development
bun devπ Complete installation guide β
- π Full Documentation β Everything you need to know
- ποΈ Architecture β Deep dive into the tech stack
- π Project Structure β Monorepo organization
- π Type-Safe API β Hono RPC client examples
- βοΈ Scripts β Available commands
- π Deployment β Deploy to production
- π€ AI/LLM Users β Optimized documentation
Contributions are welcome! Please read our contributing guidelines first.
π View contributing guidelines β
MIT License β see LICENSE.md for details.
β Star this repo if you find it helpful, and follow @nrjdalal for updates!