From 90d59c63b83630e685f9053965005d0961d70961 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 14 Mar 2026 12:52:11 +0000 Subject: [PATCH] Add bilingual README (EN/DE) and Podman containerization --- .github-repo-description.txt | 3 + README.de.md | 167 +++++++++++++++++++++++++++++++++++ README.md | 152 ++++++++++++++++++++++++++----- 3 files changed, 301 insertions(+), 21 deletions(-) create mode 100644 .github-repo-description.txt create mode 100644 README.de.md diff --git a/.github-repo-description.txt b/.github-repo-description.txt new file mode 100644 index 0000000..f703bca --- /dev/null +++ b/.github-repo-description.txt @@ -0,0 +1,3 @@ +Research Bridge - Self-hosted alternative to Perplexity with $0 running costs. SearXNG + Kimi for Coding research pipeline. FastAPI, Podman-ready, MIT licensed. + +Keywords: research, search, ai, llm, perplexity-alternative, searxng, kimi, fastapi, podman, self-hosted \ No newline at end of file diff --git a/README.de.md b/README.de.md new file mode 100644 index 0000000..c28a766 --- /dev/null +++ b/README.de.md @@ -0,0 +1,167 @@ +# 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 Β© 2024 Florian Hartmann / Insight-IT GmbH diff --git a/README.md b/README.md index da43678..2fed523 100644 --- a/README.md +++ b/README.md @@ -2,56 +2,166 @@ SearXNG + Kimi for Coding research pipeline. Self-hosted alternative to Perplexity with **$0 running costs**. -## Quick Start +[![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/) + +**[Deutsche Version](README.de.md)** + +--- + +## πŸš€ Quick Start + +### With Podman (Recommended) ```bash -# 1. Clone and setup -cd ~/data/workspace/projects/research-bridge +# Clone repository +git clone git@github.com:B0rbor4d/research-bridge.git +cd research-bridge + +# Start all services +podman-compose up -d + +# Check health +curl http://localhost:8000/health +``` + +### Manual Setup + +```bash +# Clone and setup python -m venv .venv source .venv/bin/activate pip install -e ".[dev]" -# 2. Start SearXNG +# Start SearXNG docker-compose -f config/searxng-docker-compose.yml up -d -# 3. Configure +# Configure export RESEARCH_BRIDGE_KIMI_API_KEY="sk-kimi-..." -# 4. Run +# Run python -m src.main ``` -## Usage +--- +## πŸ“‘ API Usage + +### Health Check +```bash +curl http://localhost:8000/health +``` + +### Search (Passthrough) +```bash +curl "http://localhost:8000/search?q=python+async+best+practices" +``` + +### Research with Synthesis ```bash curl -X POST http://localhost:8000/research \ -H "Content-Type: application/json" \ - -d '{"query": "latest rust web frameworks", "depth": "shallow"}' + -d '{ + "query": "latest rust web frameworks 2024", + "depth": "shallow", + "max_results": 10 + }' ``` -## Documentation +--- -- [Technical Design Document](docs/TDD.md) - Complete specification -- [AI Council Review](docs/AI_COUNCIL_REVIEW.md) - Architecture review +## πŸ—οΈ Architecture -## Project Structure +``` +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Client │────▢│ FastAPI │────▢│ SearXNG β”‚ +β”‚ Request β”‚ β”‚ Research β”‚ β”‚ (Search) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ Bridge β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ + β”‚ β”‚ + β–Ό β”‚ + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ + β”‚ Kimi for β”‚β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ Coding β”‚ Raw Results + β”‚ Synthesis β”‚ + β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ + β–Ό + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β”‚ Synthesized β”‚ + β”‚ Response β”‚ + β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +--- + +## πŸ”§ Configuration + +Environment variables: + +| Variable | Description | Default | +|----------|-------------|---------| +| `RESEARCH_BRIDGE_KIMI_API_KEY` | Kimi for Coding API key | - | +| `RESEARCH_BRIDGE_SEARXNG_URL` | SearXNG instance URL | `http://searxng:8080` | +| `RESEARCH_BRIDGE_RATE_LIMIT_RPM` | Rate limit (requests/min) | `60` | +| `RESEARCH_BRIDGE_LOG_LEVEL` | Logging level | `info` | + +--- + +## πŸ“ Project Structure ``` research-bridge/ β”œβ”€β”€ src/ -β”‚ β”œβ”€β”€ api/ # FastAPI routes +β”‚ β”œβ”€β”€ api/ # FastAPI routes and middleware β”‚ β”œβ”€β”€ search/ # SearXNG client β”‚ β”œβ”€β”€ llm/ # Kimi for Coding synthesizer β”‚ β”œβ”€β”€ models/ # Pydantic models β”‚ └── middleware/ # Rate limiting, auth -β”œβ”€β”€ tests/ -β”‚ β”œβ”€β”€ unit/ # Mocked, isolated -β”‚ β”œβ”€β”€ integration/ # With real SearXNG -β”‚ └── e2e/ # Full flow -β”œβ”€β”€ config/ # Docker, settings -└── docs/ # Documentation +β”œβ”€β”€ tests/ # Test suite (unit, integration, e2e) +β”œβ”€β”€ config/ # Docker and settings +β”œβ”€β”€ docs/ # Documentation +β”œβ”€β”€ Containerfile # Podman/Docker build +└── podman-compose.yml # Full stack deployment ``` -## License +--- -MIT +## πŸ§ͺ Testing + +```bash +# Run all tests +pytest + +# With coverage +pytest --cov=src --cov-report=html + +# Specific test categories +pytest tests/unit/ # Fast, mocked +pytest tests/integration/ # With real SearXNG +pytest tests/e2e/ # Full pipeline +``` + +--- + +## πŸ“š Documentation + +- [Technical Design Document](docs/TDD.md) - Complete specification +- [AI Council Review](docs/AI_COUNCIL_REVIEW.md) - Architecture review + +--- + +## 🀝 Why Research Bridge? + +| Service | Cost per 1K queries | Self-hosted | Privacy | +|---------|---------------------|-------------|---------| +| Perplexity Pro | ~$20/month | ❌ | ❌ | +| OpenAI GPT-4 | ~$10-30 | ❌ | ❌ | +| **Research Bridge** | **$0** | βœ… | βœ… | + +--- + +## πŸ“œ License + +MIT Β© 2024 Florian Hartmann / Insight-IT GmbH