[frontend] Any Wikipedia topic as a cited, token-budgeted dossier pinned to one article revision.
752
Turns a Wikipedia topic into a dossier pinned to one article revision, cut to a token budget.
wke-api serves REST, MCP and /llms.txt and runs the job worker, the watcher, the
trending job and the nightly refresh job, which keeps stored dossiers from expiring and
asks for a rebuild when the article was edited. It does not import torch.wke-ml embeds and clusters sections and, on request, summarises. Without it the API
groups sections by article structure instead.wke-web is a React single-page app served by nginx.A cold build costs three Wikimedia calls and a warm read costs none.
/llms.txt and an MCP server?summaries=true, each labelled as model outputYou need Docker with Compose; without Docker also uv, pnpm and just.
cp backend/api/.env.example backend/api/.env
# set WKE_CONTACT_EMAIL: a mailbox or an https URL, sent in the Wikimedia User-Agent
docker compose -f docker-compose.dev.yml --profile ml up --build
Open http://localhost:8080, not :5173 or a container address: the CORS settings name
localhost:8080. Leave --profile ml out to run without wke-ml.
curl -s -X POST http://localhost:8080/api/v1/dossiers \
-H 'content-type: application/json' -d '{"title": "Alan Turing"}'
curl -s 'http://localhost:8080/api/v1/dossiers/1208.md?budget=8000' # once built
Without Docker, just up starts Redis, wke-ml, wke-api, the watcher and a web preview
(Linux; run pnpm install in frontend/app once), and just down stops them. The
per-service commands are in the READMEs under backend/ and frontend/app/.
cd backend/api && uv run pytest --cov=wke --cov-fail-under=85
cd backend/ml && uv run pytest
cd frontend/app && pnpm run verify && pnpm run verify:e2e
The backend tests replay recorded Wikimedia responses and run offline.
The REST contract is backend/api/openapi.yaml; endpoints and settings are in backend/api/README.md.
| Entry point | Path |
|---|---|
| Build or read a dossier | POST /api/v1/dossiers, GET /api/v1/dossiers/{page_id}[.md] |
| Poll a build | GET /api/v1/jobs/{job_id} |
| Models | GET /llms.txt, /mcp with search_topics, get_dossier, get_trending |
MIT for code.
Third-party material keeps its own licence (fonts, model weights, Wikipedia text); see NOTICE.
Article text served through WKE is from English Wikipedia under CC BY-SA 4.0.
To the only God, be honour and glory for ever and ever.
Content type
Image
Digest
sha256:88f79bc36…
Size
12.8 MB
Last updated
1 day ago
docker pull straightchlorine/wke-web