Production-ready API starter using Bun, Hono, Drizzle, and TypeScript.
- Runtime: Bun
- Framework: Hono
- Database: PostgreSQL + Drizzle ORM
- Validation: Zod
- Linting/Formatting: Biome
- Testing: Bun Test
- Bun >= 1.1
- PostgreSQL database
# Install dependencies
bun install
# Copy environment file and configure
cp .env.example .env
# Run database migrations
bun run db:migratebun run dev # Start dev server with hot reloadbun run test # Run all tests
bun run test:watch # Run tests in watch modebun run lint # Check for lint errors
bun run lint:fix # Fix lint errors
bun run format # Format codebun run build # Build for production
bun run start # Run production serverbun run db:generate # Generate migrations from schema
bun run db:migrate # Run migrations
bun run db:push # Push schema directly (dev only)
bun run db:studio # Open Drizzle Studiosrc/
├── index.ts # Application entry point
├── routes/ # Route handlers
├── services/ # Business logic
├── schemas/ # Zod validation schemas
├── lib/ # Shared utilities
└── db/ # Database schema
tests/ # Test files
docs/ # Documentation
drizzle/ # Database migrations
| Method | Path | Description |
|---|---|---|
| GET | /health | Health check |
MIT