Low-Tech API-Gateway für digitale Souveränität
Find a file
michael 0abc9791d3 fix(deployment): resolve OpenBSD rc.d service tracking and deployment workflow
- Fix OpenBSD service file pexp pattern to match actual running process
- Set pexp after sourcing rc.subr to prevent automatic override
- Update deployment script process detection from broken furt-lua pattern
- Add TTY-based daemon detection in start.sh for service vs development mode
- Implement comprehensive deployment workflow with backup and health checks
- Enable proper rcctl start/stop/check functionality on OpenBSD

Root cause: OpenBSD rc.subr automatically generates pexp from daemon+flags,
but actual process (/usr/local/bin/lua src/main.lua) differs from wrapper
(start.sh). Solution: Override pexp after rc.subr with correct Lua pattern.

Deployment script also had incorrect process detection pattern looking for
'furt-lua' string that doesn't exist in process name.

Technical details:
- Service file: pexp="/usr/local/bin/lua src/main.lua.*" after rc.subr
- Process detection: pgrep -u _furt -f 'src/main.lua'
- TTY detection: [ ! -t 0 ] for daemon vs interactive mode
- Complete deployment workflow with stop/sync/start/health-check cycle

Fixes #77 - OpenBSD rc.d service file problem resolved
Related: Deployment automation now fully functional karl→walter
2025-06-23 19:44:21 +02:00
.gitea/issue_template feat: Initiale Furt API-Gateway Projektstruktur 2025-06-03 16:39:17 +02:00
configs feat: functional monster script (anti-pattern warning) 2025-06-04 18:27:00 +02:00
devdocs refactor(architecture): migrate Furt concept from Go to C+Lua for digital sovereignty 2025-06-17 19:30:34 +02:00
furt-lua fix(deployment): resolve OpenBSD rc.d service tracking and deployment workflow 2025-06-23 19:44:21 +02:00
scripts fix(deployment): resolve OpenBSD rc.d service tracking and deployment workflow 2025-06-23 19:44:21 +02:00
.env.example fix(config): partial implementation of universal config detection (#68) 2025-06-22 18:39:38 +02:00
.gitignore fix(deployment): resolve OpenBSD rc.d service tracking and deployment workflow 2025-06-23 19:44:21 +02:00
go.mod feat: Initiale Furt API-Gateway Projektstruktur 2025-06-03 16:39:17 +02:00
LICENSE feat: Initiale Furt API-Gateway Projektstruktur 2025-06-03 16:39:17 +02:00
README.md feat(furt): implement complete Lua HTTP-Server for digital sovereignty (#63) 2025-06-17 20:40:40 +02:00

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:

API:

  • furt-lua/README.md - Lua-Implementation Details
  • docs/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.