- After sign-in a 7-step spotlight tour shows students around (replay from the menu); ends on Esc or navigation - Course cards: edge-to-edge photo, student count (Course.enrolledCount), arrow that inverts on hover (fixes white-on-white hover in dark mode) - Landing: stats removed; How it works uses abstract CSS art; payment card grouped by mobile money, bank cards and from abroad; step 2 copy covers local and international payment - SEO: metadata (title template, description, keywords, canonical, Open Graph, Twitter), per-route titles, EducationalOrganization JSON-LD with founder Rezina Brhane and her TikTok, robots.txt, sitemap.xml; same tags on the waitlist page - Footers link the founder's TikTok - Backend issue drafted: design/issues/enrollment-counts.md - Smoke test: blocks third-party requests (Vimeo iframe stalled unloads), tolerates a missed load event; it caught a hook-order crash on the course page, fixed here Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
1.3 KiB
Markdown
15 lines
1.3 KiB
Markdown
# Backend: enrolled counts per course, and where each student is
|
|
|
|
**Labels:** backend, analytics
|
|
|
|
The course cards now show "N students" from `Course.enrolledCount` (optional field in `packages/data/src/index.ts`). In the demo the seed computes it once from the sample students. Students can't read each other's records, so the real number has to come from the backend.
|
|
|
|
## Needed
|
|
- **Enrolled count per course.** Keep `enrolledCount` on each course doc up to date when an enrollment is created or revoked (purchase, admin grant, free). A counter updated in the same write as the enrollment is enough; recount nightly to self-heal.
|
|
- **Where each student is.** For admins: per course, how many students are on each chapter/section right now, and per student their current lesson. Derive from `Student.progress` (latest `updatedAt` per course → that lesson's chapter). Expose as an admin view or a nightly aggregate doc per course, e.g. `courseStats/{courseId} = { enrolled, bySection: { [chapterId]: n }, completed }`.
|
|
|
|
## Done when
|
|
- [ ] A purchase shows up in the course's student count without a redeploy
|
|
- [ ] Admins can see, per course, how many students are in each section and who is stuck where
|
|
- [ ] Remove the seed-time computation in `packages/db/seed/demo-seed.mjs` (marked `ponytail:`)
|