LifeMate — Personal, Family & Learning Companion
fix/local-task-persistence
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
| 1 | # Feature 1 — Iranian Family & Learning Hub Implementation Plan |
| 2 | |
| 3 | > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. |
| 4 | |
| 5 | **Goal:** Deliver the final owner-testable Iranian family, education, Jalali calendar, reminder-preference and private cycle-tracking feature set. |
| 6 | |
| 7 | **Architecture:** Extend the existing phase-based backend with `0005` + `phase6.js`, expose a compact API client surface, and add a focused Flutter hub without restructuring earlier phases. Preserve existing authorization as the security authority. |
| 8 | |
| 9 | **Tech Stack:** PostgreSQL, Node/Express, Flutter/Dart, GitHub Actions. |
| 10 | |
| 11 | **Spec:** `docs/superpowers/specs/2026-10-05-iran-family-learning-hub-design.md` |
| 12 | |
| 13 | ## Global Constraints |
| 14 | - No public production deployment. |
| 15 | - No copyrighted textbook PDF binaries committed without verified redistribution rights. |
| 16 | - Menstrual entries owner-only. |
| 17 | - Persona metadata never grants authorization. |
| 18 | - Jalali week begins Saturday for Iranian locale. |
| 19 | |
| 20 | ## Review Focus |
| 21 | - Guardian attempting to read private cycle data must have no route/capability. |
| 22 | - Invalid grade/stage combinations must be rejected. |
| 23 | - Grade 7 must map to secondary first cycle, local year 1. |
| 24 | - Sensitive notification preview defaults off. |
| 25 | - External textbook URLs must be trusted HTTPS sources. |
| 26 | |
| 27 | --- |
| 28 | |
| 29 | ### Task 1: Red-first contracts |
| 30 | **Files:** create `backend/tests/phase6_contract.test.js`, `backend/tests/phase6_schema_test.sql`; create Flutter pure-model tests. |
| 31 | - [ ] Add failing contract/schema tests for required files/tables/guardrails. |
| 32 | - [ ] Push and observe CI failure before implementation. |
| 33 | |
| 34 | ### Task 2: Data model and seed catalog |
| 35 | **Files:** create `backend/migrations/0005_iran_family_learning.sql`. |
| 36 | - [ ] Add persona, education profile, curriculum/textbook, official calendar, notification preference and cycle tables. |
| 37 | - [ ] Seed stage/grade mapping and Grade 7 curriculum metadata. |
| 38 | - [ ] Run migration/schema gates. |
| 39 | |
| 40 | ### Task 3: API |
| 41 | **Files:** create `backend/src/phase6.js`; modify `backend/src/server.js`. |
| 42 | - [ ] Implement authenticated owner/guardian-safe profile APIs. |
| 43 | - [ ] Implement catalog/calendar/preferences APIs. |
| 44 | - [ ] Implement owner-only cycle CRUD/list API. |
| 45 | - [ ] Run backend tests and syntax checks. |
| 46 | |
| 47 | ### Task 4: Flutter integration |
| 48 | **Files:** create `apps/lifemate/lib/iran_hub.dart`; modify `api.dart`, `phase3_ui.dart`, navigation as required. |
| 49 | - [ ] Add education/persona setup. |
| 50 | - [ ] Add Jalali-first calendar/event view. |
| 51 | - [ ] Add textbook/catalog view using official metadata links. |
| 52 | - [ ] Add notification settings and private cycle tracker. |
| 53 | - [ ] Run format/analyze/widget tests. |
| 54 | |
| 55 | ### Task 5: Release outputs |
| 56 | **Files:** modify `.github/workflows/ci.yml`, release docs/state. |
| 57 | - [ ] Retain Web release bundle and Android APK as CI artifacts. |
| 58 | - [ ] Document iOS signing gate and build command. |
| 59 | - [ ] Run full CI and verify all jobs. |
| 60 | - [ ] Open PR, review diff/security, merge only after green CI. |
| 61 | - [ ] Verify post-merge main CI. |