b79340efb71d6165f973850be05ba5776be6d9a9
New /fasting route. Editorial layout matching the rest of the app
("CAPITOLO VII / Digiuno intermittente.").
When no active session:
- "Pronto a iniziare" eyebrow + italic call-to-action
- Protocol Select (16:8 default; full set FASTING_PROTOCOLS, hours derived
from PROTOCOL_DEFAULT_MINUTES)
- "Avvia digiuno" CTA → server action that POSTs to /me/fast-events
- Right column: Roman-numeral guide (I-IV) for the four most common protocols
with title + description from messages.json
When a session is active (status=IN_PROGRESS, no endedAt):
- Live timer in massive monospace clamp(3rem,9vw,6.25rem), tabular numerals,
ticking once per second via setInterval
- Italic remaining-time line ("Mancano HH:MM:SS") or "Obiettivo raggiunto."
once the protocol target is reached
- Hairline progress bar; ink while running, pomodoro after target
- "Concludi adesso" / "Concludi" CTA → PATCH with status=COMPLETED
- "Annulla sessione" ghost link → PATCH with status=ABORTED (with confirm())
- Right column: "FASE METABOLICA" with current phase title in pomodoro and
italic description (postprandial 0-4h / glycogenolysis 4-12h / lipolysis
12-18h / ketogenesis 18-24h / autophagy 24h+, PRD §5.3)
- "INIZIATO" and "OBIETTIVO" stats in mono
History below:
- Three big mono stats: completed sessions count, total hours, total sessions
- Last 12 events listed with protocol label in pomodoro italic, italian
short date, status eyebrow, duration in mono
Home gains a fourth NavItem ("Digiuno — Digiuno intermittente").
Verified end-to-end in Chrome: started a 16:8 → live ticking timer at
00:00:04, "Mancano 15:59:55", "Post-prandiale" phase shown.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
KetoPath
Web app responsive multi-utente per la gestione personalizzata di chetogenica e digiuno intermittente.
Vedi
CLAUDE.mdper le convenzioni di progetto edocs/PRD_KetoPath.docxper il PRD completo.
Prerequisiti
- Node.js
>=20.11(vedi.nvmrc) - pnpm
>=9(corepack enable && corepack prepare pnpm@latest --activate)
Getting started
pnpm install
pnpm typecheck
pnpm lint
pnpm format:check
Struttura del monorepo
apps/
web/ # Next.js 14 frontend (da scaffoldare)
api/ # Fastify backend (da scaffoldare)
packages/
shared/ # Tipi e utility di dominio
ui/ # Componenti UI riusabili
db/ # Prisma client (da scaffoldare)
tsconfig/ # tsconfig presets condivisi
eslint-config/ # ESLint config condivisa
docs/
PRD_KetoPath.docx
Script disponibili
pnpm dev— avvia tutte le app in parallelopnpm dev:web/pnpm dev:api— avvia singola apppnpm build— build di produzionepnpm lint/pnpm lint:fix— ESLintpnpm format/pnpm format:check— Prettierpnpm typecheck—tsc -bsu tutto il monorepopnpm test— Vitest (unit test)pnpm test:e2e— Playwright (E2E)
Languages
TypeScript
97.3%
CSS
1.7%
JavaScript
1%