Ops, Seeding, and Admin Curation
Seed demo data, create starter collections, manage curation, tags, and flags.
Dev seed endpoints
Seed sample templates (Grade 8 Language)
- GET
/api/dev/seed - Imports
apps/web/lib/content/bundles/grade8-language.ndjsonand sets templates active/public. Idempotent if already seeded.
- GET
Seed starter collections by account
- POST
/api/dev/seed-starter-collections - Body:
{ accountSlug: string }e.g.{ "accountSlug": "testclass50" } - Creates/updates
Starters: Grade 8 Languagecollection with recent public Grade 8 Language templates.
- POST
Note: dev-only. Returns 404 in production.
Admin curation
- Featured rows editor:
/admin/curation- Manage curated collections used for homepage/library rows.
- Add/remove items by title, reorder, and save (persists via
/api/collections).
Tags (My Library)
- Endpoints
- GET
/api/tags?accountId=<uuid>→{ [templateId]: string[] } - POST
/api/tags{ accountId, templateId, tag } - DELETE
/api/tags?accountId=<uuid>&templateId=<uuid>&tag=<text>
- GET
- Client keeps local tags in
localStorageand syncs to server best‑effort for cross-device access.
Governance (Flag resource)
- Flag from resource detail page
- POST
/api/flags{ accountId, templateId, reason, notes? }→ statusopen
- POST
- Admin review queue
/admin/flags- GET
/api/flags?accountId=<uuid> - PUT
/api/flags{ id, status }with status inopen|in_review|resolved|dismissed
Notes
- Next.js route handlers with auth via
enhanceRouteHandler. - DB tables:
assignment_templates,resource_collections,resource_collection_items,resource_tags,resource_flags.