Zielarchitektur fuer eine vermarktbare mobile Fitness-App
Diese Konsole beschreibt die neue Produktausrichtung: Mobile zuerst, mehrere Nutzer mit Login, modulare API, spaeteres Billing und ein optionales Admin-Web.
apps/mobile
primaryPrimary surface for workouts, diary, body and health tracking.
apps/api
coreCentral module boundary for auth, data, media, health and billing.
apps/web
optionalOptional admin, debug, support and internal product tooling surface.
Produktmodule
Explizite Modulgrenzen fuer mobile-first, mehrnutzerfaehiges Wachstum.
| Modul | Aufgabe | Primaere Flaeche | Entities |
|---|---|---|---|
Authauth | Login, session lifecycle, roles and device trust | shared | AuthSession |
Usersusers | User account, profile and preferences | mobile | User, Profile |
Workoutworkout | Exercises, plans, sessions, sets and logging | mobile | Exercise, WorkoutPlan, WorkoutSession, WorkoutSet |
Journaljournal | Training diary, reflection and recovery notes | mobile | JournalEntry |
Bodybody | Body measurements and composition tracking | mobile | BodyMeasurement |
Healthhealth | Blood pressure and additional health metrics | mobile | BloodPressureEntry, HealthRecord |
Mediamedia | Workout videos, processing and asset ownership | mobile | MediaAsset |
Billingbilling | Plans, subscriptions, entitlements and provider events | shared | Subscription |
Adminadmin | Operations, support and internal product tooling | web | n/a |
Datenmodelle
BloodPressureEntry bleibt ausdruecklich eigenstaendig im Health-Modul.
| Datenmodell | Modul | Kernfelder |
|---|---|---|
| AuthSession | auth | id, userId, token, createdAt, expiresAt, lastActiveAt |
| User | users | id, email, passwordHash, status, role, createdAt, updatedAt, lastLoginAt |
| Profile | users | id, userId, displayName, birthDate, sex, heightCm, primaryGoal, experienceLevel, unitsPreference, avatarAssetId |
| Subscription | billing | id, userId, planCode, status, provider, providerCustomerId, providerSubscriptionId, startedAt, cancelledAt, renewalAt |
| Exercise | workout | id, slug, name, category, movementPattern, equipment, isUnilateral, instructions, mediaAssetIds |
| WorkoutPlan | workout | id, userId, name, goal, visibility, durationWeeks, daysPerWeek, blocks, createdBy |
| WorkoutSession | workout | id, userId, workoutPlanId, title, startedAt, endedAt, durationSeconds, perceivedEffort, notes, status |
| WorkoutSet | workout | id, workoutSessionId, exerciseId, orderIndex, setType, repetitions, weightValue, distanceMeters, durationSeconds, restSeconds, rir, notes |
| JournalEntry | journal | id, userId, workoutSessionId, entryDate, mood, energyLevel, stressLevel, sleepQuality, notes |
| BodyMeasurement | body | id, userId, measuredAt, measurementType, value, unit, source, note |
| BloodPressureEntry | health | id, userId, measuredAt, systolic, diastolic, pulse, position, arm, note, source |
| MediaAsset | media | id, userId, ownerType, ownerId, kind, storageProvider, storageKey, durationSeconds, mimeType, processingStatus, createdAt |
| HealthRecord | health | id, userId, metricType, recordedAt, value, unit, source, provider, externalId, metadata |
Roadmap
Technisch sinnvolle Reihenfolge fuer den Produktausbau.
1. Architecture foundation - Freeze product modules, shared contracts and mobile-first platform boundaries.
2. Auth and users - Introduce login, profiles, roles and multi-user account lifecycle.
3. Workout engine - Support exercises, workout plans, sessions and per-set logging.
4. Journal and body tracking - Add training diary, body measurements and explicit blood pressure tracking.
5. Health integrations - Prepare Apple Health and Apple Watch ingestion through provider adapters.
6. Media workflows - Link workout videos to exercises and completed sessions.
7. Billing and entitlements - Introduce subscriptions, PayPal provider events and feature access control.
8. Admin console - Expand the optional web surface for support, analytics and operations.
Runtime Kontext
Die bestehende Dev-Umgebung bleibt erhalten, wird aber neu fachlich ausgerichtet.
- Domain
- dev-gym.weismehl.de
- Umgebung
- Development
- API Base URL
- /api
- Integrationen
- manual, apple_health, apple_watch, paypal