LifeMate — Personal, Family & Learning Companion

fix/study-duration-display
chore/phase1-repository-cleanup deploy/stable-web-apk deployment-static design/mobile-accessibility-v2 design/mobile-navigation-review docs/child-education-access-decision docs/offline-data-rescue-options docs/owner-guide-and-delivery-plan docs/phase1-policy-options docs/public-review-live-2026-10-15 feat/aparat-learning-library feat/child-device-safety feat/child-identity-schema feat/flutter-mobile-navigation feat/learning-content-operations feat/local-signing-preflight feat/online-family-stage0 feat/personal-encrypted-recovery feat/private-planner-series-api feat/public-review-page feat/standalone-weekly-planner feat/weekly-planner-android final-feature-1/iran-family-school fix/auth-abuse-expiry-safety fix/auth-expiry-after-lock fix/backend-request-safety fix/lifeguide-bootstrap-naming-ci fix/lifeguide-pages-qa-base-preflight fix/lifeguide-qa-pages-env-deployment fix/local-task-persistence fix/managed-child-session-boundary fix/personal-jalali-dates fix/personal-notification-controls fix/personal-upgrade-delivery-guard fix/sms-approval-gates fix/study-duration-display infra/cloudflare-neon-migration infra/lifeguide-cloudflare-qa infra/lifeguide-github-pages-qa infra/lifeguide-supabase-qa main phase-1/foundation-completion phase-2/product-foundation-identity phase-3/planner-school-family-core phase-4/ai-learning-wellbeing phase-5/hardening-observability-release test/android-reminder-acceptance test/personal-notification-settings test/personal-recovery-acceptance test/role-entry-apk
md 49 lines 2.87 KB
Rendered Raw
1 **Historical snapshot — retained as decision/evidence history. Current product: LifeGuide; current execution status: PROJECT_STATE.md.**
2
3 # LifeMate — Phase 2 Implementation Blueprint
4
5 ## Repository structure
6 ```text
7 apps/lifemate/ Flutter application (Android + Web/PWA)
8 lib/
9 app/ bootstrap, routing, theme, localization
10 features/auth/
11 features/profile/
12 features/family/
13 shared/
14 web/ manifest, icons, PWA integration
15 test/
16 backend/
17 migrations/ standard PostgreSQL schema + constraints/policies
18 tests/ authorization/database tests
19 README.md API/identity adapter contract
20 docs/ product, UX, architecture, safety, quality, decisions
21 .github/workflows/ CI and staging verification
22 ```
23
24 ## Architecture style
25 Feature-oriented Flutter modules behind application repositories. Flutter never receives privileged database credentials. A server/API boundary owns identity-session validation and relationship-aware authorization. PostgreSQL is the durable relational source of truth. Managed database, identity, email, storage and realtime providers are adapters rather than domain dependencies.
26
27 ## Environments
28 At minimum: **local**, **staging**, **production**. Staging and production use separate database credentials/data. Environment-specific public API configuration is injected at build/deploy; privileged credentials exist only in server/CI secret stores. Real `.env` files are never committed.
29
30 ## Phase 2 vertical slice
31 1. App shell + Persian RTL + role/profile-aware theme.
32 2. Email/password auth contract + verification/recovery/change-password UX.
33 3. Profile creation/editing.
34 4. Family Workspace + invitation + membership.
35 5. Guardian relationship and baseline server authorization contract.
36 6. Teen/Parent authenticated home shells.
37 7. CI and isolated PostgreSQL staging smoke.
38
39 ## Student navigation baseline
40 MyStudyLife is the primary information-architecture benchmark for the student surface. Direct destinations remain visible for Today, Schedule, Calendar, Tasks, Exams/Grades, Focus and AI; LifeMate Family/Wellbeing extensions are additive rather than hiding these core destinations behind a generic School layer.
41
42 ## PWA integration
43 Own `manifest.json`, branded icons/apple-touch-icon, standalone metadata, install guidance and explicit service-worker strategy. Push is capability-detected and is not required for Phase 2 identity acceptance.
44
45 ## Configuration rule
46 Any credential that can read another user's private data, administer identity, send privileged email, or bypass authorization is server-only.
47
48 ## Migration rule
49 Schema, constraints and authorization-relevant database changes travel together in versioned PostgreSQL migrations and tests. Destructive migrations require explicit approval and rollback/backup consideration.