Commit graph

4 commits

Author SHA1 Message Date
Till JS
1e992d3c92 feat(sleep): add sleep module with tracking, hygiene checklists, and stats
New "Sleep/Schlaf" module for daily sleep tracking with morning quick-log,
quality ratings, sleep hygiene evening checklists, and comprehensive stats.

Includes: 10 preset hygiene checks, upsert-by-date entries, week bar chart
with goal line, sleep debt calculation, consistency score (stddev-based),
streak tracking, 30-day quality heatmap, and hygiene-quality correlation.

Dashboard shows last night summary, week overview, stats grid, and hygiene
impact. Morning log has smart defaults, star rating, interruption counter,
tag chips. Hygiene checklist supports custom user-created checks.

Registered in module-registry, encryption registry (4 tables), database v13,
seed-registry, app-icons (moon icon, indigo), mana-apps, and workbench.

Also updates MODULE_IDEAS.md with stretch (built), posture, skin, eyes entries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 21:19:52 +02:00
Till JS
a91a6076cc refactor: rename planta → plants, clean up codebase
- Rename planta module to plants everywhere (routes, modules, API,
  branding, i18n, docker, docs, shared packages)
- Fix package name collisions: @mana/credits-service, @mana/subscriptions-service
  (unblocks turbo)
- Extract layout composables: use-ai-tier-items, use-sync-status-items,
  RouteTierGate (layout 1345→1015 lines)
- Create shared DB pool for apps/api (lib/db.ts), migrate 5 modules
- Add automations module queries.ts with useAllAutomations/useEnabledAutomations
- Remove debug console.log statements from production code
- Rename storage display name: Ablage → Speicher

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:59:44 +02:00
Till JS
d6a1c9fd8b feat(drink): add beverage tracking module with inline editing
New module for tracking all beverages (water, coffee, tea, juice, alcohol, etc.)
with daily progress bar, quick-tap presets, and inline editing of quantity/date/time.

Includes: module config, types, collections with guest seed (5 presets),
queries, store, ListView with context menus, route, app-registry registration,
Dexie schema v7, encryption registry, shared-branding icon/app entry.

Also extends docs/future/MODULE_IDEAS.md with additional module ideas.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:41:06 +02:00
Till JS
a412ccc6fb feat(mana/web/body): new module — combined fitness training + body comp tracking
Adds the unified Body module that merges what would otherwise be two
separate apps (fitness + bodylog) into one. The value lives in their
intersection: tracking lifts alongside bodyweight is what enables
real progressive-overload + recomp insights, and shared primitives
(charts, time series, units, photos) avoid duplicating UI surface.

This commit lands only the data layer + module registration so the
follow-up UI / route / dashboard widget can build on a stable
foundation.

Tables (db.version(2), already in place):
  bodyExercises    — exercise library (Squat, Bench, Deadlift, OHP,
                     Row, Pull-Up seeded as presets)
  bodyRoutines     — saved workout templates
  bodyWorkouts     — one logged training session
  bodySets         — set rows inside a workout, indexed [workoutId+order]
  bodyMeasurements — weight + measurements over time, indexed [type+date]
  bodyChecks       — daily energy/sleep/soreness/mood self-rating,
                     upserted per day
  bodyPhases       — cut/bulk/maintenance/recomp phase markers, with
                     auto-close on phase change so the "active phase"
                     view always has at most one open row

Encryption (registry.ts): all 7 tables flipped to enabled. Health
data is GDPR Art. 9 special-category, so user-typed text + the
sensitive numeric fields (weight, reps, value, startWeight,
targetWeight, energy/sleep/soreness/mood) are wrapped. Indexed
columns (ids, FKs, ordering, dates, kind/type/equipment enums)
stay plaintext so the existing query layer keeps working without
decrypt-on-every-row.

Module wiring:
  - bodyModuleConfig added to module-registry.ts
  - Body app entry registered in shared-branding mana-apps.ts
    (red→orange icon to set it apart from the green health-adjacent
    modules and the pink cycles icon)
  - APP_ICONS.body added (dumbbell + heart-pulse hybrid SVG)

Also captures the broader module-ideas brainstorm in
docs/future/MODULE_IDEAS.md and marks fitness + bodylog as merged
into the new body module.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:28:19 +02:00