Deployment Options
Vercel
Deploy to Vercel with zero configuration for both Next.js and Hono API
Docker
Containerized deployment with Docker and Docker Compose
Architecture Overview
ZeroStarter is built as a monorepo with two main services:- Next.js Frontend (
web/next) - React application running on port 3000 - Hono API Backend (
api/hono) - API server running on port 4000
@packages/auth- Authentication logic using Better Auth@packages/db- Database schema and queries using Drizzle ORM@packages/env- Environment variable validation
Build System
The project uses Turborepo for efficient builds:Build Commands
Environment Variables
Both deployment methods require proper environment configuration. See the Production Checklist for detailed environment setup.Required Variables
Server Variables
Server Variables
NODE_ENV- Set toproductionBETTER_AUTH_SECRET- Generate usingopenssl rand -base64 32POSTGRES_URL- PostgreSQL connection stringHONO_APP_URL- Your API URLHONO_TRUSTED_ORIGINS- Comma-separated list of allowed origins
Client Variables
Client Variables
NEXT_PUBLIC_APP_URL- Your application URLNEXT_PUBLIC_API_URL- Your API URL
OAuth Providers (Optional)
OAuth Providers (Optional)
GITHUB_CLIENT_ID- GitHub OAuth app IDGITHUB_CLIENT_SECRET- GitHub OAuth secretGOOGLE_CLIENT_ID- Google OAuth client IDGOOGLE_CLIENT_SECRET- Google OAuth secret
Database Setup
Before deploying, ensure your database is set up:Choosing a Deployment Method
Use Vercel if you want:
- Fastest time to deployment
- Automatic preview deployments for PRs
- Built-in CI/CD
- Serverless architecture
- Easy scaling without infrastructure management
Use Docker if you want:
- Full control over infrastructure
- Self-hosted deployment
- Consistent environments across dev/staging/production
- Traditional server-based architecture
- Custom networking and security configurations
Next Steps
Vercel Deployment
Step-by-step guide for deploying to Vercel
Docker Deployment
Containerized deployment guide
Production Checklist
Essential production readiness checklist