smooth-app
A collaborative, free and open database of ingredients, nutrition facts and information on food products from around the world
Log meals, chain-store orders, and custom builds in seconds — with barcode scanning, AI label reading, and goals that flex with your week.
HealthTypeScript · CSSGitHub @Parzivalart3misOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
Personal-first nutrition tracker with optional multiuser support — fast diary
logging, shared chain-store menus with verified items, custom store builds,
full nutrition panels, fasting history, voice and natural-language logging,
weekly analysis, and exportable reports. Installable as an iPhone Safari PWA.
Exercise lives in Iron Log, recipes in The Cookbook — MacroMap does food only.Read the full README ↗Personal-first nutrition tracker with optional multiuser support — fast diary logging, shared chain-store menus with verified items, custom store builds, full nutrition panels, fasting history, voice and natural-language logging, weekly analysis, and exportable reports. Installable as an iPhone Safari PWA.
Exercise lives in Iron Log, recipes in The Cookbook — MacroMap does food only.
| Layer | Choice |
|---|---|
| Framework | Next.js 16 App Router + TypeScript |
| Styling | Tailwind CSS v4 + shadcn/ui (Radix) + Lucide |
| Database | Neon Postgres + Drizzle ORM (pg_trgm for fuzzy duplicate detection) |
| Auth | Clerk (proxy middleware, webhook user sync) |
| Rate limiting | Upstash Redis (no-op locally when unset) |
| AI | Gemini (@google/genai) text generation (natural-language/voice parse, day analysis with rule-based fallback) |
| Speech | Web Speech API (browser-native, zero cost) |
| Barcode scan | Native BarcodeDetector with manual-entry fallback |
| React-PDF rendered in a Node route | |
| Charts | Recharts (palette validated for CVD + contrast in both themes) |
| PWA | Serwist service worker, manifest, splash screens, safe-area CSS |
similarity > 0.4), every edit is logged per-field in
food_edit_history and shown on the food page.record_type discriminator), PDF export (streamed behind auth).pnpm install
cp .env.example .env.local # fill in Clerk + Neon at minimum
pnpm db:migrate # applies drizzle/migrations (enables pg_trgm)
pnpm db:seed # 11 stores, menus, ingredients, demo data
pnpm dev
Optional integrations degrade gracefully: without Upstash rate limits are
skipped; without GEMINI_API_KEY day-analysis falls back to rule-based
insights and natural-language logging returns 503; without BARCODE_API_KEY
(a free USDA FoodData Central key) the barcode pipeline stops after Open Food Facts.
Point a Clerk webhook (user.created / user.updated / user.deleted) at
/api/webhooks/clerk and set CLERK_WEBHOOK_SECRET. Write routes also upsert
the user row lazily, so local dev works without a tunnel.
| Command | Purpose |
|---|---|
pnpm dev | Dev server (Turbopack; service worker disabled) |
pnpm build | Production build (--webpack, required by Serwist on Next 16) |
pnpm test | Vitest suite (40 tests: nutrition math, Zod boundaries, CSV, weekly summary, insights, dates/theming) |
pnpm lint / pnpm typecheck | ESLint / tsc --noEmit |
pnpm db:generate / db:migrate / db:seed | Drizzle schema → SQL → apply → seed |
pnpm icons | Regenerate PWA icons + splash screens from the SVG mark |
diary_entries.nutrition_snapshot_json
stores label + scaled totals at log time; quantity edits rescale the stored
snapshot rather than re-reading the (possibly edited) shared food.src/lib/db/index.ts proxies Drizzle creation so
next build needs no DATABASE_URL. neon-http has no transactions;
multi-statement writes are sequential by design.name || ' ' || coalesce(brand_name, ''); POST /api/foods returns a
duplicate_warning payload unless forceCreate is set.--primary, --cta, --store-*) on a scoped wrapper, with
luminance-based text contrast and an optional per-store override.touch-action: manipulation
everywhere tappable, and 16px inputs on coarse pointers to kill focus zoom.Vercel + Neon + Clerk production instance: set the env vars from
.env.example, run pnpm db:migrate && pnpm db:seed against the production
branch, then verify the PWA checklist on a real iPhone (install from Share →
Add to Home Screen, standalone launch, no pinch zoom, store accent shift).