Skip to main content

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

External

Data & infra

Backend (two generations)

Client surfaces

Mobile app
Expo — Drape-/frontend

Marketing
Next.js — www.drape.to

Brand portal
Next.js — brand.drape.to

Admin
Next.js — admin.drape.to

MongoDB monolith
server.py on Render

backend-postgres
ECS Fargate - api.drape.to

MongoDB

PostgreSQL

Upstash Redis

Supabase Storage

Fashn.ai

fal.ai — rembg · SAM · FLUX.2

Stripe Connect

Mux — live

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

SurfaceRepoBackendHosting
Mobile appDrape-/frontendMongoDB monolith (Render)EAS → TestFlight / Play
MarketingDrape-MarketingPostgres (public reads)AWS Amplify → www.drape.to
Brand portalDrape-brandPostgresAWS Amplify → brand.drape.to + {slug}.drape.to
AdminDrape-admin-v1PostgresAWS Amplify → admin.drape.to
DocsDrape-DocsAWS 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.

HandlerDBget_current_userFastAPIAppHandlerDBget_current_userFastAPIAppHTTPS + Bearer JWT1resolve identity2look up user by sub claim3user record4user (or 401 / 403)5dispatch6JSON response7

Deployment topology

ComponentWhereNotes
MongoDB backendRender (uvicorn server:app)Mobile app only; non-AWS
Postgres backendECS Fargate on cluster drapeapi.drape.to → service drape-prod; dev-api.drape.todrape-dev. Code: backend-postgres/. develop auto-deploys dev; prod is workflow_dispatch.
Worker + cron agentsRenderTry-on queue, hourly testers, Mongo backup
MongoDBAtlasGeneration-1 datastore
PostgreSQLRDS in account 230790682930Prod instance drape-postgres-prod-live (docs-supported). See AWS system map.
RedisUpstash (REST)Rate limits, try-on jobs
StorageSupabasePrivate body-photo buckets (shared). No S3 in this AWS account.
DNSRoute 53 zone drape.to / Z00780563EFBECXPWSBK4Not external-only
Web apps + docsAWS Amplify (us-east-1)Org git drape-ai-llc/*; docs custom domain is live
Mobile buildsEASdevelopment / preview / production
Superseded

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