lucianoandClaude Opus 4.7 b79340efb7 feat(web): fasting page — live timer, metabolic phase, history (PRD §5.3)
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>
2026-04-29 17:15:17 +02:00
2026-04-29 12:10:08 +02:00
2026-04-29 12:10:08 +02:00
2026-04-29 12:10:08 +02:00
2026-04-29 12:10:08 +02:00
2026-04-29 12:10:08 +02:00
2026-04-29 12:10:08 +02:00
2026-04-29 12:10:08 +02:00

KetoPath

Web app responsive multi-utente per la gestione personalizzata di chetogenica e digiuno intermittente.

Vedi CLAUDE.md per le convenzioni di progetto e docs/PRD_KetoPath.docx per 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 parallelo
  • pnpm dev:web / pnpm dev:api — avvia singola app
  • pnpm build — build di produzione
  • pnpm lint / pnpm lint:fix — ESLint
  • pnpm format / pnpm format:check — Prettier
  • pnpm typecheck — tsc -b su tutto il monorepo
  • pnpm test — Vitest (unit test)
  • pnpm test:e2e — Playwright (E2E)
S
Description
No description provided
Readme
665 KiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 97.3%
CSS 1.7%
JavaScript 1%