smooth-app
A collaborative, free and open database of ingredients, nutrition facts and information on food products from around the world
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
A shared, real-time baby-tracking app (feeds, pees, poops) built with Next.js, TypeScript, Tailwind CSS, and Supabase.
2. Create a Supabase project at supabase.com, then copy .env.local.example to .env.local and fill in your project's URL and anon key (found under Project Settings → API):
3. Apply the database schema: open your Supabase project's SQL Editor and run each file in supabase/migrations/ in filename order (they're timestamped). (If you have the Supabase CLI linked to this project, supabase db push works too.)檢視完整 README ↗A shared, real-time baby-tracking app (feeds, pees, poops) built with Next.js, TypeScript, Tailwind CSS, and Supabase.
Install dependencies:
npm install
Create a Supabase project at supabase.com, then copy .env.local.example to .env.local and fill in your project's URL and anon key (found under Project Settings → API):
cp .env.local.example .env.local
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
Apply the database schema: open your Supabase project's SQL Editor and run each file in supabase/migrations/ in filename order (they're timestamped). (If you have the Supabase CLI linked to this project, supabase db push works too.)
Optional but recommended for a two-person household: under Authentication → Providers → Email in the Supabase dashboard, turn off "Confirm email" so signup doesn't require clicking an email link first.
Optional — enable "Continue with Google":
https://<your-project-ref>.supabase.co/auth/v1/callback.http://localhost:3000/auth/callback (and your production URL + /auth/callback once deployed) to the Redirect URLs allowlist./onboarding to finish household setup, with the name field prefilled from the Google profile when available.Run the dev server:
npm run dev
Open http://localhost:3000. Signup collects your name, email, password, and household choice (create or join, via invite code) all on one screen; on success you land straight on the Log tab. (If your Supabase project has email confirmation on, you'll finish household setup at /onboarding after confirming instead.) Then add your baby.
src/app — Next.js App Router pages: /login, /signup, /onboarding (fallback household setup for the email-confirmation case), / (Log), /timeline, /reportssrc/components — React components, grouped by feature (auth, onboarding, baby, log, timeline, reports, layout)src/lib/supabase — Supabase client helpers (browser, server, and proxy clients, using @supabase/ssr) and generated Database typessrc/lib/entries.ts — grouping/sorting/formatting helpers shared by the Log and Timeline screenssrc/lib/reports.ts — client-side stat/daily-aggregate computation for the Reports screenproxy.ts — refreshes the Supabase auth session on each request (this Next.js version renamed middleware.ts to proxy.ts)supabase/migrations — SQL schema migrations, applied in orderFour tables, matching the paper log this app replaces:
households — a household using the app, with a unique invite_code for onboardingusers — one row per household member, mirrors auth.usersbabies — one row per baby, belongs to a householdentries — one row per logged event: type (feed / pee / poop), timestamp, notes, amount_ml (feed only), logged_byRow Level Security is enabled on all four tables, scoped so a signed-in user can only see/edit their own household's data (via a current_household_id() helper function). New users attach to a household through the create_household/join_household Postgres functions (called from the onboarding screen), not by inserting rows directly.
The matrix UI clusters same-instant entries (e.g. a feed logged alongside a pee) back into a single row for display, since the paper log this replaces often has multiple things happening at once — see groupEntriesIntoMoments in src/lib/entries.ts.
Realtime is enabled on entries (see the enable_realtime migration), so when one household member logs something, the other sees it appear live without refreshing — this is delivered subject to the same RLS policies, so only household members receive it.
Both Home and Timeline sort moments chronologically by timestamp (the event's actual time), most recent first — groupEntriesIntoMoments in src/lib/entries.ts handles both the clustering and the sort.
Reports (/reports) computes stat cards (total entries/feeds, avg mL per feed, avg gap between feeds), two per-day bar charts, and a daily summary table — all client-side from the fetched entries, no SQL aggregation views. Fine at household scale; revisit if this becomes commercial and datasets grow.
The "paper" visual language (warm off-white surfaces, ruled-line table dividers, amber/sage/terracotta/brand-blue accents) is defined as Tailwind v4 theme tokens directly in src/app/globals.css via @theme — this Tailwind version doesn't use a tailwind.config.js, so tokens like --color-sage live in CSS and generate bg-sage/text-sage/etc utilities automatically. Shared primitives live in src/components/ui (Field, TextInput, PrimaryButton) and src/components/brand (BrandMark). Per-person identity colors (avatars, "logged by" pills) cycle through a fixed sage/terracotta/brand-blue palette by household join order — see src/lib/person-colors.ts. There is no dark mode; the design spec is light-only by intent.
Login/signup succeeds but bounces back to /login, or server-side Supabase calls fail with UNABLE_TO_GET_ISSUER_CERT_LOCALLY: some local setups (antivirus/VPN software doing HTTPS inspection) install a certificate your browser trusts but Node.js doesn't, so the server can't verify your session with Supabase even though the browser signed in fine. Workaround for local dev only — never for production:
NODE_TLS_REJECT_UNAUTHORIZED=0 npm run dev