LifeMate — Personal, Family & Learning Companion
docs: plan LifeGuide rebrand and domain migration
davoodmehraban89 committed
Oct 6, 2026 at 12:32 UTC
abdc9d9d032bc6746c8390b902a2e52d82991530
1 file changed
+150
docs/superpowers/plans/2026-10-06-lifeguide-rebrand-domain-migration.md
new
+150
@@ -0,0 +1,150 @@
1
+# LifeGuide Rebrand & Domain Migration Implementation Plan
2
+
3
+> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4
+
5
+**Goal:** Rebrand the existing LifeMate release candidate to LifeGuide, move public identity to lifeguide.ir, isolate transactional email, and preserve the working shared backend/database.
6
+
7
+**Architecture:** Keep the existing repository, backend, database schema, and Railway staging services. Change user-facing brand/configuration in reversible steps, then attach LifeGuide-owned domains and email identity, followed by CI and end-to-end smoke tests.
8
+
9
+**Tech Stack:** Flutter/Dart, Android, Flutter Web/PWA, Node.js/Express, PostgreSQL, Railway, Resend, GitHub Actions.
10
+
11
+**Spec:** `docs/superpowers/specs/2026-10-06-lifeguide-rebrand-domain-migration-design.md`
12
+
13
+## Global Constraints
14
+
15
+- Canonical product name: `LifeGuide`.
16
+- Primary owned domain: `lifeguide.ir`.
17
+- PWA target: `https://app.lifeguide.ir`.
18
+- API target: `https://api.lifeguide.ir`.
19
+- Transactional sender: `LifeGuide <no-reply@lifeguide.ir>`.
20
+- Do not alter Factoreasy or any unrelated project's DNS, domains, API keys, senders, or services.
21
+- Do not reset the database or rename historical schema solely for branding.
22
+- Keep Railway-generated domains as rollback endpoints until custom-domain validation completes.
23
+- No secrets in repository or documentation.
24
+
25
+## Review Focus
26
+
27
+- Old `LifeMate` strings remain in active user-facing flows: repository audit must distinguish harmless historical/internal identifiers from visible brand copy.
28
+- Password shorter than 10 characters: registration must reject locally with the exact Persian guidance before calling the API.
29
+- Successful registration: user must see an explicit instruction to check email and activate the account.
30
+- Email provider failure: UI/backend must not falsely claim delivery when the provider rejects the message.
31
+- Cross-project contamination: runtime configuration must contain no Factoreasy sender/domain/API key references.
32
+
33
+---
34
+
35
+### Task 1: Audit and branch the rebrand
36
+
37
+**Files:**
38
+- Inspect: `apps/lifemate/**`
39
+- Inspect: `backend/**`
40
+- Inspect: `README.md`, `PROJECT_STATE.md`, `docs/**`
41
+
42
+**Interfaces:**
43
+- Consumes: approved rebrand spec.
44
+- Produces: exact list of active brand/configuration files and a dedicated implementation branch.
45
+
46
+- [ ] Create a rebrand branch from current `main`.
47
+- [ ] Search active source/configuration for `LifeMate`, `lifemate`, `com.example.lifemate`, current public URLs, and email sender configuration.
48
+- [ ] Classify each match as user-facing, protocol-sensitive, historical documentation, or safe internal identifier.
49
+- [ ] Confirm no planned edit touches unrelated project resources.
50
+
51
+### Task 2: Fix registration UX and brand-facing Flutter UI
52
+
53
+**Files:**
54
+- Modify: `apps/lifemate/lib/main.dart`
55
+- Test: `apps/lifemate/test/app_test.dart`
56
+
57
+**Interfaces:**
58
+- Produces: LifeGuide visible brand, 10-character password validation, and post-registration email instruction.
59
+
60
+- [ ] Add/repair widget tests asserting `LifeGuide`, `حداقل ۱۰ کاراکتر`, and the successful-registration check-email instruction.
61
+- [ ] Verify tests fail before implementation.
62
+- [ ] Replace active user-facing LifeMate branding with LifeGuide and implement local password validation.
63
+- [ ] Make successful registration show a clear activation-email instruction rather than a generic result.
64
+- [ ] Run Flutter tests and confirm pass.
65
+
66
+### Task 3: Rebrand PWA and Android release metadata
67
+
68
+**Files:**
69
+- Modify: `apps/lifemate/web/index.html`
70
+- Modify: `apps/lifemate/web/manifest.json`
71
+- Modify: Android app manifest/Gradle files discovered by audit.
72
+- Modify: deployment/build files that name the APK.
73
+
74
+**Interfaces:**
75
+- Produces: LifeGuide PWA metadata, Android label, production-safe application ID, and `LifeGuide.apk` artifact path.
76
+
77
+- [ ] Add static/config checks for LifeGuide PWA title/name and Android application ID/label.
78
+- [ ] Update PWA metadata to LifeGuide.
79
+- [ ] Change Android user-facing label to LifeGuide.
80
+- [ ] Replace `com.example.lifemate` with the approved stable identifier `ir.lifeguide.app` if audit confirms no conflicting package structure requirement.
81
+- [ ] Change stable APK artifact naming to `LifeGuide.apk` and `/downloads/LifeGuide.apk`.
82
+- [ ] Run Flutter analyze/test/web build/APK build through CI.
83
+
84
+### Task 4: Rebrand backend email copy without protocol breakage
85
+
86
+**Files:**
87
+- Modify: backend source files containing transactional email copy.
88
+- Test: corresponding backend auth/email tests.
89
+
90
+**Interfaces:**
91
+- Produces: LifeGuide verification/reset/invitation copy while retaining compatible database/JWT internals unless explicitly safe to change.
92
+
93
+- [ ] Add backend tests asserting LifeGuide transactional subjects/body copy.
94
+- [ ] Verify tests fail before implementation.
95
+- [ ] Replace user-visible email copy with LifeGuide.
96
+- [ ] Do not rename JWT issuer/audience or schema identifiers merely for appearance.
97
+- [ ] Run backend tests.
98
+
99
+### Task 5: Configure LifeGuide domain and email isolation
100
+
101
+**Files:**
102
+- Runtime configuration only; no secrets committed.
103
+
104
+**Interfaces:**
105
+- Consumes: Railway domain targets and Resend DNS records.
106
+- Produces: verified `app.lifeguide.ir`, `api.lifeguide.ir`, and `no-reply@lifeguide.ir` sender configuration.
107
+
108
+- [ ] Generate/attach Railway custom-domain targets for app and API without deleting current Railway domains.
109
+- [ ] Add `lifeguide.ir` to Resend and obtain exact DNS verification records.
110
+- [ ] Ask the domain owner only for DNS changes that cannot be performed with available connectors.
111
+- [ ] Verify DNS/domain status before switching runtime URLs.
112
+- [ ] Create/use a LifeGuide-only restricted Resend sending key; do not reuse unrelated-domain credentials.
113
+- [ ] Set `EMAIL_FROM=LifeGuide <no-reply@lifeguide.ir>` only after domain verification.
114
+- [ ] Set `PUBLIC_APP_URL` and CORS to approved LifeGuide origins while retaining necessary staging rollback origin during migration.
115
+- [ ] Audit runtime variables for unrelated project domain/sender references.
116
+
117
+### Task 6: Update documentation and release identity
118
+
119
+**Files:**
120
+- Modify: `README.md`
121
+- Modify: `PROJECT_STATE.md`
122
+- Modify: active release/operations docs as discovered by audit.
123
+
124
+**Interfaces:**
125
+- Produces: current documentation that names LifeGuide and records remaining historical/internal LifeMate identifiers intentionally retained.
126
+
127
+- [ ] Update current product/release documentation to LifeGuide.
128
+- [ ] Record the domain layout and rollback endpoints without secrets.
129
+- [ ] Document intentionally retained internal/historical identifiers.
130
+
131
+### Task 7: CI, deploy, and end-to-end verification
132
+
133
+**Files:**
134
+- CI/workflow files only if required by changed artifact names/configuration.
135
+
136
+**Interfaces:**
137
+- Consumes: Tasks 2-6.
138
+- Produces: green CI, deployed LifeGuide PWA/API, stable LifeGuide APK, and documented smoke-test evidence.
139
+
140
+- [ ] Run required GitHub Actions checks and resolve failures before merge.
141
+- [ ] Deploy backend/PWA changes on Railway.
142
+- [ ] Verify `https://app.lifeguide.ir` and `https://api.lifeguide.ir` over HTTPS.
143
+- [ ] Verify PWA and Android connect to the same API/database.
144
+- [ ] Execute registration with >10-character password and confirm real verification email reaches an external inbox.
145
+- [ ] Verify email activation then login.
146
+- [ ] Verify forgot/reset password and family invitation email paths.
147
+- [ ] Smoke-test profile, family creation, parent/child relationship, planner, education profile, calendar, logout/session behavior.
148
+- [ ] Confirm `/downloads/LifeGuide.apk` is stable and not a temporary Actions artifact.
149
+- [ ] Re-audit active runtime/source for Factoreasy references and unresolved user-facing LifeMate branding.
150
+- [ ] Merge only after CI and required release-candidate checks pass.