DRAFTFIG. BROCCOLI-APK
LIVE ON PLAY STORE ↗React NativeSQLite FTS5Reanimated 3Offline-First
Expo EAS Build

BROCCOLI - Nutrition Instrument

Broccoli official logo
APP ICON

1. the problem

Most fitness trackers deceive users with pseudo-mathematical certainty: claiming a chicken breast is "165.2 calories". In reality, biological variance, cooking evaporation, and human portion estimation carry a natural ±10% to ±15% standard error. False precision is a bug: when an app claims four decimal places on biology, it trains users to optimize noise over habits.

INTERACTIVE PIPELINEClick any box to inspect architecture
food entrynatural languagezero network waitinput intentlocal sqlite db• FTS5 search index• sub-1.4ms lookups• 100% offline autonomyembedded storagetolerance matrixconfidence corridormacro band computationshonest statisticsuncertainty math60 FPS!dial physics
STAGE 01 // Natural Language Input Intent

ROLE: On-device natural language text tokenization. Parses food items, quantities, and metric units on the client UI thread with zero cloud roundtrips.

> parseIntent("2 large boiled eggs + 80g rolled oats") [TOKEN_01] entity: "boiled egg", qty: 2, unit: "large", cal: 144, p: 12.6g [TOKEN_02] entity: "rolled oats", qty: 80, unit: "g", cal: 311, p: 13.5g [STATS] Parse duration: 0.74ms · Network roundtrips: 0 · Battery impact: negligible
INVARIANT: Instant UI responsiveness; user never stares at loading spinners while logging meals.
FAILURE GUARD: Offline subway mode; zero network dependency during daily data entry.

2. what i built

Caloric and body composition tracking engineered as an honest physical instrument:

1.4ms SQLite FTS5 search
offline subway mode
<42MB steady RAM footprint
uncertainty corridor
tactile haptic clicks
reactive macro engine
60 FPS UI thread physics
zero cloud spinners

3. problems i had to crack

Click card to view root cause & code diff
Ajs bridge gesture stutter
▼ DIFF

Calculating rotation physics and gesture dampening across the React Native bridge dropped frames on Snapdragon 400 test devices. Fix: ported the entire gesture pipeline onto the native UI thread using Reanimated 3 worklets and shared memory values.

Bfts5 tokenizer collision
▼ DIFF

Food names containing mixed units and metric measurements (e.g. 100g, 2.5oz) broke standard SQLite tokenizers. Fix: created a normalized fts5 prefix tokenizer with custom unicode folding.

Candroid oem low-memory kills
▼ DIFF

Aggressive Android task killers terminated the app during food search over heavy lists. Fix: authored an aggressive virtualized windowing layer that strictly caps resident memory heap below 42MB, eliminating OEM background terminations.

Dplay signing key mismatch
▼ DIFF

Google Play App Signing generated an internal key fingerprint that conflicted with initial local release builds, blocking automated tracks. Fix: configured automated eas build credentials with pinned SHA-256 fingerprint verification in assetlinks.

SHIPPED PRODUCT. Available worldwide on Google Play ↗. Built with React Native & SQLite.

PROJECTBROCCOLI
DRAWN BYBIDYA B. NANDA
STATUSLIVE ON PLAY STORE ↗