- Add comprehensive API-key authentication system with X-API-Key header validation - Implement permission-based access control (mail:send, * for admin) - Add rate-limiting system (60 req/hour per API key, 100 req/hour per IP) - Refactor monolithic 590-line main.lua into 6 modular components (<200 lines each) - Add IP-restriction support with CIDR notation (127.0.0.1, 10.0.0.0/8) - Implement Hugo integration with CORS support for localhost:1313 - Add production-ready configuration with environment variable support - Create comprehensive testing suite (auth, rate-limiting, stress tests) - Add production deployment checklist and cleanup scripts This refactoring transforms the API gateway from a single-file monolith into a biocodie-compliant modular architecture while adding enterprise-grade security features. Performance testing shows 79 RPS concurrent throughput with <100ms latency. Hugo contact form integration tested and working. System is now production-ready for deployment to walter/aitvaras. Resolves #47 |
||
|---|---|---|
| .gitea/issue_template | ||
| configs | ||
| devdocs | ||
| furt-lua | ||
| scripts | ||
| .env.example | ||
| .gitignore | ||
| go.mod | ||
| LICENSE | ||
| README.md | ||
Furt API Gateway
Low-Tech API-Gateway für digitale Souveränität
Von Go zu C+Lua - Corporate-freie Technologie-Migration
Überblick
Furt ist ein minimalistischer API-Gateway, der verschiedene Services unter einer einheitlichen API vereint. Der Name "Furt" (germanisch für "Durchgang durch Wasser") symbolisiert die Gateway-Funktion: Alle Requests durchqueren die API-Furt um zu den dahinterliegenden Services zu gelangen.
Technologie-Migration
🔄 Strategische Neuausrichtung (Juni 2025):
- Von: Go-basierte Implementation (Corporate-controlled)
- Zu: C + Lua Implementation (maximale Souveränität)
- Grund: Elimination von Google-Dependencies für echte digitale Unabhängigkeit
Aktuelle Implementierungen
🆕 furt-lua (Aktiv entwickelt)
Pure Lua HTTP-Server - Week 1 ✅
- ✅ HTTP-Server mit lua-socket
- ✅ JSON API-Endpoints
- ✅ Basic Routing und Error-Handling
- ✅ Mail-Service-Grundgerüst
- 🔄 SMTP-Integration (Week 2)
cd furt-lua/
./scripts/start.sh
# Server: http://127.0.0.1:8080
📦 Go-Implementation (Parallel/Legacy)
- Ursprüngliche Planung in
cmd/,internal/ - Wird durch Lua-Version ersetzt
- Referenz für API-Kompatibilität
Philosophie
- Technologie-Souveränität: Nur akademische/unabhängige Technologien
- Low-Tech-Ansatz: C + Lua statt Corporate-Runtimes
- Minimale Dependencies: < 5 externe Libraries
- Modulare Architektur: < 200 Zeilen pro Modul
- Vollständige Transparenz: Jede Zeile Code verstehbar
- Langfristige Stabilität: 50+ Jahre bewährte Technologien
Tech-Stack (Final)
Souveräne Technologien:
- C (GCC + musl) - Kern-Performance
- Lua (PUC-Rio University) - Business-Logic
- LMDB (Howard Chu/Symas) - Datenbank
- OpenBSD httpd - Reverse-Proxy (langfristig)
Corporate-frei: Keine Google-, Microsoft-, oder VC-kontrollierten Dependencies
Services
- formular2mail: Kontaktformulare zu E-Mail (Week 1 ✅)
- sagjan: Selbst-gehostetes Kommentarsystem
- lengan: Projektverwaltung
- budlam: Kontaktverwaltung
- Weitere: Shop, Newsletter, Kalendar, etc.
Installation & Entwicklung
Quick Start (furt-lua)
# Dependencies (Arch Linux)
pacman -S lua lua-socket lua-cjson
# Start Development-Server
cd furt-lua/
chmod +x scripts/start.sh
./scripts/start.sh
# Test
curl -X POST http://127.0.0.1:8080/test \
-H "Content-Type: application/json" \
-d '{"test":"data"}'
Testing
# Automated Tests
cd furt-lua/
lua tests/test_http.lua
# Manual curl Tests
./scripts/test_curl.sh
Roadmap
Phase 1: Lua-Foundation (4 Wochen) ✅
- Week 1: HTTP-Server + Mail-Service-Grundgerüst
- Week 2: SMTP-Integration + API-Key-Auth
- Week 3: Service-Expansion (Comments)
- Week 4: Production-Ready (HTTPS, Systemd)
Phase 2: C-Integration (4-6 Wochen)
- C-HTTP-Server für Performance
- C ↔ Lua Bridge
- Memory-Management + Security-Hardening
Phase 3: Infrastructure-Migration (6-12 Monate)
- OpenBSD-Migration
- ISPConfig → eigene Scripts
- Apache → OpenBSD httpd
Dokumentation
Development:
devdocs/furt_konzept.md- Technische Architekturdevdocs/furt_master_strategy.md- 18-24 Monate Roadmapdevdocs/furt_development_process.md- Development-Guidelines
API:
furt-lua/README.md- Lua-Implementation Detailsdocs/api/- API-Dokumentation (in Entwicklung)
Technologie-Rationale
Warum Lua statt Go?
- Go = Google-controlled (Module-Proxy, Telemetrie)
- Lua = PUC-Rio University (echte Unabhängigkeit)
- C + Lua = 50+ Jahre bewährt vs. Corporate-Runtime
- Performance: 10x weniger Memory, 5x weniger CPU
Teil der Dragons@Work Digital-Sovereignty-Strategie
Status
🚀 Week 1 Complete: Lua HTTP-Server funktional
🔄 Week 2 Active: SMTP-Integration + Hugo-Integration
📋 Week 3+ Planned: Service-Expansion + C-Migration
Lizenz
Apache License 2.0 - Siehe LICENSE für Details.
Furt steht im Einklang mit den Prinzipien digitaler Souveränität und dem Low-Tech-Ansatz des Dragons@Work-Projekts.