smooth-app
전 세계 식품의 성분·영양·정보를 자유롭게 협업하고 공개하는 데이터베이스
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Meal, workout and daily-plan tracker with Filipino food built in. AI drafts entries; nutrition comes from sourced data.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
KayaMo is a live meal, workout and daily-plan tracker, with Filipino food and Taglish supported from the start. Its AI companion, Lis, drafts tasks, goals and food entries from plain words (or, for food, a photo), and nothing is saved until you confirm. Nutrition numbers come from sourced food data (USDA FoodData Central, Open Food Facts and a curated Philippine dataset), never from the model.
Live: www.kayamo.fit. You can try the demo in your browser without an account.README 전문 보기 ↗KayaMo is a live meal, workout and daily-plan tracker, with Filipino food and Taglish supported from the start. Its AI companion, Lis, drafts tasks, goals and food entries from plain words (or, for food, a photo), and nothing is saved until you confirm. Nutrition numbers come from sourced food data (USDA FoodData Central, Open Food Facts and a curated Philippine dataset), never from the model.
Live: www.kayamo.fit. You can try the demo in your browser without an account.
⌘K / Ctrl+K from any screen, or the + Log sheet): search, pick a portion and a meal, log it, and undo if needed.log_food action. Once you confirm, the app looks up the nutrition in the food catalog. The model never supplies the numbers.source and a confidence. The LLM only extracts text and quantities. Calorie targets have minimum floors enforced in code and by a database trigger, not by prompts. A Verify screen reviews food data with an Atwater (4/4/9) check that compares macros against calories.flowchart LR
subgraph Browser
UI["Next.js UI<br/>src/ + @kayamo/features"]
IDB[("IndexedDB<br/>@kayamo/offline")]
end
subgraph Server["Next.js route handlers on Vercel"]
API["/api/*<br/>Zod, auth, AI allowance"]
AI["@kayamo/ai router<br/>safety, persona, budgets"]
FOOD["@kayamo/food<br/>resolver + adapters"]
end
UI -- "write first" --> IDB
IDB -- "push queue, pull by server_seq" --> PG[("Supabase Postgres<br/>row-level security")]
UI --> API
API --> AI --> OAI["OpenAI"]
API --> FOOD --> EXT["USDA FDC, Open Food Facts"]
API --> PG
CLERK["Clerk sign-in"] --> BRIDGE["/auth/bridge"] -- "mints Supabase session" --> PG
How a food entry moves through the system
@kayamo/food ranks candidates in this order: your own foods, the Philippine core set, barcode hits, cached rows, then live USDA and Open Food Facts results. Foods you log often get a boost. Each candidate keeps its source and confidence.Sync. Clients use last-write-wins on updated_at. Pulls use a per-user server_seq cursor that the server assigns, so a later sequence number can never commit ahead of an earlier one. Deletes are tombstones, and a delete always wins over stale data. A 401 response pauses the queue without dropping writes. The full contract is in packages/offline/README.md.
Auth. Clerk handles accounts and the sign-in UI. After sign-in, /auth/bridge creates the matching Supabase session on the server. Row-level security, sync and the test suite therefore depend only on Supabase's auth.uid().
AI guardrails. All model calls go through one router in @kayamo/ai. That router validates output with Zod, enforces a per-user daily allowance and spend budget, applies timeouts, and records telemetry without prompt, image or health content. The Lis voice has its own evals:
| Path | Responsibility |
|---|---|
src/ | Routes, navigation and composition (Next.js App Router). No domain logic. |
packages/features | Screen logic, data hooks and components (food, Lis, goals, planner, gym) |
packages/ai | Every model call: router, Lis persona, safety classifier, context permissions, evals |
packages/food | Food resolution and ranking, USDA and Open Food Facts adapters, portions, label-OCR schema |
packages/offline | Dexie schema, optimistic writes, sync queue, pull and merge |
packages/db | Drizzle schema, typed queries, Supabase clients (the service role stays server-only) |
packages/core | Pure domain logic: TDEE, targets and calorie floors, weight trend, training progression |
packages/ui | Liquid Glass design tokens and shared primitives |
supabase/migrations | 23 hand-written SQL migrations, including row-level security |
data/ | Curated Philippine core food dataset and the gym and planner knowledge bases |
e2e/ | Playwright specs |
Engineering rules for contributors and coding agents are in AGENTS.md.
| Layer | Tools |
|---|---|
| App | Next.js 16 (App Router, Server Components), React 19, TypeScript (strict) |
| Styling | CSS Modules over a custom Liquid Glass token system, Tailwind v4 (base and theme tokens), Phosphor icons, hand-drawn SVG charts |
| Auth | Clerk, bridged to Supabase Auth |
| Data | Supabase Postgres with row-level security, Drizzle ORM, supabase-js |
| Offline | Dexie (IndexedDB) with a custom sync queue |
| AI | OpenAI via the Vercel AI SDK, Zod-validated structured outputs |
| Food data | USDA FoodData Central, Open Food Facts, curated YAML dataset |
| Testing | Vitest, Playwright (Chromium, Firefox, WebKit), axe-core |
| CI/CD | GitHub Actions, Vercel |
| Tooling | pnpm workspaces, ESLint 9, Prettier |
Prerequisites: Node.js 22 (the version CI uses), pnpm 9, and Docker (for a local Supabase stack).
pnpm install
cp .env.example .env.local
npx supabase start # local Postgres, Auth and API; prints URL and keys
npx supabase db reset --local # replay every migration from an empty database
pnpm exec tsx scripts/seed.ts # optional: seed foods and reference data (needs DATABASE_URL)
pnpm dev # http://localhost:3002
Copy the API URL, anon key, service-role key and database URL that supabase start prints into .env.local. With no keys at all, the app still builds and Explore the demo works. In development, /login also offers a skip-login that signs in a local test user (this needs SUPABASE_SERVICE_ROLE_KEY).
| Variable | Used for |
|---|---|
NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY | App data |
SUPABASE_SERVICE_ROLE_KEY | Server only: dev skip-login, the Clerk bridge, AI routes |
DATABASE_URL | Seed script. Must be a local host unless KAYAMO_ALLOW_REMOTE_DB=1 |
NEXT_PUBLIC_SITE_URL | Auth redirects (http://localhost:3002 locally) |
OPENAI_API_KEY, MODEL_NANO / MODEL_SMALL / MODEL_VISION / MODEL_COACH | Lis and photo observation. Without a key, the food parser falls back to rules |
USDA_FDC_API_KEY, OFF_USER_AGENT | Worldwide food search |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY | Sign-in. Optional locally: without them, /login says sign-in is not configured |
| Command | What it does |
|---|---|
pnpm dev / pnpm build / pnpm start | Dev server (Turbopack), production build (webpack), production server, all on port 3002 |
pnpm typecheck / pnpm lint | TypeScript and ESLint across the app and every package |
pnpm test | Vitest unit tests across the app and every package |
pnpm test:e2e | Playwright on Chromium, Firefox and WebKit. Starts the dev server; run pnpm exec playwright install once first |
RUN_DB_TESTS=1 pnpm test:db:integration | RLS, sync-sequence and PostgREST tests. Use only against a disposable local Supabase |
pnpm check:copy | Checks prompts and UI copy for banned vocabulary |
pnpm test:security | Checks security-relevant dependency compatibility |
pnpm ph-core:build | Validates and upserts the Philippine core food dataset (--check validates only) |
pnpm --filter @kayamo/ai eval:live | Live Lis voice evals (opt-in, spends API credit) |
GitHub Actions runs three jobs on every push and pull request:
pnpm audit --prod, production build.next build + next start, because the dev and production bundlers behave differently.The Playwright suite also checks security headers, axe accessibility and a JavaScript bundle budget.
main deploys.kayamo.fit.https://www.kayamo.fit and add redirect URLs for /auth/callback on both www and the apex domain (listed in .env.example). The apex kayamo.fit redirects to www.supabase/migrations/ and replay it locally. Then, with a backup taken, run npx supabase db push --linked --dry-run followed by npx supabase db push --linked.pnpm test:e2e:hosted runs the Playwright suite against https://www.kayamo.fit.KayaMo is live at kayamo.fit and under active development. The launch checklist lives in docs/RELEASE.md.
Shipped
Next
Built but hidden from v1 navigation
Both routes still work. They return to the navigation once they are restyled to match the rest of the app.
Out of scope for this repo: native iOS and Android (a separate mobile repository), social Circles, billing, and push notifications.
Designed and built by Rovince Eduvane (LinkedIn).
Food data comes from USDA FoodData Central (CC0) and Open Food Facts (ODbL). Values in the Philippine core dataset are derived from USDA ingredient data, and each entry records the recipe it assumes.