Quickstart

Get your TurboStack project running locally in just a few steps.
One-click deploy available! Skip the local setup and deploy directly to Vercel with a single click.
Deploy with Vercel

Prerequisites

Bun 1.1+

Fast JavaScript runtime and package manager

Node.js 18+

Required for some development tools
# Install Bun with Homebrew
brew install oven-sh/bun/bun

# Or with curl
curl -fsSL https://bun.sh/install | bash

Installation

1

Clone the Repository

git clone https://github.com/musayazlik/turbostack.git
cd turbostack
2

Install Dependencies

bash bun install
Bun installs dependencies significantly faster than npm or yarn!
3

Configure Environment

Copy the example environment file:
cp .env.example .env
Update the .env file with your configuration:
# Database (PostgreSQL)
DATABASE_URL="postgresql://user:password@localhost:5432/turbostack"

# Security Keys (change in production!)
JWT_SECRET="your-super-secret-jwt-key-min-32-characters"
SESSION_SECRET="another-super-secret-session-key"

# App URLs
FRONTEND_URL="http://localhost:4100"
NEXT_PUBLIC_API_URL="http://localhost:4101"
NODE_ENV="development"
4

Setup Database

Push the Prisma schema to your database:
bun run db:push
Start PostgreSQL with Docker:
docker run -d \
  --name turbostack-postgres \
  -e POSTGRES_PASSWORD=postgres \
  -e POSTGRES_DB=turbostack \
  -p 5432:5432 \
  postgres:16
Then use this connection string:
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/turbostack"
5

Start Development Server

bun run dev
All services will start automatically with Turborepo!

Access Your Apps

Once the development server is running:
ApplicationURLDescription
🖥️ Weblocalhost:4100Next.js frontend
APIlocalhost:4101Elysia.js backend
📚 Swaggerlocalhost:4101/openapiAPI documentation
📖 Docslocalhost:4102This documentation

Useful Commands

Development

bun run dev       # Start all apps
bun run dev:web   # Start only web
bun run dev:api   # Start only API

Database

bun run db:push    # Push schema
bun run db:studio  # Prisma Studio
bun run db:migrate # Run migrations

Build & Test

bun run build # Build all
bun run test  # Run tests
bun run lint  # Lint code

Type Check

bun run check-types # Type check all

Troubleshooting

If you see EADDRINUSE error:
# Find process using the port
lsof -i :4100

# Kill the process
kill -9 <PID>
  1. Make sure PostgreSQL is running
  2. Check your DATABASE_URL in .env
  3. Ensure the database exists:
createdb turbostack
If you see Prisma errors, regenerate the client:
bun run db:generate
Try reinstalling Bun:
curl -fsSL https://bun.sh/install | bash
source ~/.bashrc  # or ~/.zshrc

Next Steps

Pro tip: Start by registering a user, verifying the email, and exploring the admin dashboard to see all features in action!