Technical reference
ML Prep has no server API. It publishes static data and exposes a browser-local JavaScript bridge.
Static data
| Path | Contents |
|---|---|
/data/catalog.json | Canonical scope with separate Screening and Practice collections |
/data/search.json | Search data with collection, topic, skills, and difficulty |
/item/:id.md | One item in Markdown |
/item/:id.json | One item in JSON |
Browser bridge
window.mlPrepAgent provides:
- search:
searchItems - attempts:
getAttempts,appendAttempt,deleteAttempt - custom sets:
listCustomSets,getCustomSet,saveCustomSet,deleteCustomSet
await window.mlPrepAgent.ready;
const questions = await window.mlPrepAgent.searchItems({ collection: "screening", text: "gradient descent" });
const practice = await window.mlPrepAgent.searchItems({ collection: "practice", skills: ["gradient-update"] });Local data
Attempts and custom sets are stored in origin-scoped IndexedDB.
Schemas: item, attempt, custom set.