Prerequisites
Before installing ZeroStarter, ensure you have the following installed:- Bun - v1.3.7 or later (Install Bun)
- PostgreSQL - A PostgreSQL database instance
- Git - For cloning the repository
Installation Steps
# App URLs
HONO_APP_URL=http://localhost:4000
HONO_TRUSTED_ORIGINS=http://localhost:3000
# Rate Limiting
HONO_RATE_LIMIT=60
HONO_RATE_LIMIT_WINDOW_MS=60000
# Authentication Secret (generate using: openssl rand -base64 32)
BETTER_AUTH_SECRET=your_secret_here
# Database (generate using: bunx pglaunch -k)
POSTGRES_URL=postgresql://user:password@localhost:5432/database
GitHub OAuth Setup
To enable GitHub authentication:
- Go to GitHub Developer Settings
- Create a new OAuth App
- Set Authorization callback URL to:
http://localhost:3000/api/auth/callback/github - Add the credentials to your
.env:
Google OAuth Setup
To enable Google authentication:
- Go to Google Cloud Console
- Create a new OAuth 2.0 Client ID
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Add the credentials to your
.env:
Verify Installation
To verify everything is set up correctly, start the development server:- Frontend at
http://localhost:3000 - Backend API at
http://localhost:4000 - API Documentation at
http://localhost:4000/api/docs
Common Issues
Database connection errors
Database connection errors
If you encounter database connection issues:
- Verify your
POSTGRES_URLis correct - Ensure PostgreSQL is running
- Check that the database exists
- Verify network connectivity to the database
Port already in use
Port already in use
If ports 3000 or 4000 are already in use, you can:
- Stop the process using the port
- Or modify the ports in your
.envfile:
Bun version mismatch
Bun version mismatch
ZeroStarter requires Bun v1.3.7 or later. Update Bun:Or install a specific version:
Next Steps
Quick Start
Follow the quick start guide to build your first feature
Architecture
Learn about ZeroStarter’s architecture and tech stack
Project Structure
Explore the monorepo structure and organization
Type-Safe API
Understand end-to-end type safety with Hono RPC