10 Commits

Author SHA1 Message Date
arnaudne bdf53980c0 fix(docker): prevent pnpm TTY prompt when BuildKit cache has stale node_modules
pnpm 11 aborts with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY when it
detects an existing node_modules directory and there is no TTY to confirm
purging it. This happens in Portainer when BuildKit layer cache reuses a
prior deps stage containing node_modules.

- .npmrc: set confirmModulesPurge=false (skip prompt unconditionally)
- Dockerfile deps stage: set CI=true (belt-and-suspenders for pnpm CI mode)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 09:10:33 +02:00
arnaudne 8f68eebeb0 feat: UI/UX improvements pass + fix photo 404 in Docker
Photos:
- Serve uploads via /api/photos/[filename] from UPLOAD_DIR env var
- Default UPLOAD_DIR=/data/uploads (mount as Docker volume for persistence)
- Upload route creates dir on demand, no root-permission issue
- Dockerfile creates /data/uploads owned by nextjs user

Growth:
- Show chart with single measurement (was hidden until 2+ points)
- PC label expanded to "PC — Périmètre crânien (cm)"
- WHO percentile ⓘ tooltip explaining P50/P3-P97
- Date field defaults to today in add-measurement form

Stats:
- Heatmap legend shows actual counts (0 1 2 3 4+) not just Moins/Plus
- Sleep timeline labeled "Fenêtre 19h – 11h"

Timeline:
- Filter type persisted in URL param (?type=...) — survives navigation
- Inline note save shows ✓ flash after blur
- Photo thumbnails open in new tab

Photos:
- Lightbox wraps: next on last → first, prev on first → last

Search:
- Result count header "X événements · Y notes"
- Event results link to /timeline?date=...&type=...
- Note results link to /notes?date=...

Notes:
- Unsaved indicator (amber dot) while textarea dirty, green ✓ after save

Milestones:
- Sort by date ascending within each month group

Settings:
- Pushover key field has eye toggle (show/hide)
- API key delete shows confirmation with key name
- All sections wrapped in collapsible SectionCard accordion

Dashboard:
- Empty state callout for new users with no events today

Event modal:
- Milk lot selection shows "Sélectionnez un lot — il sera marqué comme utilisé"
- Photo upload validates 5MB client-side before sending
- Timer resume shows "Reprise du chronomètre" when loaded from localStorage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 20:44:45 +02:00
arnaudne b417eb648c fix(build): disable webpack build workers to reduce memory
Next.js spawns per-worker webpack processes — each has its own heap.
On low-RAM servers total usage exceeds available memory → SIGKILL (silent).
webpackBuildWorker: false runs compilation in main process only.
Also lower JS heap cap to 512MB to leave room for OS + pnpm.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 16:21:01 +02:00
arnaudne 1c837a3aae fix(build): use webpack instead of Turbopack for production build
Turbopack (Next.js 16 default) OOM-kills on low-memory servers — BuildKit
loses the connection and reports EOF. Webpack uses significantly less RAM.
Also bumped NODE_OPTIONS heap limit to 2048MB.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 16:10:49 +02:00
arnaudne 18074524e8 fix(docker): cap Node.js heap to 1536MB during build
Prevents OOM kill on low-memory servers during Next.js + Workbox build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 16:05:31 +02:00
arnaudne 25fe1b8e36 chore(docker): add CACHE_BUST arg to force clean builds
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 17:42:34 +02:00
arnaudne 898a317fc7 fix(docker): use --ignore-scripts on install, fix pnpm 11 build approval error 2026-06-13 10:41:36 +02:00
arnaudne f12512401c fix(docker): copy .npmrc into deps stage to honour ignore-scripts=true 2026-06-13 09:13:37 +02:00
arnaudne bffe51da74 fix(docker): pin pnpm@11.6.0 via npm, fix runner stage prisma copy 2026-06-13 02:02:51 +02:00
arnaudne cd16c354c0 Initial commit — Grow baby tracker
Next.js 16 App Router, Prisma + PostgreSQL, NextAuth v5 JWT.

Features: dashboard quick-log, timeline, growth charts (WHO percentiles),
stats, journal/notes, doctor notes, milestones, vaccinations, settings,
superadmin panel. Mobile-first with sidebar nav + bottom nav + quick-add FAB.
Dark mode, PWA push notifications, multi-family invite system.

Docker: multi-stage Dockerfile + docker-compose with postgres service.
2026-06-13 01:52:46 +02:00