Initial Setup
Complete this checklist before launching the platform.
1. Clone and install
git clone <repo-url> agents.megabyteisland.com
cd agents.megabyteisland.com
npm run install-all 2. Create the .env file
Copy the example and fill in every value:
cp .env.example .env Required variables
| Variable | How to get it |
|---|---|
AI_PLATFORM_TOKEN | AI Platform → API → Personal Access Tokens → Generate Token (read+write) |
STRIPE_SECRET | Stripe Dashboard → Developers → API keys → Secret key |
STRIPE_WEBHOOK_SECRET | Created when you register the webhook (see Stripe Setup) |
STRIPE_PRICE_WHATSAPP | Price ID from your Stripe product for WhatsApp agents |
STRIPE_PRICE_WEB | Price ID from your Stripe product for Web Lead agents |
STRIPE_PRICE_BRAIN | Price ID from your Stripe product for Brain agents |
DATABASE_URL | postgresql://user:pass@host:5432/gaas |
ENCRYPTION_KEY | openssl rand -hex 32 — 32 bytes = 64 hex chars |
JWT_SECRET | openssl rand -hex 64 — 64 bytes = 128 hex chars |
FRONTEND_URL | Public URL of the frontend (e.g., https://agents.megabyteisland.com) |
Security: Never commit
.envto version control. Add it to.gitignoreimmediately.
3. Create the PostgreSQL database
createdb gaas
psql gaas -f backend/src/db/schema.sql Verify tables exist:
psql gaas -c "dt"
# users, subscriptions, agents 4. Start the servers
Development:
npm run dev
# Frontend: http://localhost:5173
# Backend: http://localhost:3001 Production: See Deployment.
5. Verify health
curl http://localhost:3001/health Expected: {"status":"ok","service":"megabyte-island-backend","ts":"..."}
6. Register the Stripe webhook
See Stripe Configuration — the STRIPE_WEBHOOK_SECRET cannot be obtained until the webhook is registered.