# Research Bridge SearXNG + Kimi for Coding Research Pipeline. Self-hosted Alternative zu Perplexity mit **$0 laufenden Kosten**. [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Podman Ready](https://img.shields.io/badge/podman-ready-green.svg)](https://podman.io/) **[English Version](README.md)** --- ## πŸš€ Schnellstart ### Mit Podman (Empfohlen) ```bash # Repository klonen git clone git@gitea.ragtag.rocks:b0rbor4d/research-bridge.git cd research-bridge # Alle Services starten podman-compose up -d # Health-Check curl http://localhost:8000/health ``` ### Manuelle Einrichtung ```bash # Repository klonen und einrichten python -m venv .venv source .venv/bin/activate pip install -e ".[dev]" # SearXNG starten docker-compose -f config/searxng-docker-compose.yml up -d # Konfigurieren export RESEARCH_BRIDGE_KIMI_API_KEY="sk-kimi-..." # Starten python -m src.main ``` --- ## πŸ“‘ API-Nutzung ### Health Check ```bash curl http://localhost:8000/health ``` ### Suche (Passthrough) ```bash curl "http://localhost:8000/search?q=python+async+best+practices" ``` ### Recherche mit Synthese ```bash curl -X POST http://localhost:8000/research \ -H "Content-Type: application/json" \ -d '{ "query": "neue rust web frameworks 2024", "depth": "shallow", "max_results": 10 }' ``` --- ## πŸ—οΈ Architektur ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Client │────▢│ FastAPI │────▢│ SearXNG β”‚ β”‚ Request β”‚ β”‚ Research β”‚ β”‚ (Suche) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ Bridge β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β–Ό β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ Kimi for β”‚β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ Coding β”‚ Rohdaten β”‚ Synthese β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Synthetisierteβ”‚ β”‚ Antwort β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` --- ## πŸ”§ Konfiguration Umgebungsvariablen: | Variable | Beschreibung | Standard | |----------|-------------|----------| | `RESEARCH_BRIDGE_KIMI_API_KEY` | Kimi for Coding API-Key | - | | `RESEARCH_BRIDGE_SEARXNG_URL` | SearXNG Instanz-URL | `http://searxng:8080` | | `RESEARCH_BRIDGE_RATE_LIMIT_RPM` | Rate-Limit (Anfragen/Min) | `60` | | `RESEARCH_BRIDGE_LOG_LEVEL` | Log-Level | `info` | --- ## πŸ“ Projektstruktur ``` research-bridge/ β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ api/ # FastAPI Routen und Middleware β”‚ β”œβ”€β”€ search/ # SearXNG Client β”‚ β”œβ”€β”€ llm/ # Kimi for Coding Synthese β”‚ β”œβ”€β”€ models/ # Pydantic Modelle β”‚ └── middleware/ # Rate-Limiting, Auth β”œβ”€β”€ tests/ # Tests (Unit, Integration, E2E) β”œβ”€β”€ config/ # Docker und Einstellungen β”œβ”€β”€ docs/ # Dokumentation β”œβ”€β”€ Containerfile # Podman/Docker Build └── podman-compose.yml # VollstΓ€ndiger Stack ``` --- ## πŸ§ͺ Tests ```bash # Alle Tests ausfΓΌhren pytest # Mit Coverage pytest --cov=src --cov-report=html # Spezifische Test-Kategorien pytest tests/unit/ # Schnell, gemockt pytest tests/integration/ # Mit echtem SearXNG pytest tests/e2e/ # Komplette Pipeline ``` --- ## πŸ“š Dokumentation - [Technical Design Document](docs/TDD.md) - VollstΓ€ndige Spezifikation (EN) - [AI Council Review](docs/AI_COUNCIL_REVIEW.md) - Architektur-Review (EN) --- ## 🀝 Warum Research Bridge? | Service | Kosten pro 1K Anfragen | Self-hosted | Datenschutz | |---------|------------------------|-------------|-------------| | Perplexity Pro | ~$20/Monat | ❌ | ❌ | | OpenAI GPT-4 | ~$10-30 | ❌ | ❌ | | **Research Bridge** | **$0** | βœ… | βœ… | --- ## πŸ“œ Lizenz MIT Β© 2026 Florian Hartmann / Insight-IT GmbH