System overview
Drape is four product surfaces plus this docs site, running two backend generations. One Expo mobile app and three Next.js web apps talk to FastAPI backends that are mid-migration from MongoDB to Postgres. Read that page first — it is the context for everything below.
Containers
The try-on AI pipeline (rembg, garment masking, Fashn/FLUX.2) lives on the MongoDB backend, which is what the shipped mobile app uses. The Postgres backend serves the web tier and carries the newer marketplace capabilities.
Surfaces and where they deploy
| Surface | Repo | Backend | Hosting |
|---|---|---|---|
| Mobile app | Drape-/frontend | MongoDB monolith (Render) | EAS → TestFlight / Play |
| Marketing | Drape-Marketing | Postgres (public reads) | AWS Amplify → www.drape.to |
| Brand portal | Drape-brand | Postgres | AWS Amplify → brand.drape.to + {slug}.drape.to |
| Admin | Drape-admin-v1 | Postgres | AWS Amplify → admin.drape.to |
| Docs | Drape-Docs | — | AWS Amplify → docs.drape.to |
The brand portal is multi-tenant by subdomain: brand.drape.to is the
reserved apply/login host, and each approved store gets {slug}.drape.to (e.g.
prk.drape.to) with its own theming — see
Web surfaces.
Request lifecycle (mobile → Mongo backend)
Every authenticated request carries a JWT and resolves the user from the database
on each call (no session cache — deletions and flag changes take effect
immediately). The web apps follow the same shape against Postgres, holding the JWT
in localStorage with a client-side expiry pre-check.
Deployment topology
| Component | Where | Notes |
|---|---|---|
| MongoDB backend | Render (uvicorn server:app) | Mobile app only; non-AWS |
| Postgres backend | ECS Fargate on cluster drape | api.drape.to → service drape-prod; dev-api.drape.to → drape-dev. Code: backend-postgres/. develop auto-deploys dev; prod is workflow_dispatch. |
| Worker + cron agents | Render | Try-on queue, hourly testers, Mongo backup |
| MongoDB | Atlas | Generation-1 datastore |
| PostgreSQL | RDS in account 230790682930 | Prod instance drape-postgres-prod-live (docs-supported). See AWS system map. |
| Redis | Upstash (REST) | Rate limits, try-on jobs |
| Storage | Supabase | Private body-photo buckets (shared). No S3 in this AWS account. |
| DNS | Route 53 zone drape.to / Z00780563EFBECXPWSBK4 | Not external-only |
| Web apps + docs | AWS Amplify (us-east-1) | Org git drape-ai-llc/*; docs custom domain is live |
| Mobile builds | EAS | development / preview / production |
The Postgres API is not on Render. Render remains the Mongo mobile path.
For the verified AWS footprint (Amplify app IDs, Route 53, ECS, RDS), see Infrastructure and the AWS system map.
Where to go next
- Backend evolution — the two-generation migration.
- Backend (MongoDB) — the generation the mobile app runs on.
- Web surfaces — the three Next.js apps and the subdomain model.
- Infrastructure — current hosting topology.
- AWS system map — live inventory + Stage 2A RDS classifications.
- Mobile app — the Expo client.
- Try-on pipeline — the render path.
- Data model · Design system · Security