Developer Setup
Set up the Draftly codebase locally for development or self-hosting.
Prerequisites
To run Draftly locally you need: - Node.js 18+ with npm or pnpm - A Firebase project (Firestore, Auth, Storage enabled) - API keys: Google Gemini, Fal.ai (optional), API-Easy (for Veo video and Nano Banana images) - A Dodo Payments account (for billing webhooks — optional for dev)
Clone & Install
bash
git clone https://github.com/draftly-space/draftly-client.git cd draftly-client npm install cp .env.example .env.local
Edit .env.local with your Firebase config and API keys, then run the dev server.
Environment Variables
| Variable | Description | Required |
|---|---|---|
GOOGLE_AI_KEY | Gemini API key for site HTML generation | Yes |
NEXT_PUBLIC_FIREBASE_* | Firebase client config (6 vars) | Yes |
FIREBASE_SERVICE_ACCOUNT | Firebase Admin SDK JSON (base64) | Yes |
FAL_KEY | Fal.ai — Seedream images, LTX video extend | For full media |
APIEASY_KEY | API-Easy — Veo 3.1 video, Nano Banana images | For video |
DODO_PAYMENTS_KEY | Dodo Payments billing webhook secret | For billing |
CLOUDFLARE_ZONE_ID | Cloudflare zone for CDN cache purge on publish | For CDN |
Run Development Server
bash
npm run dev
Open http://localhost:3000. The 3D builder is at http://localhost:3000/3d-builder.