Quick Start
Get ZeroStarter running on your local machine in just a few minutes. This guide will walk you through cloning the template, installing dependencies, and starting the development servers.Prerequisites
Before you begin, make sure you have:- Bun v1.3.7 or higher installed
- PostgreSQL database (local or remote)
- Git for version control
ZeroStarter uses Bun as its primary runtime and package manager. If you haven’t installed Bun yet, run:
Step 1: Clone the Template
Usegitpick to clone ZeroStarter without the git history:
Step 2: Install Dependencies
Install all workspace dependencies using Bun:Step 3: Set Up Environment Variables
Copy the example environment file and configure your variables:.env and configure the essential variables:
Step 4: Set Up the Database
Generate and run database migrations:- Build the environment package
- Generate Drizzle ORM migrations from your schema
- Apply migrations to your database
You can explore your database using Drizzle Studio:This opens a web interface at
https://local.drizzle.studioStep 5: Start Development Servers
Start all development servers with a single command:- Build shared packages (auth, db, env)
- Start the Hono API server on
http://localhost:4000 - Start the Next.js frontend on
http://localhost:3000 - Enable hot reloading for all packages
Step 6: Verify Installation
Open your browser and verify everything is working:Check Frontend
Visit http://localhost:3000 to see the Next.js application.
Check API
Explore API Docs
Visit http://localhost:4000/api/docs to see the interactive API documentation powered by Scalar.
What’s Next?
Explore the Architecture
Learn about the tech stack and monorepo structure.
Detailed Installation
Configure OAuth providers, analytics, and other integrations.
Type-Safe API
Learn how to use Hono RPC for end-to-end type safety.
Project Structure
Understand how the monorepo is organized.
Common Commands
Here are the most frequently used commands:| Command | Description |
|---|---|
bun dev | Start all development servers |
bun build | Build all packages and applications |
bun run db:generate | Generate database migrations |
bun run db:migrate | Run database migrations |
bun run db:studio | Open Drizzle Studio |
bun run lint | Lint all packages |
bun run format | Format code with Oxfmt |
bun run check-types | Type-check all packages |
Troubleshooting
Port already in use
Port already in use
If ports 3000 or 4000 are already in use, you can change them:
- Frontend: Edit
web/next/package.jsonand modify thedevscript - Backend: Change
HONO_PORTin your environment variables
Database connection failed
Database connection failed
Verify your
POSTGRES_URL is correct and the database is running:Module not found errors
Module not found errors
Clean and reinstall dependencies:
Need Help?
If you encounter any issues:- Check the Installation guide for detailed setup instructions
- Review the Architecture to understand the system design
- Visit the GitHub repository to open an issue
- Follow @nrjdalal for updates and tips