> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bunship.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Clone, install, configure, and run BunShip Pro locally.

# Getting Started

This guide walks you through getting BunShip Pro running on your machine.

## Prerequisites

| Requirement                   | Minimum Version | Notes                                              |
| ----------------------------- | --------------- | -------------------------------------------------- |
| [Bun](https://bun.sh)         | 1.1+            | Runtime and package manager                        |
| [Node.js](https://nodejs.org) | 18+             | Used by Vite dev server for the frontend (SSR/HMR) |

<Note>
  The API runs on Bun natively. The frontend dev server uses Node via Vite/TanStack Start for
  SSR and hot module replacement. In production builds, the output can be served by Bun.
  Redis is optional — only needed for background jobs (email sending, webhook delivery).
</Note>

## 1. Clone and Install

```bash theme={null}
git clone <your-repo-url> bunship-pro
cd bunship-pro
bun install
```

This installs all dependencies across the monorepo — API, frontend, and all shared packages.

## 2. Configure Environment

```bash theme={null}
cp .env.example .env
```

Open `.env` and set these required values:

| Variable             | What to Set                                                |
| -------------------- | ---------------------------------------------------------- |
| `JWT_SECRET`         | Any random string, 32+ characters                          |
| `JWT_REFRESH_SECRET` | A different random string, 32+ characters                  |
| `ENCRYPTION_SECRET`  | A third random string, 32+ characters (for 2FA encryption) |
| `TURSO_DATABASE_URL` | `file:./local.db` (already set — uses local SQLite)        |

Generate random secrets:

```bash theme={null}
openssl rand -hex 32
```

Everything else has sensible defaults for local development. Stripe, email, and file uploads are optional — the app runs without them.

<Tip>
  Set `DEMO_MODE=true` in `.env` to skip Stripe entirely. Email logs to the console when
  `RESEND_API_KEY` is not set.
</Tip>

## 3. Set Up the Database

```bash theme={null}
# Run migrations to create all tables
bun run db:migrate

# Seed demo data (creates a user, org, and sample data)
bun run db:seed
```

## 4. Start Development

```bash theme={null}
bun dev:all
```

This starts both the API and frontend in parallel:

| Service      | URL                                                      |
| ------------ | -------------------------------------------------------- |
| **Frontend** | [http://localhost:3001](http://localhost:3001)           |
| **API**      | [http://localhost:3000](http://localhost:3000)           |
| **API Docs** | [http://localhost:3000/docs](http://localhost:3000/docs) |

To run them separately:

```bash theme={null}
# API only
cd apps/api && bun run dev

# Frontend only
cd apps/web && bun run dev
```

## 5. Log In

Open [http://localhost:3001](http://localhost:3001) and sign in with the demo account:

```
Email:    demo@bunship.com
Password: demo123456
```

You'll land on the dashboard with a pre-created organization and sample data.

## What You're Looking At

BunShip Pro has three areas:

1. **Marketing site** — The landing page, pricing, blog, and other public pages at the root URL
2. **Auth pages** — Login, register, forgot password, etc. at `/login`, `/register`
3. **Dashboard** — The authenticated app at `/dashboard`, `/organizations`, `/settings`, `/admin`

The sidebar on the left navigates between dashboard sections. The top-right has the theme toggle and user menu.

## Common Tasks

| Task                         | Command                       |
| ---------------------------- | ----------------------------- |
| Reset the database           | `bun run db:reset`            |
| Open Drizzle Studio (DB GUI) | `bun run db:studio`           |
| Run API tests                | `cd apps/api && bun run test` |
| Type-check everything        | `bun run typecheck`           |
| Build everything             | `bun run build`               |
| Lint everything              | `bun run lint`                |
| Format code                  | `bun run format`              |

## Next Steps

* [Pre-Built Pages](/pro/pages) — See what every page looks like and does
* [Theming & Branding](/pro/theming) — Change the brand color, fonts, and logos
* [Configuration](/pro/configuration) — All environment variables and feature flags
