Mulefuel
A meal planner for a two-person household that runs on your own phones.
Snapshot
- Status
- In development · moving to local-first
- Platform
- Web app · Android
- Distribution
- Docker image · signed APK via Obtainium
- Built with
- Svelte 5 · SvelteKit · IndexedDBNode · Express · SQLiteWebCrypto (AES-GCM, HKDF)Kotlin WebView shellDocker · GitHub Actions
How it works
The hard part of planning meals for two isn't the recipes. It's that a shared dinner has to fit two different budgets. Mulefuel treats a shared meal as one dish with two portion sizes and keeps a running total for each person, so it's obvious what dinner can afford once the day's snacks are in.
Plan the day
Pick breakfast, lunch, dinner and dessert for two people. Each meal is either shared — with portions scaled to each person — or chosen separately when your diets differ.
Watch the budget
Snacks, coffees and meals eaten out come off a per-person calorie and protein budget as they're logged, so what's left of the day decides dinner.
Ask for a suggestion
An optional AI helper suggests meals that fit what's left of both budgets, using what's in the pantry and household notes like allergies.
Syncing without a server
Each phone keeps its own copy in the browser's storage and records every change in a log. Syncing means swapping the parts of the log the other phone hasn't seen. Applying a change twice, or out of order, gives the same result, so all three ways of syncing can share the same code.
Same Wi-Fi
When both phones are on the same network they sync straight to each other. Nothing goes through a server.
Send a file
Guest networks and strict routers often block phones from talking to each other. Then the same encrypted changes can go into a file sent by any messenger. It can't be read on the way.
Optional relay
For phones that are rarely on the same network, a small relay holds encrypted messages until the other phone collects them. It can't read them, so it's safe to run on a cheap rented server.
Highlights
- The newest change wins field by field, not row by row, so one person setting dinner and the other logging a coffee on the same day both survive the merge.
- Hybrid logical clocks put changes in order, so a phone whose clock is a few minutes slow can't silently lose every edit it makes.
- Deleted items leave a marker behind, so a phone that was offline for a week can't bring back a recipe that was deleted while it was away.
- Phones pair by scanning a QR code. The encryption key comes from that code, so someone who can see the Wi-Fi traffic never saw the key and can't read or change what's sent.
- The relay only gets a separate login token made from the same secret. That's enough to check a phone belongs to the pairing, and useless for decrypting anything.
- AI keys can be written but never read back through the API. Ollama, Claude, Gemini, or any service that speaks the OpenAI API (OpenRouter, Groq, LM Studio) can be plugged in from Settings.
- The Android app is a thin shell around the web app rather than a Trusted Web Activity or a Capacitor build: a self-hosted server has no fixed web address to verify, and bundling the web code would mean an app release for every backend change.
- Automated tests on both sides, with Jest and Supertest for the API and Vitest for the sync code, clocks, merge rules and encryption.