← Corpus / dididecks-ai / sitemap
/api/slide-rank — read + write per-slide classifier state into the consumer's audits file
Dev-only API route (`prerender = false`) that reads + writes the audit registry at the consumer's `data/audits/slides.json` (default path; configurable via the integration options). GET returns the full ranks map; POST upserts a single `{deckSlug, variantSlug, slot, status}` entry with `rankedAt` ISO timestamp + `rankedBy: 'founder'`. Status `'pending'` is the implicit default — never persisted; a POST with `status === 'pending'` deletes the existing entry. Fails-soft in production static builds (the route doesn't exist there, both GET and POST 404 — SlideRankPill catches and degrades to read-only).
- Path
- sitemap/routes/api-slide-rank.md
- Authors
- Michael Staton
/api/slide-rank
Storage shape (schema 1)
{
"schema": 1,
"ranks": {
"<deckSlug>/<variantSlug>/<slot>": {
"status": "urgent-redo" | "non-urgent-could-be-better" | "passable" | "perfect",
"rankedAt": "<ISO-8601>",
"rankedBy": "founder",
"notes": null
}
}
}
Composite key deckSlug/variantSlug/slot via buildRankKey() so cross-deck rank data lives in one file per consumer.
Status
- ✅ Dev-only POST + GET working.
- ⚠️ Per-client database (V2) is a Phase D concern — public/share-tier ranks need real persistence, auth, telemetry. Today everything is local-dev only.
Related
- [[../components/SlideRankPill]] — primary consumer.
- [[toc]] — build-time reader.
- [[api-slide-decompose]] — sibling write-API.