Getting Started
Prerequisites
Section titled “Prerequisites”- Node.js 22+ (required by engine specification)
- npm (comes with Node.js)
- PostgreSQL 16 (for local development)
- Can use Docker Compose (recommended)
- Or a local PostgreSQL installation
- Cloudflare account (optional, needed for Pages/R2 features)
Quick Start
Section titled “Quick Start”# Clone and installcd platformnpm install
# Copy environment templatecp .env.example .env
# Start PostgreSQL + Directus + app (main branch)docker compose up -d
# Run database migrationsnpm run db:migrate
# Start dev servernpm run devThe dev server starts on http://localhost:4321.
Using Docker Compose
Section titled “Using Docker Compose”The docker-compose.yml provides:
db— PostgreSQL 16 (port 5432)migrations— Run schema migrations (one-shot)directus— Directus CMS admin (port 8055) —mainonlyschema-setup— Configure Directus schema (one-shot) —mainonlyapp— The Astro application (port 4321)
Environment Variables
Section titled “Environment Variables”Key variables for local development:
| Variable | Default | Notes |
|---|---|---|
DATABASE_URL | postgresql://convertella:@localhost:5432/convertella | Local DB connection |
AUTH_SECRET | (required) | Generate with openssl rand -hex 32 |
RESEND_API_KEY | (required for OTP) | Resend API key |
See Environment Variables for the full list.
Working with the spike/cf-runtime Branch
Section titled “Working with the spike/cf-runtime Branch”The spike/cf-runtime branch requires a different setup since it targets Cloudflare Workers:
git checkout spike/cf-runtimenpm installcp .env.example .env# Edit .env with Neon connection string (DATABASE_URL)npm run db:migratenpm run devNote: On spike/cf-runtime, npm run dev uses Astro’s dev server (not the Cloudflare adapter). Full Cloudflare Pages simulation requires npm run dev:wrangler.