Skip to content

Work / DwarSeva / Architecture

DwarSeva architecture

One NestJS GraphQL server and a Postgres database serve a phone app, an admin console and a marketing site. Nothing is recorded as live, and no bill has been read. No SMS or email provider is wired, so nothing is sent; outside production the codes go to the server log.

last verified 2026-10-30

Known cost a month
$0
The wiki says the owner pays $0 today. No bill or receipt was read. The same note puts EC2 near $15 and store fees near $8 at list price, if it were all running.
Is it live?
Not known
On 2026-10-04 no host answered. ops/release.yml records nothing as live.
What makes cost grow
Nothing metered
No per-use paid API is called. Cost grows with servers and storage, not with use.

How it fits together

Pick something a user does to see its path and what it costs.

On the phone and browserOur serverOutside servicesMobile appMobile appExpo 54. Residents, guards and society admins in one app, tabs chosen by role$0Website and admin consoleWebsite and admin consoleNext.js sites on Cloudflare Pages (cd.yml also tries AWS)Not readapiapiNestJS 11 and Apollo GraphQL. One worker. Runs on EC2 in ap-south-1 per cd.yml~$15 at list, if runningPostgresPostgresSocieties, units, members, bills, visitors, OTP hashes. Prisma 7. Host not recordedNot readPhoto storagePhoto storageNot readExpo pushExpo pushPushes a notice to residents and guards$0Email and SMSEmail and SMS$0EAS and the storesEAS and the storesMobile builds, and the App Store and Google Play listings$8 / mo Apple, if enrolled
$0, and no SMS goes out
  1. The phone asks for a code.
  2. The server makes a code, stores only its hash, and allows one resend a minute.

Cost

Every number says where it came from.

ServicePays forTodayGrows withBasis
Mobile appExpo 54. Residents, guards and society admins in one app, tabs chosen by role$0NothingStatedCLAUDE.md; wiki/concepts/role-gate.md
Website and admin consoleNext.js sites on Cloudflare Pages (cd.yml also tries AWS)Not readPage views, if the free tier is passedNot known
apiNestJS 11 and Apollo GraphQL. One worker. Runs on EC2 in ap-south-1 per cd.ymlNot readInstance size, not useNot knownwiki/concepts/architecture.md gives ~$15 at list price; no bill read
PostgresSocieties, units, members, bills, visitors, OTP hashes. Prisma 7. Host not recordedNot readRows and storageNot known
Photo storageNot readVisitor photos storedNot known
Expo pushPushes a notice to residents and guards$0NothingAssumed
Email and SMS$0Nothing until a provider is addedIn code
EAS and the storesMobile builds, and the App Store and Google Play listingsNot readBuildsNot knownwiki/concepts/architecture.md names ~$8 for store fees; eas.json submit block holds placeholder ids

What breaks when something fails

If this failsThe user seesTheir dataBasis
Website and admin consoleThe marketing site and the super-admin console do not load. The phone app is unaffected.None held thereAssumedThe sites call the API; no data is stored in them
apiNothing works: every screen reads and writes through this server.Safe in Postgres. Nothing is kept on the phone.AssumedNo offline code was looked for; no incident recorded
PostgresEvery request fails. Health check cannot pass.Not known: no backup or restore step is recorded.Not known
Photo storageThe photo upload fails with "Upload failed". If the bucket is not set up, the server returns the photo inline as a base64 data URI instead.In the fallback, the photo is not stored on the server at all.In codeapps/server/src/api/upload/visitor-photo.controller.ts
Expo pushNo push arrives. The notice is already saved, so it shows in the app.SafeIn code
Email and SMSNot applicable: users never receive a code or a link.Codes are stored only as hashes in productionIn code

Where the data goes

Users, phone and emailPostgres
Visitor photosThe bucket, or inline in the response if none is set up
Login sessionsPostgres. A 02:00 job cleans them.

What we do not know yet

  • Hosting is being migrated (owner, 2026-10-30): task T015 moves it from AWS and Cloudflare Pages to Cloud Run in asia-south1. Costs here are before the move.
  • The real monthly bill: no AWS, Cloudflare, EAS or database cost is recorded. $0 comes from one wiki line, not a receipt.
  • Whether anything is live. ops/release.yml has live: null for every surface; no host answered on 2026-10-04.
  • Where Postgres runs, and whether it is backed up. Only a DATABASE_URL in SSM is mentioned.
  • Hosting is declared twice: cd.yml also deploys admin to EC2 and the website to S3/CloudFront, while setup.md says Cloudflare Pages. Which one is real, and whether both are billed, is not known.
  • No test suite exists. CI runs lint, typecheck and builds only, and cd.yml ignores lint failures.
  • The root Dockerfile runs apps/web/server.js, which is not in this repo.