124 lines
4.1 KiB
Markdown
124 lines
4.1 KiB
Markdown
# 🦉 Crumbforest CRM & RAG System
|
|
|
|
**Multilingual CRM mit Role-Based Chat, RAG-Funktionalität und Tagebuch-System.**
|
|
|
|
## ✨ Features
|
|
|
|
### 🎭 Role System (Neu!)
|
|
- **15 Unique Characters**: Von **DeepBit** (System Octopus) über **Prof. Eule** bis **Schraubaer**.
|
|
- **Role-Based Chat**: Dedizierte Chat-Interfaces für jede Rolle mit individueller Persona.
|
|
- **Memory & RAG**: Rollen haben Zugriff auf das "Nullfeld" (Wissensdatenbank) und erinnern sich an Kontext.
|
|
- **Mock Code Execution**: Simulierte Code-Ausführung für Python/PHP.
|
|
- **History Export**: Chat-Verläufe als JSON exportieren.
|
|
|
|
### 🎨 Theming & Accessibility
|
|
- **4 Themes**: Standard, Accessible, High Contrast, Admin Dark.
|
|
- **Settings Page**: User-spezifische Einstellungen für Schriftgröße und Animationen.
|
|
- **Group-Based Access**: Unterschiedliche Ansichten für Home, Demo und Admin.
|
|
|
|
### 🤖 RAG & Core
|
|
- **Document Auto-Indexing**: Markdown-Dateien werden automatisch in **Qdrant** indexiert.
|
|
- **Deep Memory**: Semantische Suche ermöglicht komplexes Kontext-Verständnis (z.B. "Was ist das Nullfeld?").
|
|
- **Multi-Provider**: Support für OpenAI, Anthropic Claude, Google Gemini und OpenRouter.
|
|
|
|
## 🚀 Quick Start
|
|
|
|
Das System läuft vollständig in Docker.
|
|
|
|
### 1. Setup & Start
|
|
Der `setup.sh` Script kümmert sich um alles (Environment, Docker Build, Start):
|
|
|
|
```bash
|
|
./setup.sh
|
|
```
|
|
|
|
### 2. Content laden (Wichtig!)
|
|
Dieses Repo enthält **nur die Engine** (Core). Der Inhalt (Wissensdatenbank, Tagebücher) wird separat geladen.
|
|
Nutze dafür den Content-Loader:
|
|
|
|
```bash
|
|
./load_content.sh <GIT_REPO_URL>
|
|
```
|
|
*Ohne URL sucht er nach dem Default-Repo (aktuell Platzhalter).*
|
|
|
|
### 3. Loslegen
|
|
|
|
Nach dem Start sind folgende Services erreichbar:
|
|
|
|
- **Web App**: [http://localhost:8000](http://localhost:8000)
|
|
- **Qdrant UI**: [http://localhost:6333/dashboard](http://localhost:6333/dashboard)
|
|
|
|
**Login Credentials:**
|
|
|
|
| User | Email | Password | Rolle |
|
|
|------|-------|----------|-------|
|
|
| **Admin** | `admin@crumb.local` | `admin123` | Vollzugriff, Terminal, RAG Config |
|
|
| **Demo** | `demo@crumb.local` | `demo123` | Chat, Rollen, Suche |
|
|
|
|
### 4. Bash Magic 🪄 (Scripts)
|
|
|
|
Das Projekt wird über Helper-Scripte im Root-Verzeichnis gesteuert. Kein `cd compose` nötig!
|
|
|
|
| Script | Beschreibung |
|
|
|--------|--------------|
|
|
| `./start.sh` | Startet alle Container und prüft Health |
|
|
| `./stop.sh` | Stoppt Container (alias: `docker compose stop`) |
|
|
| `./restart.sh` | Full Restart (Stop -> Start) |
|
|
| `./logs.sh` | Zeigt Logs an (Interaktives Menü) |
|
|
|
|
---
|
|
|
|
## 🧪 Testing
|
|
|
|
Das Projekt enthält eine umfangreiche Test-Suite, gesteuert über `test.sh`.
|
|
|
|
```bash
|
|
./test.sh
|
|
```
|
|
|
|
**Optionen:**
|
|
1. **Quick Test**: Health-Checks und API-Erreichbarkeit.
|
|
2. **Integration Test**: Der volle Flow:
|
|
- Erstellt Kind & Tagebucheintrag (Python auf Host)
|
|
- Indiziert den Eintrag via FastAPI in Qdrant
|
|
- Prüft semantische Suche und RAG-Antworten
|
|
- *Requires: Python 3 in lokaler Umgebung (wird via `.venv` automatisch eingerichtet)*
|
|
|
|
---
|
|
|
|
## 📂 Project Structure
|
|
|
|
- `crumbforest_config.json` - Zentrale Konfiguration für alle 15 Rollen & Themes.
|
|
- `app/routers/` - FastAPI Endpoints (Auth, Chat, RAG).
|
|
- `app/services/` - Business Logic (RAG Service, Provider Factory).
|
|
- `compose/` - Docker Configuration (`docker-compose.yml`, `.env`).
|
|
- `docs/` - Dokumentation und RAG-Quellen (Markdowns).
|
|
- `tests/` - Python Integration Tests.
|
|
|
|
## 🔧 Configuration
|
|
|
|
Die Konfiguration erfolgt über zwei Ebenen:
|
|
|
|
1. **Secrets (`compose/.env`)**: API Keys, Passwörter, Hostnames.
|
|
2. **App Config (`crumbforest_config.json`)**: Rollen-Definitionen, Prompts, UI-Themes.
|
|
|
|
**Wichtige Env-Vars:**
|
|
```bash
|
|
OPENROUTER_API_KEY=sk-or-...
|
|
MARIADB_ROOT_PASSWORD=...
|
|
# Ports werden in docker-compose.yml verwaltet (App: 8000, DB: 3306, Qdrant: 6333)
|
|
```
|
|
|
|
## 📖 Dokumentation
|
|
|
|
- **[walkthrough.md](walkthrough.md)** - Detaillierte Tour durch die letzten Änderungen.
|
|
- **[DATA_PRIVACY_LOCATION.md](DATA_PRIVACY_LOCATION.md)** - Datenschutz-Infos.
|
|
- **[test.sh](test.sh)** - Das zentrale Test-Script.
|
|
|
|
## 🦉 Happy Coding!
|
|
|
|
---
|
|
|
|
**Lizenz**: MIT License
|
|
**Kontakt**: OZM / Crumb B.
|