Work / Imposter / Architecture
Imposter architecture
A party game that works fully offline on one phone. Online rooms are the only part with a server: Firebase Cloud Functions deal the cards and count votes, Firestore holds the room, and RevenueCat says who may host. Packs and hosting are sold through the stores.
last verified 2026-10-30
Known cost a month
₹0.01
Google Cloud, against a ₹100 alert. The wiki's $8 Apple fee has no receipt. RevenueCat and EAS are not read.
What earns money
Pro and Online
Pro $4.99 once. Online $2.99 a month or $14.99 a year, paid by the host. Joining a room is free.
What makes cost grow
Phones in rooms
Each phone in a room calls the server twice a minute. One-phone games cost nothing.
Online use, 30 days
793 calls
47 rooms made, 34 rounds started, owner tests included. 27 error log entries.
How it fits together
Pick something a user does to see its path and what it costs.
Not read
one RevenueCat lookup, then a room. Free: 1 room. Online: more, 10 an hour at most
- The phone signs in anonymously and calls the server.
- An old build is turned away with a prompt to update.
- The server asks RevenueCat what this user owns. If it cannot tell, the user owns nothing.
- Without Online, a second room is refused ('needs-online'), counted on the server.
- The room is written with a 24-hour expiry, and the code comes back.
Cost
Every number says where it came from.
| Service | Pays for | Today | Grows with | Basis |
|---|---|---|---|---|
| Imposter app | Expo app. 10 packs, 749 words, all one-phone play | $0 | Nothing | StatedCLAUDE.md; wiki/entities/plans.md |
| Past games and settings | On the device only. Nothing about a past game goes to the server | $0 | Nothing | Statedwiki/decisions/online-rooms.md |
| Room functions | 17 callables and a cleanup trigger. Max 10 copies each | ₹0, after ₹4.92 of free tier | Calls: 793 in 30 days. Each phone in a room pings every 30 s | MeasuredCloud Billing report, Oct 1-30, read 2026-10-30 |
| Firestore | Rooms, players, cards, clues, votes. Phones only read; the server writes. Rooms expire after 24 hours | ₹0: no line on the October bill | Pings, clues, votes and live listeners | MeasuredCloud Billing report, Oct 1-30, read 2026-10-30 |
| Firebase sign-in | Anonymous sign-in. The user id is the player's identity in a room | ₹0: no line on the October bill | New installs that go online | MeasuredCloud Billing report, Oct 1-30, read 2026-10-30 |
| App Check | ₹0: no line on the October bill | Calls | MeasuredCloud Billing report, Oct 1-30, read 2026-10-30 | |
| RevenueCat | Prices, purchases, and the server's check of who may host | Not read | Revenue; one lookup for each room made | Not known |
| App Store · Google Play | Take payment for Pro and Online | Not read | Sales | Not known |
| EAS Build and Update | Builds and JavaScript-only updates | Not read | Builds and updates | Not known |
What breaks when something fails
| If this fails | The user sees | Their data | Basis |
|---|---|---|---|
| Firestore | Online rooms stop. | Nothing is kept for long: rooms expire after 24 hours | In codefirestore.rules; src/constants/rooms.ts ROOM_TTL_MS |
| Firebase sign-in | Online rooms cannot be made or joined. | Safe | Assumedsrc/services/firebase.ts signs in before each call; no test named |
| RevenueCat | A paying host cannot make a room: the server treats an unreachable RevenueCat as owning nothing. Joining and one-phone play still work. | Safe | In codefunctions/src/entitlements.ts: fails closed, 5 s timeout |
| EAS Build and Update | Installed apps keep working. They only miss updates. | Safe | AssumedNo network needed to play; no test named |
Where the data goes
| One-phone games, past games, settings | Stay on the phone |
| Room reports | Firestore, readable by the server only |
| Purchases and the Firebase user id | RevenueCat and the stores |
| Chat | None exists in V1 |
What we do not know yet
- RevenueCat, EAS and store fees are not read.
- What is live: ops/release.yml was last updated 2026-10-12 and says nothing is live on either store. The repo is at 2.2.0 (tagged 2026-10-26) and tasks.md has 2.1.0 waiting for review since 2026-10-15. The current state is not recorded.
- Play production needs 12 testers for 14 days; 1 was opted in on 2026-10-04 (tasks T012).
- ops/setup.md says the Play merchant account's BillDesk verification blocks sales outside India; release.yml lists Online ACTIVE in 174 regions. Which is true is not recorded.
- GitHub Actions will not run for the org (tasks T047), so checks and updates are run by hand.