docs: readme mit endpoints, struktur und entwicklung
This commit is contained in:
45
README.md
Normal file
45
README.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# rag-ingestor
|
||||
|
||||
Microservice der Dateien aus Nextcloud (`Documents/THB/Studium/`) in Qdrant indexiert. Embeddings via Ollama.
|
||||
|
||||
## Endpoints
|
||||
|
||||
- `POST /webhook` (Header `X-Webhook-Secret`): Nextcloud-Event-Empfang (`created` / `updated` / `deleted`).
|
||||
- `POST /bulk-import` (Header `X-Webhook-Secret`): Body `{"path": "..."}` → rekursiver Re-Index.
|
||||
- `GET /health`: Liveness-Probe.
|
||||
|
||||
## Erwartete Ordnerstruktur
|
||||
|
||||
```
|
||||
Documents/THB/Studium/<N>.Semester/<Fach>/[<Unterordner>]/<datei>
|
||||
```
|
||||
|
||||
Unterstützte Dateitypen: `.pdf`, `.md`, `.docx`, `.xlsx` (XLSX wird nur als Filename indexiert, kein Inhalt).
|
||||
|
||||
## Konfiguration
|
||||
|
||||
Siehe `.env.example`. Alle Werte über Env-Vars, kein Config-File.
|
||||
|
||||
## Lokale Entwicklung
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
uv run pytest
|
||||
uv run uvicorn app.main:app --reload
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
Image bauen und in Coolify neben Qdrant + Ollama deployen:
|
||||
|
||||
```bash
|
||||
docker build -f docker/Dockerfile -t rag-ingestor .
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
```bash
|
||||
uv run pytest -v
|
||||
```
|
||||
|
||||
Tests deckt Pure-Logic ab (Metadata-Parser, Chunker, Extractors, Auth, Pipeline-Orchestrierung mit gemockten externen Services). Keine Integration-Tests gegen echte Ollama/Qdrant/WebDAV-Instanzen.
|
||||
Reference in New Issue
Block a user