How Rasoi was built
Rasoi is a small private app for one household kitchen. It exists to waste less food, to write down a cook's knowledge before it is lost, and to make payment a settled matter rather than a conversation.
What it runs on
- Cloudflare Pages serves two separate interfaces from one deployment.
- Pages Functions provide the API. A middleware checks the signed session cookie and the caller's role before any handler runs.
- D1, which is SQLite, holds the records. R2 holds voice clips and photos, privately, reachable only through an authenticated endpoint.
- No framework. Plain ES modules, so the whole thing stays readable.
Decisions worth explaining
- Payable time rounds up. Any part of a quarter hour is paid as a full quarter hour. A rounding rule that costs the cook money would reintroduce the discussion the app was built to remove.
- Her pay depends on time alone. The household pays for groceries and travel, so no expense can ever change what she is owed.
- Scores are private, requests are public. Ratings inform the cook plan and are never shown to her. What reaches her is which dishes were loved and what to make next time.
- Inventory records status, not quantity. Full, low or out, with a refill cadence. Pantry apps that track exact amounts stop being true within a month.
- The plan subtracts the fridge. Portions already made are deducted from what is needed, so a full fridge means less cooking rather than more leftovers.
- No location tracking. She clocks herself in and out.
Languages
The cook's interface is available in English and Urdu. Urdu sets the document direction to right-to-left and loads Noto Nastaliq Urdu, which is far easier to read than the default Arabic naskh shaping.
When the network drops
The kitchen is the one place connectivity cannot be assumed. Clocking in, marking a dish cooked and flagging a low staple are written to the phone first and sent when the signal returns. Each carries an identifier generated on the device, so a retry can never create a second paid session.