Skip to content

Video quizzes + the open Taleemabad content library (Pakistan region) - #79

Merged
hyasin270 merged 2 commits into
mainfrom
feat/video-quizzes
Jul 29, 2026
Merged

Video quizzes + the open Taleemabad content library (Pakistan region)#79
hyasin270 merged 2 commits into
mainfrom
feat/video-quizzes

Conversation

@hyasin270

Copy link
Copy Markdown
Collaborator

What this is

The biggest content drop the platform has shipped: the video-quiz feature from production, plus the Taleemabad content library it runs on — openly hosted, free to use, importable with one command.

library

A teacher pulls a curriculum video with /video and is offered its quiz 3 s later: 15 questions one at a time with per-answer feedback, tappable picture-option Flows, phonics asked by voice note, one forwardable class link (each child plays 1:1), and a next-morning PDF naming what to reteach.

The library

890 curriculum videos (Nursery–Grade 6, Pakistani national curriculum, English + Urdu) · 858 with a quiz · 10,929 QA-certified questions · 15,557 studio voice clips · 3,217 hand-drawn illustrations — all served from the public CDN bucket, so a clone needs zero media hosting:

node bot/scripts/setup/import-video-quiz-library.js --apply

Region gating

The corpus was authored against these exact Pakistani-curriculum videos, so the feature is gated per-region via region_features.video_quizzes_enabled — seeded ON for pakistan, OFF elsewhere. DEFAULT_REGION=pakistan switches it on. Both entry points are gated (the post-video offer AND share-code joins), with a red-first test (tests/quiz/video-quiz-region-gate.test.js).

Scope

  • 9 new services (video-quiz*, student-identity, flow-id-validator) + report template
  • Wiring: button/list/nfm_reply routing, any-time QUIZ-<CODE> parser, worker report job
  • Student-videos endpoint v2 (clean titles, duplicate-hiding, delivery funnel)
  • 2 new registrar Flows (video-quiz-flow.json, student-join-flow.json)
  • Schema: quiz_share_codes, video_quiz_deliveries, v_video_quiz_popularity, question media columns, session identity columns, RLS, seed
  • Docs: README library section, docs/features/video-quizzes.md, CHANGELOG 1.2.0
  • Tests: 12 new suites; full suite green — 141 suites / 1,462 tests; gitleaks clean; sanitized (no internal numbers/ticket refs; share links disable rather than default when WHATSAPP_BOT_NUMBER is unset)

🤖 Generated with Claude Code

Haroon Yasin and others added 2 commits July 29, 2026 18:32
…egion)

A teacher pulls a curriculum video with /video and is offered its quiz 3s
later: 15 questions one at a time with per-answer feedback, tappable
picture-option Flows, phonics by voice note, a forwardable wa.me class link
(each child plays 1:1, is remembered between quizzes, can invite a friend),
and a next-morning designed PDF report naming what to reteach.

Ships with the openly-hosted Taleemabad content library (2015-2021):
890 curriculum videos, 858 with a quiz, 10,929 QA-certified questions,
15,557 studio voice clips, 3,217 hand-drawn illustrations — Pakistani
national curriculum, English + Urdu, all served from the public CDN bucket.
One command imports it: bot/scripts/setup/import-video-quiz-library.js.

Region-gated via region_features.video_quizzes_enabled (seeded ON for
'pakistan'; DEFAULT_REGION=pakistan switches it on). Both entry points
gated: the offer-after-video and share-code joins.

- New services: video-quiz{,-render,-sender,-share,-report,-invite},
  student-identity, flow-id-validator (boot-time Flow inventory check),
  video-quiz-report template (Lexend + Nastaliq PDF)
- Wiring: vq_ button/list routing, vq:/vqjoin: nfm_reply token routing,
  any-time QUIZ-<CODE> parser, quiz_video_report worker job (delay cascade)
- Student-videos endpoint v2: clean titles, duplicate-hiding
  (superseded_by), delivery tracking, quiz offer + survey suppression
- Two new registrar Flows: video-quiz-flow.json (RadioButtonsGroup,
  media-size large, complete action) + student-join-flow.json
- Schema: quiz_share_codes, video_quiz_deliveries, v_video_quiz_popularity,
  increment_share_code_uses(), media/option_feedback/render_pattern/
  external_id on quiz_questions, identity columns on quiz_sessions/students,
  student_video_feedback scope columns, in_progress status fix, RLS + seed
- Tests: 12 new suites (incl. region-gate red/green), full suite green
  (141 suites / 1462 tests); sanitized (no internal numbers/refs; share
  links disabled rather than defaulted when WHATSAPP_BOT_NUMBER unset)
Found by the 4-agent pre-publish leak swarm (secrets / DB-infra /
WABA-Meta / CDN-data lenses). The only real finding across all four:
the test env fixture carried a production WABA id where any 15-digit
number would do. Cloners bring their own WABA — nothing in this repo
may reference ours.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@hyasin270
hyasin270 merged commit ddfaff6 into main Jul 29, 2026
5 checks passed
@hyasin270
hyasin270 deleted the feat/video-quizzes branch July 29, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant