You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The education area is the public learning library for patients, families, and care teams.
6
+
7
+
## Public Experience
8
+
9
+
Public route:
10
+
11
+
```text
12
+
/education
13
+
```
14
+
15
+
Resource detail route:
16
+
17
+
```text
18
+
/education/[id-or-slug]
19
+
```
20
+
21
+
The public education browser includes:
22
+
23
+
- Automatic search as the user types.
24
+
- URL-backed filters for category, difficulty, content type, sort order, and page.
25
+
- Featured resource recommendations.
26
+
- Published resource, category, and current result counts.
27
+
- Category buttons with live published-resource counts.
28
+
- Mobile-friendly filter and result layout.
29
+
- Error and empty states that keep the page usable when the content API is unavailable.
30
+
31
+
## Automatic Behavior
32
+
33
+
Search is debounced, then written to the URL automatically. That means users can share filtered education links and use browser back/forward naturally.
34
+
35
+
The content API supports these sorting modes:
36
+
37
+
-`newest`
38
+
-`popular`
39
+
-`title-asc`
40
+
-`title-desc`
41
+
42
+
Featured resources are loaded automatically from published content marked `isFeatured`.
43
+
44
+
## Content Management
45
+
46
+
Dashboard route:
47
+
48
+
```text
49
+
/dashboard/education
50
+
```
51
+
52
+
Admins and healthcare providers can:
53
+
54
+
- Add a new education resource.
55
+
- Review draft and published resources.
56
+
- Publish or unpublish resources.
57
+
- Open resources from the dashboard list.
58
+
59
+
Content creation route:
60
+
61
+
```text
62
+
/education/new
63
+
```
64
+
65
+
## API
66
+
67
+
List published content:
68
+
69
+
```text
70
+
GET /api/content
71
+
```
72
+
73
+
Common query params:
74
+
75
+
-`page`
76
+
-`limit`
77
+
-`search`
78
+
-`category`
79
+
-`difficulty`
80
+
-`type`
81
+
-`featured=true`
82
+
-`sort`
83
+
84
+
List categories:
85
+
86
+
```text
87
+
GET /api/content/categories
88
+
```
89
+
90
+
## Verification
91
+
92
+
The Playwright suite verifies:
93
+
94
+
- Public education resources load.
95
+
- A resource detail page can be opened.
96
+
- Dashboard education management controls render for admins.
97
+
98
+
Next test improvements:
99
+
100
+
- Exercise automatic search and filter URLs.
101
+
- Verify featured resources render when seeded content has `isFeatured=true`.
102
+
- Add a publish/unpublish dashboard flow in an isolated test database.
Copy file name to clipboardExpand all lines: docs/PRODUCTION_READINESS.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,3 +58,7 @@ Avoid the session pooler on port `5432` for app runtimes. It can produce `MaxCli
58
58
The `/api/export` endpoint is intentionally protected behind verified admin or healthcare-provider accounts. Exports are sent with `Cache-Control: no-store` and each successful export writes an audit event with the export type, file format, filters, and row count.
59
59
60
60
Admins can review recent export activity from the reports dashboard Export History panel or the full audit log at `/dashboard/audit`. See `docs/CLINICAL_EXPORTS.md` for the current export workflow and verification coverage.
61
+
62
+
## Education Readiness
63
+
64
+
The public `/education` page depends on the content and category APIs. Before production promotion, confirm seeded or managed content exists, `/api/content` returns published resources, and `/api/content/categories` returns category counts. See `docs/EDUCATION_SYSTEM.md` for the current public browser, automatic search, filters, and content-management workflow.
Copy file name to clipboardExpand all lines: docs/PROJECT_STATUS.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,10 +41,12 @@ Latest local checks:
41
41
- Patient timeline with role-aware clinical edit links.
42
42
- Upload preview/download management for attachments.
43
43
- Education resource publishing controls.
44
+
- Public education browser with automatic search, URL-backed filters, sorting, featured resources, and live result counts.
44
45
- Demo seed data for patients, appointments, records, pregnancies, ANC visits, newborns, immunizations, reports, notifications, audit logs, and long-form education content.
45
46
- Secured clinical export API with verified admin/provider access, no-store download responses, and audit logging.
46
47
- Reports dashboard Clinical Exports panel for patient, appointment, and medical-record downloads.
47
48
- Admin Export History on the reports dashboard for recent audited export activity.
49
+
- Education system documentation covering public browsing, automatic behavior, content management, and API parameters.
48
50
49
51
## Best Next Upgrades
50
52
@@ -61,7 +63,7 @@ Latest local checks:
61
63
Back up Supabase, restore into a rehearsal DB, verify drift, then replace legacy SQLite-era migrations with the generated PostgreSQL baseline.
62
64
63
65
5. Deepen the E2E tests from smoke coverage into create/update workflows.
64
-
Current tests verify entry points, rendering, education reading, health, export security, and dashboard export controls. Next add real patient creation, appointment creation, attachment upload, and clinical record submission in an isolated test database.
66
+
Current tests verify entry points, rendering, education reading, health, export security, dashboard export controls, and dashboard education management presence. Next add automatic education filter checks, real patient creation, appointment creation, attachment upload, and clinical record submission in an isolated test database.
65
67
66
68
6. Add production observability review.
67
69
Confirm Web Analytics, Speed Insights, logs, health dashboard, upload storage, Redis rate limiting, and email delivery all behave in a preview/prod environment.
Copy file name to clipboardExpand all lines: docs/UPGRADE_PLAN.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ Last updated: 2026-05-07
27
27
- Secured `/api/export` behind verified admin/provider access and audit logging.
28
28
- Added Clinical Exports controls to the reports dashboard.
29
29
- Added admin Export History to the reports dashboard.
30
+
- Rebuilt the public education page with automatic search, working category/type/difficulty filters, sorting, featured resources, and stronger empty/error states.
31
+
- Added `docs/EDUCATION_SYSTEM.md`.
30
32
- Confirmed local verification with lint, typecheck, Jest, Playwright, production build, and production audit.
31
33
32
34
## Prisma 7 Status
@@ -82,6 +84,7 @@ Current decision:
82
84
- Add automated protected-preview smoke tests using `VERCEL_PROTECTION_BYPASS`.
83
85
- Clean the ESLint warning backlog reported by `npm run lint:all`.
84
86
- Add deeper end-to-end tests for patient creation, appointment creation, uploads, and submitted clinical forms.
87
+
- Add focused education E2E coverage for automatic search, category filters, sorting, featured resources, and publish/unpublish flows.
85
88
- Plan Better Auth migration as a dedicated project.
86
89
- Activate the PostgreSQL baseline only after Supabase backup and restore rehearsal.
0 commit comments