@davoodmehraban89 / LifeMate / commits / 230d125
Fork 0

LifeMate — Personal, Family & Learning Companion

docs: specify final Feature 1

davoodmehraban89 committed Oct 5, 2026 at 19:38 UTC 230d1251a04986bb54e8275f2ca729e3b5af0b80
1 file changed +43
docs/superpowers/specs/2026-10-05-iran-family-learning-hub-design.md new
+43
@@ -0,0 +1,43 @@
1 +# Feature 1 — Iranian Family & Learning Hub Design
2 +
3 +## Intent
4 +Complete LifeMate's owner-testable family/school/planner experience for an Iranian household. A household can explicitly identify mother, father and children; a child can carry age/sex and Iranian education stage/grade; school setup can use a grade-aware curriculum catalog; planning is Jalali-first with Iranian week semantics and official-event metadata; sensitive menstrual tracking remains strictly private.
5 +
6 +## Architecture
7 +Add one final migration and a focused `phase6` API router rather than restructuring existing phases. Keep current technical authorization roles as the security layer and add household persona as profile metadata. Add canonical education/catalog tables that are safe to seed and user-specific enrollment/profile tables. Flutter consumes the new APIs through a dedicated final-feature surface while retaining Phase 3/4 flows.
8 +
9 +## Privacy and security
10 +- `menstrual_cycle_entry` is owner-only: no family or guardian read endpoint.
11 +- Household persona is presentation metadata; it never grants authorization by itself.
12 +- Child education profile writes require owner or active guardian relationship.
13 +- Textbook catalog stores metadata and official-source URLs, not copyrighted PDF binaries.
14 +- External textbook links are restricted to HTTPS and trusted official hosts.
15 +- Notification preferences are per-user; sensitive reminder previews default off.
16 +
17 +## Iranian education model
18 +Stages: `primary_1` (grades 1–3), `primary_2` (4–6), `secondary_1` (7–9), `secondary_2` (10–12). Store canonical national grade 1–12. Grade 7 maps to `secondary_1`, local year 1.
19 +
20 +The Grade 7 starter catalog includes Persian, Writing, Mathematics, Experimental Sciences, Social Studies, Arabic, Quran, Heavenly Messages, English, Work & Technology, Thinking & Lifestyle, and Physical Education/Health. Catalog rows are versioned by school year and can be updated without changing user records.
21 +
22 +## Textbooks
23 +LifeMate may show catalog metadata and links to official Ministry textbook distribution sources (for example `chap.sch.ir`) and may support user-initiated lawful download/import later. The repository will not embed textbook PDFs unless redistribution rights are verified.
24 +
25 +## Calendar
26 +- Jalali is the default presentation calendar for Iranian locale.
27 +- Week starts Saturday; Thursday/Friday are configurable weekend defaults, with Friday treated as the statutory weekly holiday in the seeded policy.
28 +- Official-event records are versioned by Jalali year and source provenance. 1405 data provenance points to the official calendar process (Calendar Center, Institute of Geophysics, University of Tehran / Supreme Council of Cultural Revolution approvals).
29 +- Calendar data is data-driven so later annual updates do not require UI rewrites.
30 +
31 +## Notifications
32 +Per-user preferences cover in-app banner, push eligibility, reminder categories and sensitive-preview suppression. Existing reminder claims remain the delivery queue until a production push provider is configured.
33 +
34 +## Menstrual tracking
35 +Optional owner-private entries record start/end dates, symptoms/notes, predicted-next date and reminder opt-in. This is a personal wellness organizer, not diagnosis or contraception/fertility advice.
36 +
37 +## Release acceptance
38 +1. Existing regression suite remains green.
39 +2. New schema/contract tests pass.
40 +3. Flutter format/analyze/tests pass.
41 +4. Web release build and Android APK build pass and artifacts are retained in CI.
42 +5. iOS source compiles conceptually through Flutter project configuration; signed iOS binary remains gated on macOS + Apple signing credentials.
43 +6. No production/public deployment occurs automatically.
\ No newline at end of file