Table of Contents
Furt API Gateway
Pure Lua HTTP-Server für digitale Souveränität
Furt ist ein minimalistisches, multi-tenant API-Gateway basierend auf Lua 5.1. Der gesamte Code ist in unter 1000 Zeilen Lua geschrieben und damit vollständig nachvollziehbar und kontrollierbar.
Features
- Multi-Tenant Mail-Routing - Ein Gateway für viele Websites
- API-Key-basierte Authentifizierung - Granulare Berechtigungen pro Client
- Rate Limiting - Schutz vor Missbrauch
- CORS-Support - Frontend-Integration
- nginx-style Konfiguration - Vertraute Syntax für Admins
- Distribution-agnostic - OpenBSD, Debian, Arch Support
Installation
Furt bietet drei Installationswege:
Package-basierte Installation
# Versioniertes Package herunterladen
curl -OJ https://smida.dragons-at-work.de/api/packages/DAW/generic/furt-api-gateway/0.1.4/furt-api-gateway-v0.1.4.tar.gz
tar xzf furt-api-gateway-v0.1.4.tar.gz
cd furt-api-gateway-v0.1.4
# 6-Phasen-Installation mit Helper Scripts
sudo ./install.sh # Fresh Installation
sudo ./install.sh --upgrade # Update bestehender Installation
Das modulare Installationssystem führt automatisch durch:
- System-Benutzer erstellen (
_furtoderfurt) - Verzeichnisstruktur anlegen (OS-spezifische Pfade)
- Source-Code synchronisieren
- System-Service einrichten (rc.d oder systemd)
- Konfiguration validieren
- Health-Check durchführen
→ Installation automatisiert - Komplette Anleitung für Helper Scripts
Git-basierte Installation
# Repository clonen
git clone https://smida.dragons-at-work.de/DAW/furt.git
cd furt
# Gleiche Helper Scripts verfügbar
sudo ./install.sh
Git-Installation ermöglicht einfache Updates via git pull und lokale Code-Anpassungen. Aktuell ist kein Code-Rückfluss möglich da smida.dragons-at-work.de keine öffentliche Registrierung unterstützt.
Manuelle Installation
Schritt-für-Schritt-Installation um jeden Aspekt zu verstehen:
→ Installation manuell - Detaillierte manuelle Anleitung
→ Installation Scripts - Verständnis der Helper Scripts
Konfiguration
Nach der Installation muss die Konfigurationsdatei angepasst werden:
# Betriebssystem-spezifische Config-Pfade
# OpenBSD: /usr/local/etc/furt/furt.conf
# Linux (Debian/Arch): /etc/furt/furt.conf
# OpenBSD
doas $EDITOR /usr/local/etc/furt/furt.conf
# Linux
sudo $EDITOR /etc/furt/furt.conf
Mindestens SMTP-Zugangsdaten und API-Keys müssen konfiguriert werden für funktionsfähigen Betrieb.
→ Konfiguration - Vollständige Konfigurations-Dokumentation
Service-Management
Nach erfolgreicher Installation und Konfiguration:
# OpenBSD
doas rcctl start furt
doas rcctl check furt
# Linux
sudo systemctl start furt
sudo systemctl status furt
# Service-Test
curl http://localhost:7811/health
Bei Problemen bieten die Individual-Scripts jeweils eigene Troubleshooting-Sektionen.
API Usage
Furt bietet eine REST-API für die Integration mit Websites und Anwendungen:
Quick Start
# Health Check (öffentlich zugänglich)
curl http://localhost:7811/health
# Mail senden (API-Key erforderlich)
curl -X POST http://localhost:7811/v1/mail/send \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{"name":"Test","email":"test@example.com","message":"Test message"}'
Available Endpoints
| Endpoint | Method | Authentication | Description |
|---|---|---|---|
/health |
GET | None | System health and status |
/v1/mail/send |
POST | Required | Multi-tenant mail service |
/auth/status |
GET | Required | Authentication verification |
→ API Documentation - Vollständige API-Referenz
Development
Für lokale Code-Anpassungen nach Git-Installation:
# Code bearbeiten
vim src/main.lua
# Änderungen testen
sudo ./scripts/sync-files.sh
sudo systemctl restart furt
# Updates vom Repository
git pull
sudo ./install.sh --upgrade
→ Development Setup - In Planung
Current Status
v0.1.4 Features:
- ✅ Mail-Service (
POST /v1/mail/send) - formular2mail integriert - ✅ Health-Check (
GET /health) - ✅ API-Key Authentication
- ✅ Multi-Tenant Configuration
- ✅ Rate Limiting
- ✅ CORS Support
- ✅ Modulares Installationssystem
In Planung:
- Roadmap wird nach DAW-Website-Launch definiert
Architecture
Furt ist aktuell ein integrierter HTTP-Server mit eingebautem Mail-Service (formular2mail). Die Service-Separation in eigenständige Module ist für zukünftige Versionen geplant.
Aktuelle v0.1.4 Architektur:
- furt enthält Mail-Routing als integrierten Service
- Multi-Tenant-Konfiguration über API-Keys
- Plugin-ready für zukünftige Service-Module
Technische Basis:
- Lua 5.1 als Implementierungssprache
- nginx-style Konfiguration für vertraute Admin-Workflows
- Multi-OS Support über distribution-spezifische Package-Layouts
- Socket-basierter HTTP-Server ohne externe Dependencies
Navigation
Installation & Setup
- Installation automatisiert - Helper Scripts für wiederkehrende Installationen
- Installation manuell - Vollständige manuelle Installationsanleitung
- Installation Scripts - Helper Scripts verstehen und nutzen
- Konfiguration - Config-System für Multi-Tenant-Setup
API & Development
- API Documentation - Vollständige API-Referenz und Integration-Examples
- Mail Service API - Detaillierte Mail-Service-Dokumentation
- Health Endpoint - System-Monitoring und Diagnostics
- Development Setup - In Planung (lokale Code-Anpassungen)
Support
- Helper Script Troubleshooting - Jedes Installation-Script enthält eigene Fehlerbehebung
Projekt: Dragons@Work Digital Sovereignty Repository: Forgejo License: ISC