L-GEVITY
L-GEVITY는 혈액수치·피트니스·바이오마커·스마트 알고리즘 기반 생활습관 조정으로 현재·미래 건강을 측정·향상하는 플랫폼
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Strength gain and weight loss coaching app built with Next.js and Supabase
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Private performance coaching dashboard for fat loss, strength, and running.
This README was originally written for Phase 1A, and several of its
sections (file tree, RLS policy summary, deferred features, and the
Phase 1A testing checklist) still describe the app as it stood then.
The app has since progressed through Phase 1V and is live for
controlled buddy testing — see Live deployment below.README 전문 보기 ↗Private performance coaching dashboard for fat loss, strength, and running.
This README was originally written for Phase 1A, and several of its sections (file tree, RLS policy summary, deferred features, and the Phase 1A testing checklist) still describe the app as it stood then. The app has since progressed through Phase 1V and is live for controlled buddy testing — see Live deployment below. Those older sections haven't been rewritten yet; treat them as historical context rather than current documentation until a full docs refresh happens (see Watch list before wider testing near the end of this file).
Root / redirects to /dashboard (signed in) or /login (signed out).
Copy .env.example to .env.local and fill in:
cp .env.example .env.local
NEXT_PUBLIC_SUPABASE_URL=https://your-ref.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME=ShredOS
Get your Supabase URL and anon key from: supabase.com → your project → Settings → API
NEXT_PUBLIC_APP_URL must match the real deployed URL
(https://shredos-pi.vercel.app), not localhost. This value feeds
directly into the magic-link and sign-up email redirect
(emailRedirectTo) — if it's left at the .env.example default,
confirmation emails sent to remote testers will redirect back to
localhost and silently fail.
supabase/migrations/001_phase1a_schema.sqlhttp://localhost:3000http://localhost:3000/auth/callback# Install Supabase CLI
npm install -g supabase
# Init (if not already done)
supabase init
# Start local Postgres + Auth
supabase start
# Apply the migration
supabase db push
# The CLI will print your local URL + anon key — put these in .env.local
npx supabase gen types typescript \
--project-id your-project-ref \
> src/types/database.ts
# 1. Install dependencies
npm install
# 2. Install shadcn/ui + add required components
npx shadcn@latest init
npx shadcn@latest add button card input label select badge separator toast switch
# 3. Run the dev server
npm run dev
# → Open http://localhost:3000
shredos/
├── .env.example
├── .gitignore
├── components.json # shadcn/ui config
├── next.config.ts
├── package.json
├── postcss.config.js
├── tailwind.config.ts
├── tsconfig.json
│
├── supabase/
│ └── migrations/
│ └── 001_phase1a_schema.sql
│
└── src/
├── middleware.ts # session refresh + protected route guard
│
├── app/
│ ├── globals.css
│ ├── layout.tsx # root layout, dark mode
│ ├── (auth)/
│ │ ├── login/page.tsx
│ │ └── auth/callback/route.ts
│ ├── (app)/
│ │ ├── layout.tsx # app shell (sidebar + topbar)
│ │ ├── dashboard/page.tsx
│ │ ├── onboarding/page.tsx
│ │ ├── profile/page.tsx
│ │ ├── weigh-in/page.tsx
│ │ ├── nutrition/page.tsx
│ │ ├── fasting/page.tsx
│ │ └── decisions/page.tsx
│ └── api/
│ ├── auth/signout/route.ts
│ └── decisions/route.ts
│
├── components/
│ ├── layout/
│ │ ├── Sidebar.tsx
│ │ └── TopBar.tsx
│ ├── dashboard/
│ │ ├── WeightCard.tsx
│ │ ├── NutritionCard.tsx
│ │ ├── FastingCard.tsx ← client component (live timer)
│ │ ├── StepsCard.tsx
│ │ ├── WorkoutCard.tsx
│ │ ├── CoachAlertsCard.tsx
│ │ └── DecisionLogCard.tsx
│ ├── onboarding/
│ │ ├── OnboardingWizard.tsx
│ │ ├── Step1Bio.tsx
│ │ ├── Step2Goals.tsx
│ │ ├── Step3Schedule.tsx
│ │ └── Step4Nutrition.tsx
│ ├── weigh-in/
│ │ ├── WeighInForm.tsx
│ │ └── WeighInHistory.tsx
│ ├── fasting/
│ │ ├── FastingTimer.tsx
│ │ ├── FastingControls.tsx
│ │ ├── FastingHistory.tsx
│ │ └── FastingStats.tsx
│ └── decisions/
│ ├── DecisionCard.tsx
│ └── DecisionList.tsx
│
├── lib/
│ ├── constants.ts # PROTECTED_ROUTES, isProtectedRoute(), app constants
│ ├── utils.ts # cn() for shadcn
│ ├── units.ts # lbsToKg, kgToLbs, feetInchesToCm, calculateBMI
│ ├── nutrition.ts # calculateNutritionTargets() — sex-aware + carb guardrail
│ ├── weighIn.ts # getTrendConfidence(), getNextWeighInDate()
│ ├── fasting.ts # getFastingDuration(), milestones, weekStats
│ ├── dates.ts # formatDate helpers
│ └── supabase/
│ ├── client.ts
│ ├── server.ts # + convenience fetch helpers
│ └── middleware.ts # updateSession()
│
├── types/
│ ├── database.ts # TypeScript types matching schema
│ └── app.ts # App-level types
│
└── hooks/
├── useProfile.ts
├── useWeighIns.ts
├── useFasting.ts
├── useNutritionTargets.ts
└── useDecisions.ts
All five user-owned tables have Row Level Security enabled. Every policy uses auth.uid().
| Table | Policy strategy |
|---|---|
user_profiles | Explicit SELECT / INSERT / UPDATE / DELETE — one policy per operation |
body_metrics | FOR ALL — same user_id check covers all operations |
nutrition_targets | FOR ALL |
fasting_logs | FOR ALL |
decision_logs | FOR ALL |
Unauthenticated requests return empty arrays (not errors). The anon key is safe to expose because RLS prevents any cross-user data access.
All weights stored in kg, heights in cm. Displayed as lbs / ft-in via units.ts. This prevents rounding drift from repeated conversions.
Not a generated column. Height is in user_profiles; weight is in body_metrics. Call calculateBMI(weightKg, heightCm) from units.ts. A Postgres view can be added later for analytics.
calculateNutritionTargets() in lib/nutrition.ts warns if carbs fall below 75g/day after protein and fat allocation. Returns a warnings array and a low_carb_warning boolean. Does not block save.
duration_minutes is not in the database. Calculated in lib/fasting.ts from started_at / ended_at. The live timer in FastingTimer.tsx uses setInterval to tick every second client-side.
CREATE UNIQUE INDEX fasting_logs_one_active_fast_per_user
ON fasting_logs (user_id) WHERE ended_at IS NULL;
The app also checks before starting, but the DB is the final guard. Error code 23505 is caught and surfaces "You already have an active fast."
Every target change (calorie edit, step goal change, fasting goal change, weigh-in cadence change) creates a decision_logs row. Status lifecycle: suggested → accepted / dismissed → applied / reversed.
Default cadence: weekly / Friday / morning. Dashboard shows trend confidence (none → low → medium → high). No recommendations below medium. Strong recommendations only at high (4+ weigh-ins for weekly cadence).
| Feature | Phase |
|---|---|
| Food logging (manual macro entry) | 1B |
| Food label photo import | 2C |
| Natural-language food math | 2C |
| Workout planner + lift log | 1C |
| Exercise library | 1C |
| Running plans + sessions | 2B |
| Claude API coaching | 2A |
| Progress charts | 2A |
| Wearable sync | 3 |
| Push notifications | 3 |
| Barcode scanner | 3 |
Work through this list before starting Phase 1B.
/dashboard → redirects to /login/weigh-in, /nutrition, /fasting, /decisions, /profile, /onboarding → all redirect to /login/onboarding/dashboard/loginonboarding_complete = true written to user_profiles on confirmnutrition_targets row written with today's effective_datedecision_logs entry created for onboarding completion (decision_type = nutrition_targets_set, status = applied)WeightCard shows latest weigh-in in lbsWeightCard shows next weigh-in date for weekly/Friday cadenceWeightCard shows trend confidence badgenone with 0 entries, low with 1, medium with 2–3, high with 4+calculateNutritionTargets() for sedentary 185lb user:
/nutrition pagenutrition_targets row with today's effective_datedecision_log entry (nutrition_targets_updated, status = applied)NutritionCard shows correct current targetslow_carb_warning = true shown as amber warning on NutritionCardfasting_logs row with started_at = now, ended_at = nullFastingCard shows live elapsed time (updating every second)FastingTimer shows current milestone note at ≥12h, ≥16h, ≥18h, ≥24hended_at = null directly in Supabase SQL editor → receives error (unique index)23505 and shows: "You already have an active fast."ended_at = now, calculates completed_goal correctlyduration_minutes is NOT a column in fasting_logs (check schema)/fasting/decisions page shows all entries, newest firstsuggested) entries have Accept/Dismiss buttonsstatus = accepted, applied_at = nowstatus = dismissedCoachAlertsCard shows pending decisionsDecisionLogCard shows the most recent entryfasting_logs has no duration_minutes column (confirm in schema)food_items, food_logs, etc.)food_item_id FK to a future food log tablenutrition_targets notes field has no assumptions about food logging formatQueryClientProvider. The dashboard and most pages use server components with server.ts fetches instead. To use hooks in client components, wrap src/app/layout.tsx with a QueryClientProvider.NutritionCard shows targets only. Progress bars are static placeholders.StepsCard shows goal only. Manual entry and wearable sync are deferred.CoachAlertsCard shows any suggested decisions but the system does not yet auto-generate recommendations from trend data. Decisions are generated manually on profile changes.For testers on the live deployment. Work through in order.
/loginDo these in addition to the Buddy tester script above before relying on buddy feedback. Use one browser session for your real account and a separate private/incognito window for a fresh test account, so neither session affects the other.
/ → confirm redirect to /login/ → confirm redirect to /dashboard/login directly → confirm it bounces to
/dashboard rather than showing the login formfood_logs,
workout_sessions, saved_meals, and daily_activity_logs —
not just the Phase 1A tables/dashboard colliding with Safari's stricter
history.replaceState rate limit after auth/onboarding state
changes — not a missing onboarding check. Fixed by switching both
the onboarding-completion and password-sign-in success navigations
to window.location.assign('/dashboard') (a full document
navigation), in OnboardingWizard.tsx and login/page.tsx. See
phase1v-auth-onboarding-navigation-stable.food_logs,
saved_meals, workout_sessions, workout_exercises,
workout_sets, workout_routines, and daily_activity_logs have no
documented RLS status in this README. Needs a direct check in the
Supabase dashboard.Status: planned, not started. Build only after buddy testing confirms core flows work. This is a full design-system phase (components, layout rules, spacing, tokens, mobile-first behavior) — not a cosmetic CSS-only patch.