Prerequisites
Before you begin, make sure you have the following installed:| Requirement | Minimum Version | Installation |
|---|---|---|
| Bun | 1.1.0+ | bun.sh |
| Redis | 7.0+ | redis.io/docs/install |
- Stripe - Payment processing (test mode works without a paid account)
- Turso - Cloud database (optional for local development)
For local development, BunShip uses a file-based SQLite database by default. You only need Turso
for cloud/production deployments.
Setup
Install dependencies
BunShip is a monorepo managed with Bun workspaces and Turborepo. A single install pulls in
all packages: the API, database layer, email templates, config, utilities, and the Eden
type-safe client.This also creates a
.env file from .env.example with working defaults for local development.Generate JWT secrets (recommended)
The auto-generated Open See the Installation guide for a full breakdown of
every environment variable.
.env includes placeholder secrets that work for development, but you
should replace them with random values — especially before deploying anywhere.Generate two separate secrets and paste them into your .env:- openssl
- Bun
.env and replace the placeholder values:Set up the database
Run migrations to create all tables, then optionally seed demo data:If you ran the seed command, you can log in with:
Start the development server
Verify It Works
Once the server is running, confirm everything is healthy:- Health check
- API documentation
- Test login
Project Structure
Here is how the monorepo is organized:Common Scripts
| Command | Description |
|---|---|
bun dev | Start the API in development mode with file watching |
bun dev:all | Start all apps (API + docs) via Turborepo |
bun run db:generate | Generate a migration from schema changes |
bun run db:migrate | Apply pending migrations |
bun run db:seed | Seed demo data |
bun run db:studio | Open Drizzle Studio (visual database browser) |
bun test | Run all tests |
bun run build | Build all packages for production |
What’s Next
Installation
Full environment configuration including Stripe, email, S3 storage, and OAuth providers
Architecture
Understand how BunShip organizes routes, services, and middleware
Authentication
JWT tokens, 2FA, magic links, and OAuth flows
API Reference
Interactive documentation for every endpoint

