LifeMate — Personal, Family & Learning Companion

phase-1/foundation-completion
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 46 lines 2.48 KB
Rendered Raw
1 # LifeMate — Phase 2 Implementation Blueprint
2
3 ## Proposed repository structure
4 ```text
5 apps/lifemate/ Flutter application (Android + Web/PWA)
6 lib/
7 app/ bootstrap, routing, theme, localization
8 features/auth/
9 features/profile/
10 features/family/
11 shared/ reusable UI/domain utilities with strict scope
12 web/ manifest, icons, bootstrap, custom SW/web integration
13 test/
14 supabase/
15 migrations/ versioned schema + grants + RLS
16 functions/ privileged server workflows; no client secrets
17 tests/ database/RLS allow+deny tests
18 docs/ product, UX, architecture, safety, quality, decisions
19 .github/workflows/ CI after scaffold
20 ```
21
22 ## Architecture style
23 Feature-oriented Flutter modules with domain/service boundaries; avoid a giant shared layer. UI may validate and cache, but backend policies are authoritative for permissions. Supabase is accessed through repository/service interfaces so AI/provider logic and complex privileged workflows remain server-side.
24
25 ## Environments
26 At minimum: **local**, **staging**, **production**. Staging and production use separate Supabase projects/secrets/data. Environment-specific public configuration is injected at build/deploy; secrets/service-role/provider keys exist only in server secret stores. `.env` with real credentials is never committed.
27
28 ## Phase 2 first vertical slice
29 1. App shell + localization/RTL + theme.
30 2. Email/password auth + verification/recovery/change-password.
31 3. Profile creation.
32 4. Family Workspace + invitation + membership.
33 5. Guardian relationship and baseline permission enforcement.
34 6. Teen/Parent authenticated home shells.
35 7. CI and staging smoke.
36
37 This slice deliberately proves identity and authorization before planner/school data expands the schema.
38
39 ## PWA integration
40 Own `manifest.json`, icons/apple-touch-icon, standalone metadata, install guidance and custom service-worker strategy. Push subscription is capability-detected and implemented only after the core auth/family slice is stable.
41
42 ## Configuration rule
43 Public client identifiers are separated from secrets. Any credential that bypasses RLS or accesses AI/email/push provider privileged APIs is server-only.
44
45 ## Migration rule
46 Schema/grant/RLS changes travel together in versioned migrations and include database tests. Destructive migrations require explicit approval and rollback/backup consideration.