Photo in. Arithmetic out.
Every calorie shows its working, from the share sheet to your log.
Prawn curry with rice
Sample meal| Item | Gramsg | ProteinP | CarbsC | FatF | Fibre | kcal |
|---|---|---|---|---|---|---|
| Prawn curryFrom your library | 250 | 28 | 11 | 15 | 3 | 297 |
| Basmati riceFrom your note | 160 | 4 | 45 | 1 | 1 | 207 |
| GheeFrom your note | 5 | 0 | 0 | 5 | 0 | 45 |
| Meal | 410 | 32 | 56 | 16 | 4 | 504 |
| 4 × 32 + 4 × 56 + 9 × 16 + 2 × 4 = 504 Adds up. | ||||||
504 kcal
Checked before it’s kept
A vision model names the plate. A second works out new foods. Arithmetic decides.
| Check | The rule | If it fails |
|---|---|---|
| Energy | kcal = 4P + 4C + 9F + 2 fibre | Sent back. |
| Mass | macros ≤ 100 g per 100 g | Sent back. |
| Ingredients | sum of ingredient kcal = dish kcal | Sent back. |
| Still wrong | Fails twice. | Flagged on the item. |
A target that follows your training
Pick an activity level. Carbs fill what protein and fat leave.
| Resting burn (BMR) | 1,645 |
|---|---|
| Maintenance | 2,712 |
| Target on a cut | 2,316 |
| Protein | 159 g |
| Carbs | 275 g |
| Fat | 64 g |
A range, not a verdict
Over target but under maintenance still reads as a deficit.


The library learns your kitchen
Each food is worked out once. Rename it and the library learns.
| you_logged | matched_to | what_happens |
|---|---|---|
| chiken tikka | chicken tikka | Linked automatically. |
| paneer tikka | paneer tikka masala | Asks “Same as…?” and remembers a No. |
| daal | dal | One key for spellings and synonyms. |
Closest:
Library: chicken tikka, paneer tikka masala, dal, roti, chicken biryani, basmati rice.
Yours, on your own server
One container and one OpenRouter key.
- Your data. One SQLite file.
- Redis. A cache only.
- Your phone. Share photos to it over Tailscale HTTPS.
git clone https://github.com/samridh3215/macrosnap
cd macrosnap
cp .env.example .env
docker compose up -d --build
Set APP_TOKEN and OPENROUTER_API_KEY in .env first.