Offline knowledge box: a local-first web UI designed to navigate massive datasets (Wikipedia dumps, maps tiles, documents, and local AI models) without internet.
- Fully offline usage, resilient to network outages.
- Designed for large-scale data (indexed search, paginated results, streaming viewers).
- Simple, fast UI in plain HTML/CSS/JS.
- Clear separation between UI shell and future local APIs.
- Multilingual translation for non-English content via local models.
- UI shell with sections for search, tools, and placeholders for data modules.
- Frontend calls local endpoints (offline backend):
POST /chatfor local AI Q&APOST /translatefor local translation (future)
GET /status-> storage, indexes, dataset countsGET /search?q=...&page=...&filters=...-> paginated resultsGET /doc/:id-> document metadata and contentGET /map/tiles/{z}/{x}/{y}-> offline tilesGET /health-> health checkGET /models-> local model listPOST /chat-> local chatPOST /completion-> local completionGET /status-> local system statsGET /datasets-> list registered datasetsGET /indexes-> list registered indexesPOST /translate-> local translation (stub)POST /datasets/import-> register local datasets (stub)POST /indexes/create-> register index (stub)POST /vision/analyze-> analyze images (stub)POST /rag/query-> RAG query (stub)
Constraints:
- No Internet dependency
- No external APIs
- Single machine (LAN access optional)
Skeleton structure:
backend/api/FastAPI routesbackend/inference/local inference stub (llama.cpp later)backend/database/SQLite storagebackend/config/settings.yamlmodel config
Run locally:
run.sh(Linux/macOS)run.bat(Windows)
Docs:
GET /-> API OKGET /index-> local HTML landing pageGET /docs-> Swagger UIGET /redoc-> ReDoc
models/place AI models here (not committed)data/SQLite and dataset/index storage (local)
The backend now routes all inference through a model manager: API -> ModelManager -> Model -> Engine -> Model files.
- Base API:
backend/requirements.txt - AI stack (install later):
backend/requirements-ai.txt
index.htmlmain shell + navigationmistral.htmllocal AI chatonnx-trad.htmllocal translationsignet.htmllocal bookmarkssrc/css/style.cssshared stylingsrc/javascript/UI scripts