@davoodmehraban89 / LifeMate / commits / 32952da
Fork 0

LifeMate — Personal, Family & Learning Companion

docs: align LifeGuide state and remove obsolete repair workflow

Quinn White committed Oct 15, 2026 at 22:07 UTC 32952da625120240df30945e98e7aa73992c6ea9
25 files changed +178 -95
.github/workflows/fix-unused.yml deleted
-19
@@ -1,19 +0,0 @@
1 -name: Fix Final Unused
2 -on:
3 - push:
4 - branches: ['final-feature-1/iran-family-school']
5 -permissions:
6 - contents: write
7 -jobs:
8 - fix:
9 - runs-on: ubuntu-latest
10 - steps:
11 - - uses: actions/checkout@v4
12 - with: {ref: final-feature-1/iran-family-school}
13 - - run: |
14 - python - <<'PY'
15 - from pathlib import Path
16 - p=Path('apps/lifemate/lib/iran_hub.dart');s=p.read_text().replace("final profile=s.data![0],prefs=s.data![3];","final prefs=s.data![3];");p.write_text(s)
17 - PY
18 - if git diff --quiet; then exit 0; fi
19 - git config user.name 'github-actions[bot]'; git config user.email '41898282+github-actions[bot]@users.noreply.github.com'; git add apps/lifemate/lib/iran_hub.dart; git commit -m 'fix: remove unused profile local'; git push origin HEAD:final-feature-1/iran-family-school
AGENTS.md
+5 -2
@@ -1,7 +1,7 @@
1 -# LifeMate — Operating Rules
1 +# LifeGuide / لایف‌گاید — Operating Rules
2
3 ## Mission
4 -Build LifeMate as a maintainable, secure, attractive personal/family/learning companion. The product starts with a teen-and-family use case but must not be hard-coded to one family, one age, or one school year.
4 +Build LifeGuide as a maintainable, secure, attractive personal/family/learning companion. The product starts with a teen-and-family use case but must not be hard-coded to one family, one age, or one school year. The repository remains `davoodmehraban89/LifeMate`; repository paths, database identifiers and JWT issuer/audience are not product copy and must not be renamed by a branding sweep.
5
6 ## Coordination model
7 The coordinating project lead owns prioritization, dependencies, integration, conflict resolution, and final delivery. Five specialist ownership areas are active:
@@ -45,6 +45,9 @@ A tool or connector is not an agent. GitHub, Figma, Canva, Supabase, Context7, P
45 - Run applicable tests, lint, static analysis and builds before declaring implementation complete.
46 - Use staging before production.
47 - Production deploys, destructive data operations, high-risk schema migrations, public release, paid actions, and sensitive access changes require explicit authorization relevant to that action.
48 +- Stop and report at the end of each owner-defined phase. Merge and deployment require explicit approval for that action; approval to start a phase does not authorize either.
49 +- Privacy, AI and infrastructure policy choices require an options/decision document and owner approval before implementation.
50 +- Report executed checks as VERIFIED with their command/output; label checks that were not run UNVERIFIED.
51 - Secrets must not be committed to the repository or copied into documentation; use environment/secret management.
52 - Keep authoritative security and permission rules on the backend; client logic may support UX/offline behavior but cannot be the security boundary.
53
CHANGELOG.md
+10
@@ -1,5 +1,15 @@
1 # Changelog
2
3 +## Unreleased — Phase 1 repository cleanup
4 +- Aligned current entry documents with the final LifeGuide / لایف‌گاید name and the completed Phase 0 audit; online/device acceptance remains unverified.
5 +- Removed the obsolete branch-specific self-committing unused-variable workflow.
6 +- Assigned the frontend ADR a date-based identifier to resolve duplicate ADR 0004, preserving the decision and historical backend ADRs.
7 +- This documentation/workflow cleanup does not change the backend version, runtime, database, hosting or public site.
8 +
9 +## 0.4.0 — Existing backend baseline
10 +- Matches `backend/package.json` on the audited main baseline; this heading is not a new release or deployment.
11 +- Existing Feature 1 includes Iranian family/education settings, textbook catalog metadata, the 1405 calendar and notification preferences. Audit findings and current safety gates limit release readiness.
12 +
13 ## 0.3.0 — Phase 5 candidate
14 - Added production-entrypoint request correlation, privacy-safe structured HTTP telemetry and security headers.
15 - Added configurable general/auth/AI rate limiting with `Retry-After` responses.
PROJECT_STATE.md
+23 -13
@@ -1,25 +1,35 @@
1 -# LifeGuide / لایف‌گاید — وضعیت انتشار صفحه معرفی
1 +# LifeGuide / لایف‌گاید — وضعیت پروژه
2
3 -Updated: 2026-10-15. مخزن `davoodmehraban89/LifeMate` حفظ می‌شود. این شاخه `feat/public-review-page` بر مبنای main در `abdc9d9d032bc6746c8390b902a2e52d82991530` است؛ تغییرات Backend و Flutter از PRهای دیگر وارد این انتشار نمی‌شوند؛ دو اصلاح کوچک برای رفع خطاهای پایه CI انجام شد: حذف import استفاده‌نشده تست و نمایش راهنمای حداقل۱۰کاراکتر در فرم ثبت‌نام؛ Backend/DB/OTP تغییر نمی‌کنند.
3 +Updated: 2026-10-15. مخزن `davoodmehraban89/LifeMate` حفظ می‌شود. مبنای این بسته، `main` در `64b938dc9b0c3bb3620a7a12c22c690313d75bd7` و Backend نسخه `0.4.0` است. نام نهایی محصول LifeGuide است؛ schema و JWT issuer/audience در این پاکسازی تغییر نمی‌کنند.
4
5 -## هدف جاری
5 +## فاز جاری و حدود مجوز
6
7 -مالک صفحه عمومی قابل مشاهده برای بررسی الگوی ورود پیامکی کاوه‌نگار `lifeguideotp` در `https://app.lifeguide.ir/` خواسته است. انتشار صفحه معرفی درخواستی مجاز است؛ دستور قبلی مالک درباره عدم merge نهایی بدون تأیید صریح حفظ می‌شود. محیط `github-pages` فعلی فقط `main` را مجاز می‌کند؛ policy گسترش داده نمی‌شود. ابتدا محتوا و workflow آزموده، PR باز و سپس تأیید نهایی همان PR درخواست می‌شود.
7 +فاز۰ ممیزی پایان یافت؛ مالک پس از دریافت گزارش، شروع فاز۱ را تأیید کرد. فاز۱ ایمنی و پاکسازی در حال انجام است و در پایان باید متوقف و گزارش شود. این PR فقط مستندات و حذف workflow منسوخ را در بر می‌گیرد؛ اصلاح runtime، migration، merge یا deploy انجام نمی‌دهد.
8
9 -صفحه `site/review` فارسی RTL، معرفی محصول/هدف، حریم خصوصی، شرایط و مسیر پشتیبانی دارد. ورود پیامکی در انتظار فعال‌سازی است؛ این سایت شماره/فرم/داده خصوصی یا سرویس AI جمع‌آوری نمی‌کند. GitHub Pages میزبانی HTML و Actions انتشار را انجام می‌دهند؛ Backend/PostgreSQL و OTP واقعی باید جدا عملیاتی شوند. صفحه معرفی، نسخه کامل آنلاین اپلیکیشن نیست.
9 +تصمیم‌های سرپرستی/رضایت و ورود کودک، مرز داده والد، AI/بحران، چرخه و محل نگهداری داده، و زیرساخت باید ابتدا با گزینه‌ها مستند و جدا تأیید شوند. شروع فاز مجوز انتخاب این سیاست‌ها یا انتشار نیست.
10
11 -اصلاح مورد درخواست مالک: هیچ لینک یا معرفی مخزن، سورس، گیت‌هاب یا حساب توسعه‌دهنده در صفحه‌های عمومی مجاز نیست؛ خصوصی‌کردن احتمالی آینده مخزن در نظر گرفته می‌شود. ارجاع‌های قبلی از هر چهار صفحه و شناسه‌های commit/run از metadata عمومی حذف شدند. راه پشتیبانی تا تعیین کانال واقعی در انتظار فعال‌سازی است. الزام قانونی مجوز فونت شخص ثالث حفظ می‌شود؛ این مجوز به سورس محصول اشاره ندارد. checker این مرز را قبل و بعد از تولید metadata بررسی می‌کند.
11 +## آنچه با شواهد فاز۰ ثبت شده است
12
13 -## تصحیح وضعیت دیتابیس: Supabase موجود
13 +[خلاصه فاز۰](docs/audits/2026-10-15-phase0-summary.md) بر پایه اجرای ممیزی و خروجی‌های تحویل‌شده است؛ این بسته آن تست‌ها را بازاجرا معرفی نمی‌کند.
14
15 -طبق اعلام تازه مالک و [ممیزی خواندنی واقعی](docs/audits/2026-10-15-supabase-current-state.md)، دیتابیس QA پروژه به Supabase منتقل شده است: LifeGuide-QA، ACTIVE_HEALTHY، PostgreSQL17.11، schema خصوصی lifeguide_qa با۵۹ جدول و تاریخچه سه گروه Migration شامل۰۰۰۱ تا۰۰۲۰. Railway مقصد ادامه کار نیست؛ referenceهای باقی‌مانده main دلیل عملیاتی‌بودن آن نیستند و نباید بازفعال شوند.
15 +- **VERIFIED در فاز۰:** `main` شش migration دارد؛ Backend آن ۱۳ و Flutter آن ۵ تست موفق داشت. کنترل قالب‌بندی `main` با شش فایل نیازمند تغییر شکست خورد.
16 +- **VERIFIED در فاز۰:** snapshot ادغام‌نشده PR16، `2c3ea97e69bc8f60f1524fab9357b377517a7bbb`، در دو اجرای جدا مجموع ۲۶۱ تست Backend و ۲۱۲ تست Flutter موفق داشت. این نتایج به معنی ادغام یا نسخه آنلاین نیست.
17 +- **VERIFIED در فاز۰:** Supabase QA موجود شامل ۵۹ جدول و ledger بیست migration مطابق هش منبع بود؛ RLS روی همه فعال و اجباری بود. فقط metadata و ledger خوانده شدند؛ اتصال کامل Express با نقش محدود به همین schema **UNVERIFIED** است. Railway مقصد ادامه کار نیست؛ ارجاع تاریخی، مجوز بازفعال‌سازی نیست.
18 +- **VERIFIED در فاز۰:** هر ۱۱ PR باز و ۲۵ شاخه بررسی شدند؛ قابلیت‌های قابل استفاده مجدد در شاخه‌ها وجود دارند. ادغام کور زنجیره، به‌ویژه workflowهای Pages که ممکن است سایت معرفی را بازنویسی کنند، مجاز نیست.
19 +- **VERIFIED در فاز۰:** اسکن تاریخچه reachable با Gitleaks سی مورد داشت؛ پس از بررسی به ثابت‌های مصنوعی تست و کلیدهای ساختاری محتوا مربوط بودند. کلید زنده مشخصی برای rotation شناسایی نشد؛ نبود هر نوع secret در تمام منابع ادعا نمی‌شود.
20
17 -این تأیید فقط وجود دیتابیس و وضعیت ساختار QA است. نسخه Pages فعلی static-only و API آن عمداً غیرفعال است؛ اتصال واقعی ورود/خانواده/Android/PWA/OTP به این دیتابیس هنوز UNVERIFIED است. صفحه معرفی PR۲۰ مستقل از دیتابیس باقی می‌ماند؛ اطلاعات زیرساخت در صفحه عمومی معرفی نمی‌شود. هیچ داده واقعی، Migration، secret یا سرویس زنده تغییر نکرد.
21 +## صفحه معرفی عمومی
22
19 -## مانع فعلی دامنه
23 +PR20 قبلاً با تأیید مالک در `main` ادغام شد. مشاهده خواندنی اجرای Pages `38699023347` برای commit مبنا، `build:success` و `deploy:success` را ثبت کرد. منبع سایت `site/review` است و ورود/API/SMS یا داده خصوصی ندارد؛ صفحه معرفی نسخه آنلاین خانواده نیست. این PR به فایل‌های عمومی سایت دست نمی‌زند.
24
21 -مشاهده قبلی [ممیزی خواندنی۱۵اکتبر](docs/audits/2026-10-15-pages-dns.md): DNS عمومی app، دو IP آروان را برمی‌گرداند و CNAME عمومی ندارد؛ Pages روی دامنه درست تنظیم است ولی گواهی ندارد. HTTP200 فعلی صرفاً loader قدیمی LifeMate است و معرفی قابل بررسی ندارد. تنظیم مورد نیاز: `CNAME app → davoodmehraban89.github.io` با proxy/CDN خاموش (DNS-only). رکورد فعلی ممکن است CNAME پروکسی‌شده باشد؛ باید مقصد بررسی و proxy خاموش شود. NS، دامنه اصلی، ایمیل و TXT دست نمی‌خورند. دسترسی متصل به پنل آروان در اختیار تیم نیست. در بررسی بعدی07:20UTC، دامنه برای / و config.json و health پاسخ404 داد؛ علت DNS/انتشار هنوز جدا نیاز به بررسی دارد و وضعیت قبلی HTTP200 تضمین وضعیت جاری نیست.
25 +PR21، `docs/public-review-live-2026-10-15`، مستندات تکمیلی همان انتشار و شواهد DNS/HTTPS را دارد و هنوز باز است. README و PROJECT_STATE این بسته با آن همپوشانی دارند؛ پیش از هر ادغام، متن وضعیت جاری باید reconcile و شواهد اختصاصی PR21 حفظ شوند. این بسته PR21 را ادغام، بسته یا کامل کپی نمی‌کند.
26
23 -[راهنمای انتشار و DNS](docs/operations/PUBLIC_REVIEW_PAGE.md). شواهد اجراهای محلی و CI هر نسخه در [گزارش آزمون](docs/audits/2026-10-15-public-review-verification.md) ثبت می‌شود؛ CI اصلاح فعلی تا دریافت نتیجه تازه و deploy عمومی تا اجرای واقعی UNVERIFIED است؛ وضعیت تأیید کاوه‌نگار و دسترسی ایران نیز UNVERIFIED می‌ماند. هیچ پیام/تیکتی برای کاوه‌نگار ارسال نشده است.
27 +## Feature 1 و موانع تحویل
28
25 -[checkpoint قدیمی۵اکتبر](docs/history/2026-10-05-project-state.md) تاریخی است؛ عنوان‌های COMPLETE/READY آن گواه آماده‌بودن عمومی امروز نیستند. توسعه آنلاین خانواده و آموزش در شاخه‌های مستقل ادامه دارد؛ PRهای آن‌ها ادغام نشده‌اند. Feature1، مدل پروفایل/خانواده و schema/JWT فعلی در این بسته تغییر نمی‌کنند. AI/voice خارجی و داده حساس کودک وارد این وب‌سایت نمی‌شوند.
29 +مدل هویت، پروفایل/خانواده و سرپرست، planner، مدرسه، offline queue و خانواده/آموزش ایران از قبل وجود دارند. [تحویل تاریخی Feature 1](docs/final/DELIVERY.md) فهرست مسیرهای قبلی است؛ امنیت، رضایت یا پذیرش فعلی آن را ثابت نمی‌کند. بازسازی این بخش‌ها هدف فاز جاری نیست.
30 +
31 +P0های مجوز سرپرستی/رضایت، مشتقات چت خصوصی، AI و داده حساس؛ و P1های auth، نشست، validation و sync هنوز نیازمند اصلاح/تصمیم‌اند. نسخه کوچک هدف بعدی به ورود موبایلی، خانواده/کودک، برنامه روزانه، مطالعه ۲۵/۵، یک درس هفتم با آزمونک ده‌سؤالی و خلاصه محدود والد محدود می‌ماند.
32 +
33 +**UNVERIFIED:** APK تازه و امضای release، Android/Safari واقعی، نصب PWA و ورود والد، SMS کاوه‌نگار، دسترسی از ایران، آزمون چنددستگاهی با قطع واقعی شبکه و اتصال عملیاتی به Supabase. سایت معرفی یا CI سبز جای این پذیرش‌ها نیست.
34 +
35 +[قواعد کار](AGENTS.md)، [پاکسازی و نام‌گذاری](docs/audits/2026-10-15-repository-cleanup.md)، [راهنمای صفحه معرفی](docs/operations/PUBLIC_REVIEW_PAGE.md). اسناد پنج‌فاز قدیمی و [checkpoint پنج اکتبر](docs/history/2026-10-05-project-state.md) تاریخی‌اند؛ عبارت‌های COMPLETE/READY آن‌ها وضعیت تحویل امروز نیستند.
README.md
+22 -24
@@ -1,37 +1,35 @@
1 -# LifeGuide / لایف‌گاید — صفحه عمومی بررسی
1 +# LifeGuide / لایف‌گاید
2
3 -[راهنمای انتشار صفحه، DNS و کاوه‌نگار](docs/operations/PUBLIC_REVIEW_PAGE.md). منبع سایت `site/review` است. وضعیت انتشار و محدودیت‌ها در [PROJECT_STATE](PROJECT_STATE.md) ثبت می‌شوند. این صفحه معرفی، ورود پیامکی یا Backend را فعال معرفی نمی‌کند.
3 +همراه شخصی، آموزشی و خانوادگی برای Android و وب/PWA فارسی راست‌به‌چپ. نام محصول **LifeGuide / لایف‌گاید** است؛ نام مخزن `davoodmehraban89/LifeMate` و شناسه‌های فنی سازگار حفظ می‌شوند.
4
5 -## مستند تاریخی مخزن
5 +## وضعیت واقعی
6
7 -# LifeMate
7 +**فاز۰ ممیزی پایان یافته و فاز۱ ایمنی و پاکسازی با تأیید مالک آغاز شده است. نسخه خانوادگی آنلاین آماده تحویل نیست.** اصلاحات شاخه‌های توسعه به معنی ادغام در `main` یا فعال‌بودن سرویس نیستند.
8
9 -**Personal, Family & Learning Companion**
9 +صفحه معرفی عمومی در `https://app.lifeguide.ir/` از `site/review` ساخته می‌شود. اجرای ثبت‌شده Pages شماره `38699023347` برای commit `64b938d`، build و deploy موفق دارد؛ این مشاهده اجرای قبلی است، نه انتشار تازه این تغییر. این صفحه ورود، API، پایگاه داده یا OTP عملیاتی ارائه نمی‌کند.
10
11 -LifeMate is a cross-platform personal and family companion designed to grow with its users across life stages. The first product focus is a teen-and-family experience combining planning, school organization, learning support, family coordination, and safe AI-assisted wellbeing guidance.
11 +Backend فعلی `main`، Node/Express و PostgreSQL با نسخه `0.4.0` و شش migration است. Supabase QA موجود، بیست migration دارد؛ اتصال کامل Android/PWA و SMS به آن **UNVERIFIED** است. [خلاصه مستند ممیزی فاز۰](docs/audits/2026-10-15-phase0-summary.md) وضعیت `main`، PRها و دیتابیس QA را جدا ثبت می‌کند.
12
13 -## Product principles
13 +## بسته کاری جاری
14
15 -- One identity, multiple life contexts: student, personal, family, and later work/university.
16 -- One Family Workspace with independent member accounts and role-based access.
17 -- Parents can access authorized planning, academic reports, and meaningful support signals without turning the product into continuous surveillance.
18 -- AI assists with planning, learning, reflection, and parent guidance; it does not impersonate a clinician or replace human professional care.
19 -- Android installable app + high-quality iPhone/iPad PWA + responsive web, sharing one backend and data model.
20 -- Persian/RTL quality and an attractive, age-appropriate visual experience are first-class requirements.
21 -- Security, privacy, safety, and auditability are architectural requirements, not post-release additions.
15 +فاز۱ به PRهای کوچک برای اصلاحات فنی و اسناد گزینه‌های تصمیم محدود است. سیاست سرپرستی/رضایت کودک، گزارش والد، AI، داده حساس و زیرساخت تا تأیید سند مربوط تغییر نمی‌کند. هیچ merge یا deploy با تأیید شروع فاز مجاز نمی‌شود.
16
23 -## Current phase
17 +هدف نسخه کوچک بعدی: ورود موبایلی، خانواده و پروفایل کودک، برنامه روزانه و نوبت مطالعه ۲۵/۵، یک درس اصیل پایه هفتم با آزمونک ده‌سؤالی و خلاصه محدود والد. این فهرست هدف است؛ اجرای کامل و پذیرش دستگاه آن **UNVERIFIED** است. Feature 1 موجود برای خانواده/آموزش ایران مبنای استفاده مجدد است؛ اسناد تاریخی آن اثبات ایمنی یا آمادگی انتشار نیستند.
18
25 -**Discovery / Foundation**
19 +## مستندات
20
27 -The repository is intentionally starting with product rules, architecture decisions, and project state before application scaffolding is locked in.
21 +- [قواعد کار و تأییدها](AGENTS.md)
22 +- [وضعیت جاری و محدودیت‌ها](PROJECT_STATE.md)
23 +- [تغییرات؛ نسخه مبنای Backend برابر 0.4.0](CHANGELOG.md)
24 +- [قرارداد Backend](backend/README.md)
25 +- [تصمیم‌های معماری](docs/decisions/)
26 +- [راهنمای صفحه معرفی و دامنه](docs/operations/PUBLIC_REVIEW_PAGE.md)
27 +- [طبقه‌بندی نام‌های قدیمی و پاکسازی مخزن](docs/audits/2026-10-15-repository-cleanup.md)
28
29 -## Repository operating documents
29 +## آزمون صفحه معرفی
30
31 -- [`AGENTS.md`](AGENTS.md) — operating rules and ownership model.
32 -- [`PROJECT_STATE.md`](PROJECT_STATE.md) — current checkpoint and change ledger.
33 -- [`docs/decisions/`](docs/decisions/) — architecture and product decision records.
31 +```bash
32 +python3 scripts/check-review-site.py
33 +```
34
35 -## Working name
36 -
37 -**LifeMate** is approved as the current product name. It may be revisited only through an explicit product decision.
35 +این فرمان فقط مرز فایل‌های صفحه معرفی را می‌سنجد. ساخت APK، ارسال SMS، ورود آنلاین و پذیرش واقعی Android/Safari بررسی‌های جدا هستند. Secrets و اطلاعات واقعی خانواده در مخزن، لاگ، مستندات یا fixture مجاز نیستند.
backend/README.md
+3 -3
@@ -1,13 +1,13 @@
1 -# LifeMate backend contract
1 +# LifeGuide backend contract
2
3 -Phase 2 keeps infrastructure provider-neutral.
3 +This describes the existing backend contract, not online acceptance. The package remains `lifemate-backend`, version `0.4.0`; database identifiers and JWT issuer/audience remain unchanged. [Current project state](../PROJECT_STATE.md) records the Phase 0 findings and Phase 1 scope. Phase 2 keeps infrastructure provider-neutral.
4
5 ## IdentityProvider
6 Required operations: register(email,password), verifyEmail(token), signIn(email,password), requestPasswordReset(email), resetPassword(token,newPassword), changePassword(session,currentPassword,newPassword), revokeSession(session).
7
8 Security requirements: normalized email; non-enumerating recovery response; single-use/time-limited verification and reset tokens stored as digests; modern password hashing in the identity adapter; session rotation/revocation; rate limiting; audit sensitive changes.
9
10 -## LifeMate API authorization
10 +## LifeGuide API authorization
11 Every request resolves an authenticated `app_user`. Family operations evaluate active membership and explicit guardian relationships server-side. `owner_admin` is administrative authority and never grants blanket access to private teen content. Safety-controlled access is a separate audited policy path.
12
13 ## Invitation
docs/ROADMAP.md
+2 -2
@@ -1,6 +1,6 @@
1 -# LifeMate — Five-Phase Roadmap
1 +# LifeGuide — Historical Five-Phase Roadmap
2
3 -**Status:** Active
3 +**Status:** Historical planning baseline; superseded for execution by the owner-defined Phase 0–3 scope in [PROJECT_STATE](../PROJECT_STATE.md). The phase numbers and exit gates below are preserved as history, not current completion claims.
4 **Started:** 2026-10-05
5
6 ## Phase 1 — Foundation, Product Contract & UX Direction
docs/architecture/DOMAIN_MODEL_V1.md
+1 -1
@@ -1,4 +1,4 @@
1 -# LifeMate — Conceptual Domain Model v1
1 +# LifeGuide — Conceptual Domain Model v1
2
3 ## Identity
4 - **Account** — authentication identity; credentials/session are not family-shared.
docs/architecture/PHASE_2_BLUEPRINT.md
+2 -2
@@ -1,4 +1,4 @@
1 -# LifeMate — Phase 2 Implementation Blueprint
1 +# LifeGuide — Phase 2 Implementation Blueprint
2
3 ## Repository structure
4 ```text
@@ -35,7 +35,7 @@ At minimum: **local**, **staging**, **production**. Staging and production use s
35 7. CI and isolated PostgreSQL staging smoke.
36
37 ## Student navigation baseline
38 -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.
38 +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; LifeGuide Family/Wellbeing extensions are additive rather than hiding these core destinations behind a generic School layer.
39
40 ## PWA integration
41 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.
docs/architecture/PWA_PLATFORM_CONSTRAINTS_V1.md
+3 -3
@@ -1,13 +1,13 @@
1 -# LifeMate — PWA Platform Constraints v1
1 +# LifeGuide — PWA Platform Constraints v1
2
3 ## iPhone/iPad install model
4 -LifeMate must include a Web App Manifest and standalone display behavior plus explicit icons. On iOS/iPadOS, a Home Screen web app can open as its own app-like surface rather than a normal browser tab. `apple-touch-icon` is provided intentionally for icon quality.
4 +LifeGuide must include a Web App Manifest and standalone display behavior plus explicit icons. On iOS/iPadOS, a Home Screen web app can open as its own app-like surface rather than a normal browser tab. `apple-touch-icon` is provided intentionally for icon quality.
5
6 ## Push
7 Web Push is supported for Home Screen web apps on iOS/iPadOS 16.4+. Permission must be requested in response to user interaction. Therefore notification onboarding must feature-detect capability and explain installation/permission rather than assuming push exists in an ordinary Safari tab.
8
9 ## Service worker / offline
10 -Current Flutter web does not provide a managed caching service worker by default. LifeMate must own its caching strategy. Phase 2 begins with conservative app-shell/static caching; offline data editing is added only per domain after conflict semantics are defined.
10 +Current Flutter web does not provide a managed caching service worker by default. LifeGuide must own its caching strategy. Phase 2 begins with conservative app-shell/static caching; offline data editing is added only per domain after conflict semantics are defined.
11
12 ## Storage assumptions
13 Browser storage is a cache, not the authoritative database. Critical user data must sync to the backend when connectivity exists. The UX must tolerate local cache eviction and rehydration.
docs/audits/2026-10-15-phase0-summary.md new
+39
@@ -0,0 +1,39 @@
1 +# LifeGuide — خلاصه قابل ارجاع ممیزی فاز۰
2 +
3 +این خلاصه از بسته تحویل‌شده `LifeGuide-phase0-audit-2026-10-15` و فایل `REPORT.md` آن نقل شده است؛ شواهد کامل در همان بسته به مالک تحویل شدند و به مسیر موقت/محلی خارج مخزن لینک داده نمی‌شود. SHA256 گزارش مبنا: `38998de2e47071738e02c80f3ced93de0e86a11cfa040488e670dbf098dc11f7`. این PR ممیزی یا تست‌ها را بازاجرا معرفی نمی‌کند.
4 +
5 +## دامنه و خروجی اجراشده
6 +
7 +**VERIFIED در فاز۰:** مبنای `main` برابر `64b938dc9b0c3bb3620a7a12c22c690313d75bd7`؛ snapshot تجمیعی ادغام‌نشده PR16 برابر `2c3ea97e69bc8f60f1524fab9357b377517a7bbb`. محیط محلی Node24.19.0، PostgreSQL16.15، Flutter3.47.6 و Dart3.13.5 بود؛ CI از Node22 استفاده می‌کرد.
8 +
9 +|فرمان/بررسی در فاز۰|خروجی ثبت‌شده|
10 +|---|---|
11 +|`npm run check` روی هر دو snapshot|exit0؛ syntax، نه ESLint|
12 +|`npm test` روی main با DB مصنوعی|۱۳ موفق، صفر شکست/skip|
13 +|`node --test --test-concurrency=1 …` روی PR16، بدون publication suite|۲۵۱ موفق، صفر شکست/skip|
14 +|`node --test tests/content_publication.test.js` جدا روی PR16|۱۰ موفق، صفر شکست/skip؛ مجموع دو اجرا۲۶۱|
15 +|`npm run migrate` و تکرار، روی DBهای مصنوعی جدا|هر دو نوبت exit0؛ main شش و PR16 بیست migration|
16 +|`flutter analyze --no-pub` و `flutter test --no-pub`|analyze موفق؛ main پنج تست و PR16 دویست‌ودوازده تست موفق|
17 +|ساخت وب release هر دو snapshot|موفق؛ پذیرش Android/Safari نیست|
18 +|`dart format --output=none --set-exit-if-changed lib test`|main ناموفق، شش فایل نیازمند قالب‌بندی؛ PR16 موفق|
19 +|اسکن Gitleaks8.30.1 با `git --log-opts=--all --redact=100`، default rules، ignore خالی|exit1، سی hit؛ ۳۸۶ commit reachable در۸۷ref؛ طبقه‌بندی در پایین|
20 +|خواندن catalog و migration ledger موجود Supabase QA|۵۹جدول با RLS ENABLE/FORCE؛ بیست SHA مطابق منبع|
21 +
22 +اجرای اولیه تست Backend به دلیل محیط نامناسب شکست خورد؛ اجرای اصلاح‌شده بالا جای آن شکست را پنهان نمی‌کند. داده آزمون مصنوعی بود و ارسال SMS/ایمیل/AI خارجی انجام نشد. هر یازده PR باز و بیست‌وپنج شاخه در همان زمان بررسی شدند؛ قابلیت شاخه‌ها معادل قابلیت `main` یا سرویس زنده نیست.
23 +
24 +## موانع باقی‌مانده
25 +
26 +- **P0 / VERIFIED-source:** سرپرستی/رضایت کودک، مشتقات چت خصوصی در گزارش والد، AI خارجی و داده حساس نیازمند اصلاح و سیاست تأییدشده‌اند. بعضی مسیرهای حساس در شاخه‌ها بسته شده‌اند؛ این حالت، انتشار ایمن `main` را ثابت نمی‌کند.
27 +- **P1 / VERIFIED-source:** ثبت‌نام پس از شکست ایمیل، مجوز/validation، نشست و کش `main`، sync و worker یادآوری کامل نیستند. شاخه‌ها اصلاحات قابل استفاده مجدد دارند؛ باید در PRهای کوچک بررسی شوند.
28 +- **P1 / VERIFIED-GitHub:** زنجیره PRهای زیرساخت/Pages می‌تواند صفحه معرفی موجود را بازنویسی کند. CI سبز و وجود دیتابیس QA، اجرای Express کامل روی Supabase را ثابت نمی‌کند.
29 +- **P2 / VERIFIED-source:** main مشکل قالب‌بندی، workflow قدیمی و اسناد نام/وضعیت ناسازگار دارد. این PR فقط بخشی از پاکسازی مستندات/workflow را انجام می‌دهد.
30 +
31 +**UNVERIFIED:** APK تازه و امضای واقعی release، Android/iOS/Safari واقعی، SMS کاوه‌نگار، دسترسی بدون VPN از ایران، پذیرش چنددستگاهی و نصب/ورود PWA، و اجرای API کامل با نقش محدود روی Supabase. تست محلی API/SQL، جای دستگاه واقعی نیست.
32 +
33 +## گزارش اسکن و rotation
34 +
35 +سی hit عبارت‌اند از سه ثابت صریح مصنوعی تست و بیست‌وهفت کلید ساختاری محتوا؛ هیچ secret یا مقدار match در این خلاصه درج نمی‌شود. **کلید زنده مشخصی که بر پایه این اسکن باید rotate شود شناسایی نشد.** اعتبار هیچ کلیدی با provider آزمایش نشد. نبود هر نوع secret در binary/archive، اشیای unreachable، ref حذف‌شده پیش از fetch، فایل خارج Git و سرویس‌ها/لاگ‌های خارجی **UNVERIFIED** است. هیچ history rewrite یا rotation انجام نشد.
36 +
37 +## وضعیت پس از گزارش
38 +
39 +فاز۰ طبق درخواست متوقف شد. مالک سپس شروع فاز۱ را تأیید کرد؛ این تأیید مجوز merge/deploy یا انتخاب سیاست حریم خصوصی، AI و زیرساخت نیست. [وضعیت جاری](../../PROJECT_STATE.md) مرجع دامنه اجرایی است.
docs/audits/2026-10-15-repository-cleanup.md new
+35
@@ -0,0 +1,35 @@
1 +# LifeGuide — پاکسازی مخزن و نام‌های باقی‌مانده
2 +
3 +دامنه این بسته: مستندات فعلی، رفع شناسه تکراری ADR و حذف workflow تعمیر یک‌باره. runtime، migration، schema، JWT، سایت عمومی و زیرساخت تغییر نمی‌کنند. نام محصول، طبق دستور مالک، **LifeGuide / لایف‌گاید** است؛ نام مخزن تغییر نمی‌کند.
4 +
5 +## طبقه‌بندی نام قبلی
6 +
7 +طبقه‌بندی زیر جایگزین blind replace است. این بسته rebrand کامل نسخه اجرایی را ادعا نمی‌کند؛ متن‌های نمایشی باقی‌مانده در `main` کار جدا هستند.
8 +
9 +|دسته|موارد|اقدام|
10 +|user-facing / مستندات فعلی|README، AGENTS، PROJECT_STATE، backend/README، سندهای فعلی product/architecture/quality/safety/UX و runbook عمومی deploy|متن برند در این بسته LifeGuide شد؛ مفاد سیاست تغییر نکرد|
11 +|user-facing / runtime باقی‌مانده|`apps/lifemate/lib/main.dart` متن صفحه ورود و AppBar؛ web index/manifest؛ Android label؛ pubspec description؛ email subject/body و AI identity prompt در Backend|اصلاح در PR فنی جدا؛ این بسته فقط ثبت می‌کند، نتیجه هنوز UNVERIFIED|
12 +|user-facing / بسته‌بندی باقی‌مانده|نام workflow/Artifact در CI و `LifeMate.apk` در Dockerfile؛ شناسه آزمایشی Android `com.example.lifemate`|release blocker؛ به‌صورت جدا با سازگاری نصب/امضا بررسی شود؛ نام نهایی APK هدف `LifeGuide.apk` است|
13 +|protocol-sensitive / حفظ|JWT issuer=`lifemate` و audience=`lifemate-api`؛ پاسخ service/telemetry؛ package/class و importهای فعلی؛ env key موجود و مسیر `apps/lifemate`؛ schema/SQL؛ نام مخزن و URLهای رسمی آن|حفظ سازگاری؛ تغییر خودکار مجاز نیست|
14 +|historical / حفظ|اسناد history، plans و superpowers؛ تصمیم‌های اولیه؛ audit/evidence پیش از انتشار؛ نام واقعی artifact قدیمی Figma؛ نام artifact در checklist تاریخی Feature1|به‌عنوان سابقه باقی می‌ماند؛ راهنمای نام محصول یا آمادگی امروز نیست|
15 +|technical / حفظ|نام فایل dump/test DB، دامنه‌های رزروشده `.invalid`/`.test` و fixture مصنوعی، عبارت‌های شناسایی برند ممنوع در checker سایت|شناسه فنی یا تست منفی؛ نمایش محصول نیست؛ مقدار واقعی یا secret اضافه نمی‌شود|
16 +
17 +اسناد نسخه‌دار اولیه ممکن است هنوز سیاست‌های پیشنهادی قبلی را بیان کنند. آن‌ها مجوز اجرای تازه AI، cycle، مشاهده خصوصی کودک یا انتخاب میزبان نیستند؛ سیاست‌های بعدی به سند گزینه‌ها و تأیید مالک نیاز دارند. [وضعیت جاری](../../PROJECT_STATE.md) نسبت به پلن تاریخی اولویت دارد. referenceهای تاریخی Railway نگه داشته می‌شوند؛ مقصد فعال و مجوز راه‌اندازی آن نیستند. آدرس قدیمی Railway در Dockerfile کلاینت، نقص فنی ثبت‌شده برای PR جدا است؛ این پاکسازی آن را اجرا یا معتبر معرفی نمی‌کند.
18 +
19 +## ADRها
20 +
21 +frontend ADR از شناسه تکراری۰۰۰۴ به [ADR-2026-10-05-frontend](../decisions/2026-10-05-frontend-flutter.md) منتقل شد؛ انتخاب Flutter و مرزهای آن تغییر نکرد. هیچ ارجاع فعال به مسیر قدیمی در منبع `main` وجود نداشت. ADR0004 مربوط به AI و تاریخچه آن حفظ شدند؛ سیاست بعدی باید با تأیید مالک تعیین شود.
22 +
23 +[ADR0005](../decisions/0005-backend-supabase.md) از قبل Superseded بود؛ لینک مستقیم به [ADR0006](../decisions/0006-provider-neutral-postgresql-backend.md) و توضیح QA افزوده شد. مشاهده Supabase QA، احیای تصمیم قدیمی استفاده از combined Auth/BaaS نیست. ترجیح Neon در متن۰۰۰۶ به‌عنوان زمینه تاریخی مشخص شد؛ میزبان جدیدی انتخاب نشد.
24 +
25 +## حذف workflow تعمیر یک‌باره
26 +
27 +**VERIFIED:** `fix-unused.yml` فقط push شاخه قدیمی `final-feature-1/iran-family-school` را می‌گرفت، `contents:write` داشت و یک متغیر استفاده‌نشده را با commit/push خودکار حذف می‌کرد. عبارت هدف اکنون هم در `main` و هم در همان شاخه قدیمی وجود ندارد؛ فایل فعلی از قبل `final prefs=s.data![3];` دارد. workflowهای دیگر آن را فراخوانی نمی‌کنند و `workflow_call` ندارد.
28 +
29 +مشاهده خواندنی `gh run list --workflow fix-unused.yml --limit 5 --json databaseId,headSha,status,conclusion,createdAt` فقط دو run تکمیل‌شده قدیمی `37352116388` و `37341988363` در۵اکتبر با success داد. حذف آن، مسیر بی‌نیاز دارای مجوز نوشتن را از source حذف می‌کند؛ GitHub یا سرور زنده در این بسته تغییر داده نمی‌شود.
30 +
31 +## شواهد و محدودیت‌ها
32 +
33 +[خلاصه فاز۰](2026-10-15-phase0-summary.md) شمارها، مبنا و محدودیت اسکن را ثبت می‌کند. فهرست کلید مشخص برای rotation بر مبنای آن اسکن خالی است؛ نه مقدار کلید یا اطلاعات تماس منتشر می‌شود و نه ادعای نبود تمام secretها.
34 +
35 +PR21 برای شواهد انتشار عمومی هنوز مستقل و باز است؛ متن‌های README/PROJECT_STATE همپوشان باید پیش از ادغام reconcile شوند. سایت عمومی به مخزن/سورس لینک نمی‌دهد و این بسته آن فایل‌ها را تغییر نمی‌دهد. تست runtime/ساخت تازه در این PR مستنداتی **UNVERIFIED** است؛ نتایج فاز۰ با تاریخ و SHA جدا نقل شده‌اند.
docs/decisions/0005-backend-supabase.md
+3 -1
@@ -2,6 +2,8 @@
2
3 - **Status:** Superseded
4 - **Date:** 2026-10-05
5 -- **Superseded by:** `0006-provider-neutral-postgresql-backend.md`
5 +- **Superseded by:** [ADR-0006](0006-provider-neutral-postgresql-backend.md)
6
7 Supabase was initially selected as the Phase 2 combined PostgreSQL/Auth/RLS platform. The project subsequently moved to a provider-neutral PostgreSQL architecture with explicit identity/API/email/storage adapters. This file remains only as decision history and must not be used as current implementation guidance.
8 +
9 +The existing Supabase QA database observed in the 2026-10-15 audit does not reinstate this combined-backend/auth decision. It establishes the current QA database state, not a new hosting or identity policy. See [current state](../../PROJECT_STATE.md).
docs/decisions/0006-provider-neutral-postgresql-backend.md
+2 -2
@@ -8,9 +8,9 @@
8 Phase 2 originally treated Supabase as the likely combined database/auth/backend provider. Creation of an isolated LifeMate staging project was blocked by account-level project limits. More importantly, tying identity, authorization, storage, realtime and database behavior to one BaaS creates unnecessary platform coupling for a long-lived family product.
9
10 ## Decision
11 -LifeMate will use PostgreSQL as its durable relational source of truth while exposing infrastructure through explicit application ports/adapters.
11 +LifeGuide uses PostgreSQL as its durable relational source of truth while exposing infrastructure through explicit application ports/adapters.
12
13 -The managed PostgreSQL host is replaceable. Neon is the preferred current target when available, but no domain entity, authorization rule, migration or client contract may require Neon-specific semantics.
13 +The PostgreSQL host is replaceable. Neon was the preferred candidate when this ADR was written on 2026-10-05; that is historical context, not the current deployment target. The 2026-10-15 audit observed the existing Supabase QA database. No domain entity, authorization rule, migration or client contract may require provider-specific semantics. Future infrastructure choices need a separate owner-approved decision; this annotation does not choose one.
14
15 Required ports:
16 - `IdentityProvider`: registration, email verification, login/session, password recovery/change.
docs/decisions/2026-10-05-frontend-flutter.md renamed
+4 -3
@@ -1,13 +1,14 @@
1 -# ADR-0004 — Frontend Baseline: Flutter
1 +# ADR-2026-10-05-frontend — Frontend Baseline: Flutter
2
3 - **Status:** Accepted for Phase 2 baseline
4 - **Date:** 2026-10-05
5 +- **Identifier correction:** renamed from duplicate `0004-frontend-flutter.md` on 2026-10-15. The date-based identifier avoids renumbering historical decisions or colliding with unmerged branch ADRs; the Flutter decision is unchanged.
6
7 ## Decision
8 Use **Flutter** as the initial client framework for Android and the app-centric responsive Web/PWA surface, with platform-specific web integration where standards-based PWA behavior requires it.
9
10 ## Why
10 -LifeMate is an app-centric experience rather than a document/SEO site. A shared Dart/Flutter product surface reduces divergence between Android and PWA while preserving high visual fidelity and RTL control. Official Flutter guidance identifies PWAs, SPAs and existing mobile-style applications as suitable Flutter web scenarios.
11 +LifeGuide is an app-centric experience rather than a document/SEO site. A shared Dart/Flutter product surface reduces divergence between Android and PWA while preserving high visual fidelity and RTL control. Official Flutter guidance identifies PWAs, SPAs and existing mobile-style applications as suitable Flutter web scenarios.
12
13 ## Important constraint
14 Flutter no longer generates/manages an application caching service worker by default. Offline/PWA caching must therefore be an explicit web concern using a custom standards-based service worker/Workbox or equivalent, not an assumed framework feature.
@@ -19,4 +20,4 @@ Flutter no longer generates/manages an application caching service worker by def
20 - Revisit this ADR only if a Phase 2 spike proves a blocking requirement (not aesthetic preference) cannot be delivered reliably.
21
22 ## Alternatives considered
22 -Separate Kotlin Android + React/Next PWA offers maximum platform specialization but creates two primary UI codebases before product-market validation. React Native does not remove the need for a separate web/PWA strategy as cleanly for this product. Both remain fallback options if a verified blocker appears.
\ No newline at end of file
23 +Separate Kotlin Android + React/Next PWA offers maximum platform specialization but creates two primary UI codebases before product-market validation. React Native does not remove the need for a separate web/PWA strategy as cleanly for this product. Both remain fallback options if a verified blocker appears.
docs/final/DELIVERY.md
+4 -2
@@ -1,4 +1,6 @@
1 -# LifeMate Feature 1 — Final Delivery
1 +# LifeGuide Feature 1 — Historical Delivery Checklist
2 +
3 +**Status as of 2026-10-15:** historical checklist, not current release acceptance. Artifact labels below match the old CI configuration. Phase 0 identified authorization, sensitive-data and device acceptance blockers; cycle tracking is not an approved MVP capability. Follow [PROJECT_STATE](../../PROJECT_STATE.md) before using this checklist. No fresh APK, release signature or device test is verified by this document.
4
5 ## Installable outputs
6 Every green CI run retains:
@@ -18,4 +20,4 @@ The Flutter iOS project is present in `apps/lifemate/ios`. A signed `.ipa` requi
20 7. Verify private cycle entries are visible only to the owning account.
21
22 ## External gates
21 -Public production release, store publication, Apple signing, production push-provider credentials, external AI/voice enablement, and textbook PDF redistribution remain explicit external gates.
\ No newline at end of file
23 +Public production release, store publication, Apple signing, production push-provider credentials, external AI/voice enablement, and textbook PDF redistribution remain explicit external gates.
docs/operations/DEPLOYMENT.md
+1 -1
@@ -1,6 +1,6 @@
1 # Deployment Runbook
2
3 -LifeMate uses staging before production. Normal engineering changes deploy to staging first and are verified there before any production decision.
3 +LifeGuide uses staging before production. Normal engineering changes deploy to staging first and are verified there before any production decision.
4
5 ## Staging
6 1. Confirm branch CI is green: security, backend, backup/restore and Flutter jobs.
docs/product/FEATURE_PRIORITIES_V1.md
+2 -2
@@ -1,4 +1,4 @@
1 -# LifeMate — Feature Priorities v1
1 +# LifeGuide — Feature Priorities v1
2
3 ## MUST — first useful product
4 - Independent accounts, verified email, sign-in/out, forgot/reset/change password.
@@ -31,4 +31,4 @@
31 A family can securely join one workspace; each member can plan independently; a teen can manage a real school week; parents can see the authorized information needed to support the teen; shared family items work; reminders are useful; the product remains usable without AI.
32
33 ## Non-goals
34 -LifeMate V1 is not a surveillance product, clinical diagnosis/treatment system, location tracker, social network, school ERP, or autonomous decision-maker.
\ No newline at end of file
34 +LifeGuide V1 is not a surveillance product, clinical diagnosis/treatment system, location tracker, social network, school ERP, or autonomous decision-maker.
\ No newline at end of file
docs/product/PERMISSION_MATRIX_V0.md
+1 -1
@@ -1,4 +1,4 @@
1 -# LifeMate — Permission & Visibility Matrix v0
1 +# LifeGuide — Permission & Visibility Matrix v0
2
3 **Status:** Phase 1 working contract
4 **Purpose:** establish a concrete baseline for UX and server-side authorization design. Detailed age/jurisdiction policy remains pending.
docs/product/PRODUCT_SPEC_V1.md
+2 -2
@@ -1,10 +1,10 @@
1 -# LifeMate — Product Specification v1
1 +# LifeGuide — Product Specification v1
2
3 **Status:** Phase 1 baseline
4 **Date:** 2026-10-05
5
6 ## 1. Product definition
7 -LifeMate is a personal, family and learning companion. It begins with a teen-and-family scenario but must grow with a person across school years and later life. It is not a surveillance app, not only a student planner, and not a clinical mental-health product.
7 +LifeGuide is a personal, family and learning companion. It begins with a teen-and-family scenario but must grow with a person across school years and later life. It is not a surveillance app, not only a student planner, and not a clinical mental-health product.
8
9 ## 2. Primary V1 actors
10 - **Family Owner/Admin:** manages family workspace, membership and allowed family policies.
docs/quality/ANALYTICS_POLICY_V1.md
+1 -1
@@ -1,4 +1,4 @@
1 -# LifeMate — Analytics Policy v1
1 +# LifeGuide — Analytics Policy v1
2
3 ## Principle
4 Product analytics answers whether flows work; it does not become a shadow copy of private user content.
docs/quality/PHASE_2_QUALITY_GATES.md
+2 -2
@@ -1,4 +1,4 @@
1 -# LifeMate — Phase 2 Quality Gates
1 +# LifeGuide — Phase 2 Quality Gates
2
3 ## Pull request gates
4 Once application code exists, every implementation PR must run:
@@ -11,7 +11,7 @@ Once application code exists, every implementation PR must run:
11 7. secret scanning and backend dependency audit in CI.
12
13 ## Security tests required for identity/family
14 -For each protected resource, test allowed and denied access for: owner profile, related guardian, unrelated family member, removed member, unauthenticated user and privileged server path where applicable. LifeMate's primary authorization boundary is the server/API layer; database constraints and helper-policy tests provide defense in depth. If RLS is enabled for a deployment, its SELECT/INSERT/UPDATE/DELETE policies must be tested as an additional gate.
14 +For each protected resource, test allowed and denied access for: owner profile, related guardian, unrelated family member, removed member, unauthenticated user and privileged server path where applicable. LifeGuide's primary authorization boundary is the server/API layer; database constraints and helper-policy tests provide defense in depth. If RLS is enabled for a deployment, its SELECT/INSERT/UPDATE/DELETE policies must be tested as an additional gate.
15
16 ## Staging rule
17 All deployable changes land in staging before production. Staging uses separate environment/secrets/data from production. No production deploy, destructive migration or sensitive access change is implied by merge alone.
docs/safety/SAFETY_PRIVACY_RISK_V1.md
+2 -2
@@ -1,7 +1,7 @@
1 -# LifeMate — Safety, Privacy & Risk Baseline v1
1 +# LifeGuide — Safety, Privacy & Risk Baseline v1
2
3 ## Product safety boundary
4 -LifeMate may provide general wellbeing reflection, coping ideas, communication prompts and educational support. It must not claim diagnosis, treatment, professional licensure or certainty about a user's mental state. The AI must not encourage emotional dependency or represent itself as a replacement for trusted people/professional care.
4 +LifeGuide may provide general wellbeing reflection, coping ideas, communication prompts and educational support. It must not claim diagnosis, treatment, professional licensure or certainty about a user's mental state. The AI must not encourage emotional dependency or represent itself as a replacement for trusted people/professional care.
5
6 ## Privacy model
7 Raw private wellbeing conversations are not routine parent-report content. Parent support uses authorized structured signals/trends and actionable guidance. Safety escalation is a separate, narrowly governed path; it is not a blanket permission to inspect private history.
docs/ux/BRAND_BRIEF_V1.md
+7 -5
@@ -1,13 +1,13 @@
1 -# LifeMate — Brand & Visual Brief v1
1 +# LifeGuide — Brand & Visual Brief v1
2
3 ## Brand idea
4 -**LifeMate = همراه رشد، نه ناظر.** The visual language combines calm, momentum, independence and connection.
4 +**LifeGuide = همراه رشد، نه ناظر.** The visual language combines calm, momentum, independence and connection.
5
6 ## Audience behavior
7 The initial teen experience must feel attractive to a 13-year-old without preschool/childish motifs. The same identity must remain credible at 16, 20 and adulthood. Parent surfaces share the brand but prioritize clarity and actionability.
8
9 ## Profile-aware theme defaults
10 -LifeMate uses a white/light neutral foundation and applies a profile-aware accent as a **default, not an irreversible identity lock**:
10 +LifeGuide uses a white/light neutral foundation and applies a profile-aware accent as a **default, not an irreversible identity lock**:
11 - Girl/teen default: white + soft modern pink.
12 - Boy/teen default: white + calm blue.
13 - Parent/adult default: white + calm blue with a more restrained information density.
@@ -23,7 +23,7 @@ The component system, navigation and semantics remain identical across themes. A
23 - Iconography: rounded, consistent stroke; no cartoon school clichés as the core brand mark.
24
25 ## Logo/app icon principles
26 -The mark should express **path + companion + growth** using a simple abstract form readable at favicon/app-icon size. Avoid book/pencil/graduation-cap as the primary symbol because LifeMate is broader than school. The icon must work on Android adaptive icon, PWA manifest icons, apple-touch-icon and favicon.
26 +The mark should express **path + companion + growth** using a simple abstract form readable at favicon/app-icon size. Avoid book/pencil/graduation-cap as the primary symbol because LifeGuide is broader than school. The icon must work on Android adaptive icon, PWA manifest icons, apple-touch-icon and favicon.
27
28 ## Experience tone
29 Teen: encouraging, calm, graphical, choice-oriented. Parent: concise, trustworthy, actionable. AI: warm but never manipulative, dependency-seeking or presented as a human clinician.
@@ -34,8 +34,10 @@ Use short purposeful transitions to explain hierarchy/status. No attention-hijac
34 ## Figma artifact
35 Phase 1 design file: `LifeMate — Product UX & Brand v1`. Initial editable board is directional, not a final UI kit.
36
37 +This is the historical artifact title; current product copy uses LifeGuide / لایف‌گاید.
38 +
39 ## Canva role
40 Canva is approved for supporting illustration/educational visual asset exploration. Final UI layout, tokens, components and interaction specifications remain controlled in Figma so implementation does not depend on flattened artwork.
41
42 ## Acceptance
41 -Reject screens that feel like a generic school ERP, a surveillance dashboard, or a small-child game. LifeMate should feel like a polished personal companion that understands school and family.
43 +Reject screens that feel like a generic school ERP, a surveillance dashboard, or a small-child game. LifeGuide should feel like a polished personal companion that understands school and family.
docs/ux/IA_AND_JOURNEYS_V1.md
+2 -2
@@ -1,4 +1,4 @@
1 -# LifeMate — Information Architecture & Primary Journeys v1
1 +# LifeGuide — Information Architecture & Primary Journeys v1
2
3 ## Navigation model
4 ### Teen / personal mobile
@@ -25,7 +25,7 @@ Create account → verify email → create Family Workspace → choose own role
25 Open invitation → create/attach independent account → verify email as applicable → see plain-language explanation of what parents can and cannot see → set school context → land on Teen Today. Privacy explanation is part of onboarding, not buried in legal text.
26
27 ## Journey 3 — Build a school week
28 -Create academic year/term → add subjects → add repeating class schedule → add assignments/exams → LifeMate surfaces Today/Week workload → teen schedules study sessions → reminders follow schedule changes.
28 +Create academic year/term → add subjects → add repeating class schedule → add assignments/exams → LifeGuide surfaces Today/Week workload → teen schedules study sessions → reminders follow schedule changes.
29
30 ## Journey 4 — Parent support review
31 Parent opens Family → selects child → sees authorized upcoming workload, completion/progress and support summary → receives suggested conversation/support action → cannot silently open routine private wellbeing transcripts.