Environments & Hostnames¶
Per-component environments¶
| Environment | Website | App | Platform | AI | Blog / CMS |
|---|---|---|---|---|---|
| Production | https://swapps.com |
https://app.swapps.com |
https://swapps-worker.swapps.workers.dev |
https://swapps.com/api/ai/* |
https://swapps.com/wp-* (Pantheon) |
| Preview | https://{alias}-swapps-client.swapps.workers.dev |
idk-<build_tag> (Argo CD) |
https://{alias}-swapps-worker.swapps.workers.dev |
— | Pantheon dev / multidev |
| Local (dev) | http://localhost:3000 |
http://localhost:8000 |
http://localhost:8787 |
http://localhost:8787 (default) |
http://swapps.lndo.site (Lando) |
Local port clash: Platform and AI
By default both the Platform and AI workers try to use port 8787 with
wrangler dev. If you run them at the same time, pass a different port to one of
them (e.g. --port 8788).
Preview deployments are generated from GitHub Actions (deploy-preview.yml) in each
repo and produce a per-branch alias.
Local development of the whole stack¶
Each project is brought up independently from its own repository. Default ports for running the full platform locally:
| Service | Command (in its repo) | Port |
|---|---|---|
| Website | npm run watch:dev (or make dev) |
3000 |
| Platform | npm run dev (wrangler dev) |
8787 |
| AI | npm run dev (wrangler dev) |
8787 (clashes with Platform) |
| App | make run-local (Docker: Django + Postgres + Redis + Celery) |
8000 |
| Blog / CMS | ./start.sh (Lando; pulls the Pantheon DB via Terminus) |
swapps.lndo.site |
For the Website to talk to a local Platform, its dev environment points API_URL
to http://localhost:8787 (see the Website's wrangler.toml).
Cross-cutting environment variables¶
Only variables that connect projects to each other are listed (names only — never commit values). The rest is documented in each repo.
Website (swapps-client)
API_URL→ Platform worker URL (https://swapps-worker.swapps.workers.dev)API_WORKER→ Service Binding to theswapps-workerworkerSUBSCRIPTIONS_API_URL/SUBSCRIPTIONS_API_URL_INTERNAL→ App (app.swapps.com)BASE_URL→ site origin (https://swapps.com)
Platform (swapps-worker)
CLIENT_URL/CLIENT_HOST→ Website origin (CORS)WORDPRESS_POSTS_API→ WP REST API endpoint- Integrations:
PIPEDRIVE_*,MAILGUN_*,V0_API_KEY,LITELLM_*,AGNO_*,CLICKUP_*
App (idk)
CORS_ALLOWED_ORIGINS→ includeshttps://app.swapps.comSTRIPE_*(includesSTRIPE_SUCCESS_URL/STRIPE_CANCEL_URLpointing to/platform/*)- Integrations:
CLICKUP_*,TOGGL_*,PIPEDRIVE_*,QUICKBOOKS_*,FRONTAPP_*,AGNO_*
Blog / CMS (wp-swappscom, Pantheon secrets)
CLOUDFLARE_TOKEN/CLOUDFLARE_ZONE_ID→ Cloudflare cache purge on publish