Base URL: http://127.0.0.1:5050. JSON errors use { "ok": false, "error": "..." }.
GET /api/v1/levelsreturns puzzle metadata.GET /api/v1/level/<id>returns one puzzle.GET /api/v1/achievementsreturns local achievements.GET /api/v1/contributorsreturns the contributor manifest.GET /healthandGET /readyreturn service status.
POST /api/v1/submit is the versioned equivalent of /submit.
{"level_id": "1", "attempt": "-a"}A successful request returns correct: true|false. Script puzzles accept a files object instead of, or alongside, attempt:
{"level_id": "5", "files": {"answer.c": "int main(void) { return 0; }"}}Submissions are currently validated without an account and progress is local JSON state. Clients must not assume completion is synchronized across devices.
Authentication is not enabled in the current local-first server. Before hosted multi-user use, add:
POST /api/v1/auth/register-> access and refresh tokensPOST /api/v1/auth/login-> access and refresh tokensPOST /api/v1/auth/refresh-> rotated access tokenPOST /api/v1/auth/logout-> revoke refresh token
Authenticated requests should send Authorization: Bearer <access-token>. POST /api/v1/submit, profile, progress, and sync endpoints must require authentication. Passwords must use a maintained password-hashing library, refresh tokens must be stored hashed, and login/submit endpoints need rate limits.
POST /api/v1/sync should accept idempotent attempt events with client IDs and return the server cursor plus conflict decisions. The database repository should support SQLite for single-instance installs and PostgreSQL for hosted deployments.