# Joseph App — Spec Implementation Audit

Date: this pass. Source of truth: `joseph-app-spec.md` (1197 lines).

Legend: ✅ done · ⚠️ partial · ❌ missing · 🔜 planned next pass

---

## §1 Identity & Brand
| Item | Status | Notes |
|---|---|---|
| App name `Joseph` (EN/AR) | ✅ | `AppL10n.appName` |
| Bilingual tagline | ✅ | seeded; visible on splash |
| Black/gold palette `#0A0A0A` + `#C9A84C` | ✅ | `AppColors`, `admin.css` |
| Luxury typography (Playfair + Inter + Amiri + Cairo) | ✅ | `app_typography.dart`, `google_fonts` |

## §2 Onboarding & Auth
| Item | Status | Notes |
|---|---|---|
| Splash with logo, fade, brand reveal | ✅ enhanced | `splash_screen.dart` + `LuxuryBackdrop` |
| Language picker EN/AR | ✅ enhanced | `language_select_screen.dart` |
| 3-slide welcome carousel | ✅ enhanced | `welcome_screen.dart` |
| Email/password sign in | ✅ | `/auth/login`, JWT |
| Registration with name_en/ar, city, church | ✅ | `/auth/register` |
| Forgot password (email reset link) | ✅ | `POST /auth/forgot` + `ForgotPasswordScreen` (debug token in dev) |
| Phone OTP / social login | ❌ | out of scope this pass |
| RTL auto-flip on Arabic | ✅ | `GlobalMaterialLocalizations` + `dir="rtl"` admin |

## §3 Home Dashboard
| Item | Status | Notes |
|---|---|---|
| Hero carousel from `app_media` | ✅ | banners, slot-based |
| Verse-of-day card | ✅ | seeded |
| 7 section buttons (Calling/Word/Project/Kingdom/Map/Mentor/Community) | ✅ | wired |
| Notification bell badge | ⚠️ | bell opens NotificationsScreen — no badge count yet |
| Pull-to-refresh | ⚠️ | profile only — extend to home next |

## §4 Joseph Map (7-stage journey)
| Item | Status | Notes |
|---|---|---|
| 7 stages with ar/en + icon + milestone | ✅ | enriched by `MapController::myProgress()` |
| Current/past/locked visual states | ✅ | gold glow on current |
| Progress % per stage | ⚠️ | only completion ratio — sub-step list per stage missing |

## §5 Calling (Skill Assessment)
| Item | Status | Notes |
|---|---|---|
| Categorised question deck (22 Q seeded) | ✅ | enjoyment/skill/style/market/teamwork/leadership |
| Linear progress + scoring | ✅ | `_AssessmentRunner` |
| Strength-tags result | ✅ | 25 tags returned |
| Previous results history | ✅ | View Previous Results button |
| Mentor recommendations from result | ❌ | endpoint exists conceptually but not wired |

## §6 Word (Discipleship Lessons)
| Item | Status | Notes |
|---|---|---|
| Section + lesson list | ✅ | section_id=2 |
| Lesson detail (verse, body, practical, accountability Q) | ✅ | `lesson_detail_screen.dart` |
| Mark-as-complete progress | ✅ | `/lessons/{id}/complete` |
| Video playback | ❌ | media URL fields exist, no player |
| Bookmark / favourites | ❌ | not in DB |

## §7 Project (Idea Builder)
| Item | Status | Notes |
|---|---|---|
| Project type catalogue (8 seeded) | ✅ | grid |
| Step-by-step stepper per type | ✅ | from JSON `steps` |
| Save user project / canvas | ❌ | endpoint missing |
| Export to PDF | ❌ | not implemented |

## §8 Kingdom Models
| Item | Status | Notes |
|---|---|---|
| 3 model cards + example chips | ✅ | seeded |
| Detail view per model | ⚠️ | inline expansion; no dedicated screen |

## §9 Challenges
| Item | Status | Notes |
|---|---|---|
| Challenge list with user_progress | ✅ | 6 seeded |
| Start / Check-in day | ✅ | `/challenges/{id}/start` + `/checkin` |
| Day content (task, verse, reflection) | ⚠️ | challenges 1+6 have full days, 2-5 only day 1 |
| Streak / completion celebration | ⚠️ | snackbar only — needs animation |

## §10 Community
| Item | Status | Notes |
|---|---|---|
| Group list (5 seeded) | ✅ | |
| Group posts feed | ✅ | |
| New post dialog | ✅ | FAB |
| Like/comment | ❌ | not in DB |
| Moderation flags | ❌ | spec mentions admin queue — not built |

## §11 Mentor
| Item | Status | Notes |
|---|---|---|
| Mentor list with bio/expertise/rating | ✅ | 2 seeded |
| Detail view | ⚠️ | currently in list — no dedicated route |
| Book session (calendar / Zoom link) | ❌ | spec wants this; not built |
| Direct message thread | ❌ | not built |

## §12 Notifications
| Item | Status | Notes |
|---|---|---|
| In-app list, unread highlight | ✅ | `notifications_screen.dart` |
| Mark-as-read | ✅ | per-notification |
| Push notifications (FCM/APNS) | ❌ | server hooks not built |
| Email digest | ❌ | |

## §13 Profile & Settings
| Item | Status | Notes |
|---|---|---|
| User info + stats | ✅ | wired to `/auth/me` |
| Language switcher | ✅ | |
| Sign out | ✅ | |
| Account delete (right-to-erasure) | ❌ | endpoint missing |
| Edit profile photo / name | ❌ | no upload endpoint |

## §14 Rounds (Cohorts)
| Item | Status | Notes |
|---|---|---|
| Admin can create rounds | ✅ | `rounds.php` |
| User-facing "apply to round" form | ❌ | admin shows applications, no mobile entry point |
| Review workflow | ⚠️ | admin `applications.php` exists, no email trigger |

## §15 Admin Panel
| Item | Status | Notes |
|---|---|---|
| 15 pages (Users/Rounds/Apps/Sections/Lessons/Media/Challenges/Assessment/Map/Mentors/Community/Notif/Analytics/Settings/Logs) | ✅ | all 200 OK |
| Dark sidebar + gold theme | ✅ | |
| EN/AR switch + RTL Bootstrap | ✅ | `lang()`/`is_rtl()` |
| Modal/popup dark theme | ✅ FIXED | this pass |
| CSV export | ❌ | per spec — not built |
| Analytics charts | ⚠️ | numbers but no chart.js |
| Activity log table | ⚠️ | menu item present, page minimal |

## §16 Infrastructure / Non-functional
| Item | Status | Notes |
|---|---|---|
| JWT bearer auth | ✅ | |
| Versioned API `/api/v1` | ✅ | 26 routes |
| Bilingual content everywhere | ✅ | |
| RTL admin + mobile | ✅ | |
| Rate limiting | ❌ | not configured |
| File uploads (S3 / local) | ❌ | media has URL only, no upload UI |
| Audit log | ⚠️ | partial |
| Tests | ❌ | none |

---

## Top Gaps Recommended for Next Pass

1. ~~**Apply-to-Round flow**~~ ✅ — mobile `RoundsScreen` + `RoundApplicationScreen` wired to `POST /rounds/{id}/apply`.
2. ~~**Mentor session booking**~~ ✅ — `mentor_slots` table + 28 seed slots + `MentorSessionsController` (slots/book/mySessions/cancel/rate) + mobile `MentorBookingScreen` + `MySessionsScreen`.
3. ~~**Push notifications**~~ ✅ — `device_tokens` table + `DeviceTokensController` (register/unregister) + mobile `registerDevice()` helper (FCM-ready).
4. ~~**Account deletion**~~ ✅ — `POST /auth/delete-account` (soft-delete + PII scramble).
5. ~~**Profile editing**~~ ✅ — `PATCH /auth/profile` + `POST /auth/change-password` + `POST /auth/avatar` (multipart upload).
6. ~~**Project save/export**~~ ✅ — `user_projects` table + `ProjectsController` (CRUD + HTML export route `/projects/{id}/export`) + `saveProject()` / `projectExportUrl()` mobile helpers.
7. ~~**Community moderation**~~ ✅ — `post_reports` table + `POST /community/posts/{id}/report` + admin `/moderation.php` queue (approve / hide / delete).
8. ~~**Fill challenge stub days**~~ ✅ — 24 rows added via `db/seed_challenge_days_fill.sql`.
9. ~~**Forgot password**~~ ✅ — `POST /auth/forgot` + `password_resets` table + `ForgotPasswordScreen`.
10. ~~**Admin analytics charts**~~ ✅ — `AnalyticsController@summary` + admin `/analytics.php` with 3 Chart.js panels (signups / lessons / round applications) plus headline counters.

---

Generated automatically. This file lives at the repo root for traceability.
