Getting Started
Clone the template, install dependencies, boot the database, and run your first local instance.
Prerequisites
- Bun ≥ 1.0 — bun.sh
- Docker (for local Postgres + Redis via docker-compose)
- A GitHub account (you receive an invitation to
launchy-customers/launchy-templateafter purchase)
You can use pnpm or npm instead of Bun if you prefer — every bun command has an equivalent (pnpm dev, etc.).
1. Clone the repository
Accept the invitation, then clone:
git clone https://github.com/launchy-customers/launchy-template.git my-launch-site
cd my-launch-siteThe repo is private. You accepted the GitHub collaborator invitation in the email you got after checkout, so you're authenticated on GitHub already — the HTTPS clone will just work. If it prompts for credentials, sign in with your GitHub account (use a Personal Access Token as the password if you have 2FA enabled).
2. Install dependencies
bun install3. Start Postgres + Redis
The bundled docker-compose.yml runs both:
bun run db:start- Postgres on
localhost:5432 - Redis on
localhost:6379
Check they're running: docker ps.
4. Configure environment variables
Copy the example and fill in the minimum:
cp .env.example .envOpen .env and set at minimum:
DATABASE_URL=postgresql://launch-platform:launch-platform@localhost:5432/launch-platform
BETTER_AUTH_SECRET=<openssl rand -base64 32>
BETTER_AUTH_URL=http://localhost:3000
CRON_SECRET=<openssl rand -base64 32>CRON_SECRET protects your /api/cron/* routes. You'll use it locally to trigger the weekly batch in step First Steps.
All other env vars are optional — features degrade gracefully if missing. See Environment Variables for the full list.
5. Push the schema
bun run db:pushThis applies the Drizzle schema to your database (creates tables and indexes).
6. Run the setup script — it guides you
bun run setupThe script:
- Checks your prerequisites (bun, docker)
- Installs deps if needed
- Starts the database if it's not running
- Pushes the schema (idempotent)
- Seeds demo data
When it finishes, read its output carefully. It prints a 4-step walkthrough for everything that comes next: starting bun dev in a second terminal, signing up, promoting yourself to admin, and which optional services to wire up later. The steps below mirror what the script tells you.
7. Start the dev server (in a second terminal)
Keep the terminal where you ran setup open — verification links will print there. In a new terminal:
bun devOpen http://localhost:3000. The server uses Turbopack.
8. Create your admin account
- Click Sign up at the top of the site
- Register with any email + password
- Watch the
bun devterminal — without Plunk configured, the verification link prints there:[Email] Plunk not configured — verification link for [email protected]: http://localhost:3000/api/auth/verify-email?token=... - Copy that URL into your browser to verify
- Back in your other terminal:
bun run promote-admin [email protected] - Sign out and sign back in → the
/adminlink appears in the header
9. Open Drizzle Studio (optional)
Browse your database visually:
bun run db:studio10. Preview email templates (optional)
bun run email:devReact Email's dev server renders every template in emails/ with live reload.
Common bun run ... scripts
| Script | What |
|---|---|
dev | next dev --turbopack |
build | Next.js production build |
start | Production server (after build) |
lint | ESLint |
format | Prettier --write on **/*.{ts,tsx} |
typecheck | tsc --noEmit |
db:start / db:stop | docker-compose up / down |
db:push | Drizzle schema push (dev) |
db:generate | Generate versioned migrations |
db:migrate | Apply versioned migrations (prod) |
db:studio | Drizzle Studio UI |
db:reset | Docker volumes drop + recreate (destroys data) |
db:seed | Run lib/db/seed.ts |
email:dev | React Email preview server |
setup | Initial project setup script |
What to do next
- First steps — create your admin, rebrand, publish your first batch
- Project structure — understand the codebase layout
- Integrations overview — connect the services you actually need
Troubleshooting
DATABASE_URL connection refused — bun run db:start hasn't finished. Wait 5 seconds or check docker ps.
Port 5432 or 6379 already in use — Stop the other Postgres / Redis instance first, or edit docker-compose.yml to map to different ports.
Turbopack errors on first run — Usually resolved by rm -rf .next && bun dev once.
Signed up but can't sign in — "please verify your email" — requireEmailVerification: true is enabled by default. Without Plunk configured, the verification link is printed to your bun dev terminal:
[Email] Plunk not configured — verification link for [email protected]:
http://localhost:3000/api/auth/verify-email?token=...Copy-paste it into your browser to verify. For a permanent fix, configure Plunk (see Plunk integration).
Port 3000 already in use — Next auto-falls-back to 3001. Or kill the other process.