Skip to content

Latest commit

 

History

History
73 lines (59 loc) · 1.49 KB

File metadata and controls

73 lines (59 loc) · 1.49 KB

⚙️ Setup & Installation Guide

Follow these steps to get your own instance of the Waitlist Monorepo running locally and in production.

📋 Prerequisites

  • Bun: This project uses Bun for package management and script execution. Install Bun.
  • Cloudflare Account: Required for D1 Database and Worker/Pages deployment.
  • Wrangler: Installed as a dev dependency, but ensure you are logged in:
    bunx wrangler login

🛠️ Step-by-Step Installation

1. Clone & Install

git clone <your-repo-url>
cd waitlist
bun install

2. Database Setup (API)

Navigate to the API app and initialize your local database:

cd apps/api
# Generate migrations
bun run db:generate
# Push to local D1 instance
bun run db:push

3. Environment Variables

Create .env files for both applications:

apps/api/.env:

WAITLIST_WEB_URL=http://localhost:3000
# Add your email service credentials if using one

apps/web/.env:

NEXT_PUBLIC_API_URL=http://localhost:8787

4. Running Locally

From the root directory:

bun dev

🚀 Deployment

API (Cloudflare Workers)

cd apps/api
bun run deploy

Frontend (Cloudflare Pages)

cd apps/web
bun run deploy

🧹 Linting & Formatting

We use Biome for consistent code quality across the monorepo:

bun run format