尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證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.