LifeMate — Personal, Family & Learning Companion

feat/aparat-learning-library
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 257 lines 9.07 KB
Rendered Raw
1 # LifeGuide Rebrand & Domain Migration Design
2
3 Date: 2026-10-06
4 Status: Approved design, pending implementation plan and execution
5 Repository: davoodmehraban89/LifeMate
6 Current runtime project: LifeMate-Staging
7 New product brand: LifeGuide
8 Primary owned domain: lifeguide.ir
9
10 ## 1. Goal
11
12 Rebrand the existing LifeMate product to LifeGuide without rebuilding the project, while preserving working functionality and keeping the current staging release path intact.
13
14 The migration must also establish LifeGuide-owned web and email identity so the project no longer depends on any domain, API key, or sender identity belonging to other projects.
15
16 ## 2. Scope
17
18 ### In scope
19
20 - Replace user-facing product branding from LifeMate to LifeGuide.
21 - Use `lifeguide.ir` as the canonical brand domain.
22 - Prepare:
23 - `app.lifeguide.ir` for the PWA.
24 - `api.lifeguide.ir` for the backend API.
25 - `no-reply@lifeguide.ir` for transactional email.
26 - Update Flutter/PWA metadata and visible UI branding.
27 - Update Android application label and release artifact naming.
28 - Audit Android application ID and migrate away from the current example identifier using a production-safe LifeGuide identifier.
29 - Update backend transactional email subjects/body text from LifeMate to LifeGuide.
30 - Update public URLs used inside verification, reset-password, and invitation emails.
31 - Update relevant documentation and release notes.
32 - Configure Resend exclusively with LifeGuide-owned domain/sender resources.
33 - Re-run CI and smoke tests after rebranding.
34 - Produce a stable `LifeGuide.apk` and HTTPS PWA endpoint.
35
36 ### Out of scope for this migration
37
38 - Rebuilding application architecture.
39 - Renaming database tables, columns, enum values, or historical migration identifiers solely for branding.
40 - Destructive database migration.
41 - New feature development unrelated to the rebrand.
42 - Altering resources, DNS, domains, sender identities, API keys, or services owned by Factoreasy or other projects.
43 - App Store / Google Play production release.
44 - Large visual redesign.
45
46 ## 3. Brand conventions
47
48 Canonical product name:
49
50 `LifeGuide`
51
52 Persian display name where needed:
53
54 `لایف‌گاید`
55
56 Primary domain:
57
58 `lifeguide.ir`
59
60 Recommended service layout:
61
62 - Website / future landing page: `https://lifeguide.ir`
63 - PWA: `https://app.lifeguide.ir`
64 - API: `https://api.lifeguide.ir`
65 - Transactional email sender: `LifeGuide <no-reply@lifeguide.ir>`
66
67 Staging Railway domains may remain available as fallback operational endpoints during migration, but they are not the long-term product identity.
68
69 ## 4. Technical strategy
70
71 ### 4.1 Preserve repository and data continuity
72
73 The existing repository remains the source of truth during this migration. No new replacement project is created.
74
75 Existing database schemas and historical migration names remain unchanged unless they are directly user-visible or technically required to change.
76
77 ### 4.2 User-facing rename
78
79 Audit and replace branded strings in:
80
81 - Flutter application UI.
82 - PWA manifest/title metadata.
83 - Android application label.
84 - Login/register/verification flows.
85 - Transactional email subjects and bodies.
86 - README and user-facing documentation.
87 - Build/release artifact names.
88
89 Replacement must be targeted. Generic identifiers containing `lifemate` are not blindly renamed if doing so risks compatibility.
90
91 ### 4.3 Android package identity
92
93 The current example package identifier is not production-ready.
94
95 The implementation phase must inspect current Android package configuration and choose a stable LifeGuide application ID. Preferred pattern:
96
97 `ir.lifeguide.app`
98
99 If Android tooling or package namespace constraints make this inappropriate, the implementation plan must document the selected final identifier before changing it.
100
101 Signing remains internal/test signing for the current release candidate unless a production keystore is separately approved.
102
103 ### 4.4 Domain migration
104
105 DNS will be configured only for `lifeguide.ir`.
106
107 Expected records will be derived from Railway and Resend rather than guessed.
108
109 The migration order should avoid outage:
110
111 1. Keep current Railway endpoints functioning.
112 2. Attach and verify `api.lifeguide.ir`.
113 3. Attach and verify `app.lifeguide.ir`.
114 4. Update application API base URL and CORS.
115 5. Verify LifeGuide email domain in Resend.
116 6. Configure `EMAIL_FROM=LifeGuide <no-reply@lifeguide.ir>`.
117 7. Update `PUBLIC_APP_URL`.
118 8. Smoke test.
119 9. Keep Railway-generated domains as fallback until verification is complete.
120
121 ### 4.5 Email isolation
122
123 LifeGuide must use its own Resend sender/domain configuration.
124
125 Mandatory rules:
126
127 - Do not modify Factoreasy DNS.
128 - Do not modify or delete Factoreasy Resend resources.
129 - Do not use a Factoreasy sender address for LifeGuide.
130 - Create or use a LifeGuide-specific Resend API key restricted to the LifeGuide domain where supported.
131 - Store the key only as a secret/environment variable.
132 - Never commit or display it in source code or documentation.
133
134 Transactional email flows to verify:
135
136 - Email verification.
137 - Forgot/reset password.
138 - Family invitation.
139
140 ### 4.6 Backend branding
141
142 The backend can keep internal schema identifiers for compatibility, but all externally visible copy must say LifeGuide.
143
144 Examples:
145
146 - `تأیید حساب LifeGuide`
147 - `برای تأیید حساب LifeGuide ...`
148 - `بازیابی رمز عبور LifeGuide`
149
150 JWT issuer/audience or other security-sensitive protocol identifiers should not be renamed merely for appearance unless the implementation audit confirms the migration is safe and coordinated.
151
152 ## 5. UX requirements
153
154 Registration page must explicitly state:
155
156 `رمز عبور باید حداقل ۱۰ کاراکتر باشد.`
157
158 After successful registration, show a clear success state such as:
159
160 `ثبت‌نام با موفقیت انجام شد. برای فعال‌سازی حساب، ایمیل خود را بررسی و روی لینک تأیید LifeGuide بزنید.`
161
162 The UI must not say an email was sent unless the backend reports that the delivery provider accepted the message for sending.
163
164 If email delivery is unavailable, present an actionable non-misleading error/state.
165
166 ## 6. Deployment and release artifacts
167
168 Required user-facing outputs:
169
170 - PWA reachable over HTTPS under LifeGuide domain.
171 - Android artifact named `LifeGuide.apk`.
172 - Both clients connected to the same online backend and PostgreSQL database.
173 - Backend reachable via LifeGuide API domain.
174 - Existing Railway fallback endpoint retained until migration validation completes.
175
176 ## 7. Security and privacy
177
178 This migration must not weaken any existing minor-data or family-isolation controls.
179
180 Special care:
181
182 - No secrets in repository or chat-visible documentation.
183 - No accidental cross-project secret/domain reuse.
184 - No destructive database reset.
185 - No production signing secrets committed to Git.
186 - CORS restricted to approved LifeGuide origins.
187 - Transactional email links use HTTPS LifeGuide URLs.
188 - Existing child/guardian privacy boundaries remain unchanged.
189
190 ## 8. Validation
191
192 ### CI
193
194 All existing required checks must pass before final release declaration.
195
196 ### Smoke tests
197
198 Minimum post-migration tests:
199
200 - PWA opens from LifeGuide HTTPS domain.
201 - Android APK installs and opens.
202 - Register.
203 - Registration password validation message.
204 - Registration success/email instruction message.
205 - Verification email accepted by Resend and delivered to a real inbox.
206 - Email verification link works.
207 - Login after verification.
208 - Forgot password email.
209 - Reset password.
210 - Profile.
211 - Family creation.
212 - Invitation email.
213 - Parent/child relationship.
214 - Planner.
215 - Education profile.
216 - Calendar.
217 - Logout/session behavior.
218 - API connectivity from both PWA and Android.
219
220 ### Cross-project isolation check
221
222 Explicitly verify that no LifeGuide runtime configuration references:
223
224 - `factoreasy.ir`
225 - Factoreasy sender addresses.
226 - Factoreasy-specific API keys.
227 - Other unrelated project service domains.
228
229 ## 9. Rollback
230
231 Until LifeGuide domains are fully validated:
232
233 - Retain current Railway-generated service domains.
234 - Do not delete working services.
235 - Do not remove old endpoints until both PWA and API custom domains pass smoke testing.
236 - Changes should be committed in reversible steps.
237
238 If custom-domain migration fails, clients may temporarily continue using the current working Railway backend while DNS/configuration is corrected.
239
240 ## 10. Definition of Done
241
242 The rebrand is complete only when:
243
244 - Product UI consistently displays LifeGuide.
245 - No user-facing LifeMate branding remains in active flows.
246 - PWA is available via `app.lifeguide.ir` over HTTPS.
247 - Backend is available via `api.lifeguide.ir` over HTTPS.
248 - CORS allows the LifeGuide PWA and rejects unapproved origins.
249 - Resend has a verified LifeGuide-owned sending domain.
250 - Verification/reset/invitation email uses `no-reply@lifeguide.ir`.
251 - A real external inbox receives the verification email.
252 - `LifeGuide.apk` is generated and works against the same API.
253 - Registration clearly documents the 10-character minimum password.
254 - Registration clearly instructs users to check email after success.
255 - CI is green.
256 - Required smoke tests are documented as passed or explicitly unresolved.
257 - No Factoreasy or unrelated project resource is modified or referenced by LifeGuide runtime configuration.