{
  "markdown": "# examprep-api\n\nShared backend for examprep.softician.com (public) + examprep-admin.softician.com (admin).\nCloudflare Worker + D1, no framework, no build step.\n\n## Setup (one-time, via Cloudflare dashboard — no local Wrangler on this machine)\n1. Workers & Pages > D1 > Create database `examprep`, run `schema.sql` in its Console tab.\n2. Paste the resulting `database_id` into `wrangler.jsonc`.\n3. Workers & Pages > Create > Workers > Import a repository (this repo) for git-connected deploy.\n4. Worker Settings > Variables & Secrets: `TURNSTILE_SECRET`, `CF_ACCESS_TEAM_DOMAIN`, `CF_ACCESS_AUD`.\n5. In each of the `examprep` / `examprep-admin` Pages projects: Settings > Bindings > add a\n   Service Binding to this Worker (`examprep-api`), so their `worker.js` can call it same-origin\n   without any public hostname on this Worker.\n\n## Tests\n`node --test test/progress-consistency.test.js` — runs against an in-memory DB via Node's\nbuilt-in `node:sqlite` (no wrangler/workerd needed, which matters since this repo can't run those\nlocally on this machine). Currently just the progress-totals consistency check from the\n2026-08-05 admin-vs-site counter bug; add more test files under `test/` as needed.\n\n## Routes\nPublic (bearer token, minted by `/redeem`): `/questions/next`, `/answer`, `/progress`, `/prefs`.\nAdmin (Cloudflare Access-gated): `/console/codes`, `/console/codes/generate`, `/console/codes/revoke`,\n`/console/questions` (+ `create`/`update`/`delete`/`import`), `/console/stats`.\n\nSee the architecture plan for the full design.\n",
  "bytes": 1540,
  "sha": "740dc10733a0653be25280f39d5be4859af5be5b697f188accb709cea5d1028c",
  "repo_slug": "realtorfico/examprep-api",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_softician_examprep_notary_exam_prep_b3e13254/readme"
}