Architecture
The parts of Drive and how a file becomes a searchable document.
How it fits together
Drive watches one documents folder. Files you copy there, or upload in the web app, are read, translated and indexed. Your originals are never edited.
file in the documents folder
-> worker finds it and registers it with the API
-> extract text, OCR scanned pages
-> translate to the main language
-> embed (optional)
-> indexed in Postgres, ready to search
The parts
- Web: the React interface, served by Nginx, which proxies
/apito the API. - API: Go server for sign-in, metadata, search, uploads and the job queue.
- Worker: Go program that watches the folder and does the processing.
- Postgres: metadata and the search indexes (full-text and vectors).
- LibreTranslate: local translation.
- Embedding sidecar: optional, for semantic search.
Where data lives
Documents are in DRIVE_DOCUMENTS_LOCATION. Generated data is in DRIVE_APP_DATA_LOCATION, outside it. See Configuration.