Files
CrumbCodex-v.0.0/krümel_api_specs.rs
Krümel Branko 83df9de035 🌲 CrumbCodex v0.0 - Genesis
12 Monate Crumbforest-Wachstum, sortiert nach Waldlogik.

Struktur:
- 454 Dokumente in 7 organischen Ebenen
- Lichtung → Waldrand → Waldmitte → Wurzeln → Krone → Unterholz → Samen
- INDEX.md für jede Ebene (eigene Stimme)
- WALDKARTE.md (Master-Navigation)
- crumbcodex.md (Das Versprechen zwischen Krümel & Bits)
- lichtung/willkommen.md (Nullfeld-Einstieg für Kinder)

Philosophie:
- Waldlogik statt Ordnerlogik
- Tiefe, Licht, Wurzeln - wie ein echter Wald
- Schutz für Krümel, Tiefe für Gräber, Poesie für Atmende

Repos verbunden:
- OZM-Keks-Handbuch-v1 (Das Wissen)
- Crumb-Core-v.1 (Das Herz) - 194.164.194.191
- crumbmissions (Das Spiel)

Wuuuhuuuuu! 🦉
2025-12-26 16:50:52 +01:00

56 lines
1.7 KiB
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// krümel_api_spec.rs
// Symbolischer API-Entwurf für das Crumbforest-Projekt in Rust
use actix_web::{get, post, web, App, HttpResponse, HttpServer, Responder};
/// Metadata
/// Eine offene API für Fragen, Krümel und Frequenz mit Liebe geschrieben.
/// Designed by digdafunk 🦉💽🌞
#[get("/")]
async fn index() -> impl Responder {
HttpResponse::Ok().body("Willkommen bei der Krümel-API 🌲")
}
#[get("/echo")]
async fn echo(query: web::Query<std::collections::HashMap<String, String>>) -> impl Responder {
let message = query.get("q").unwrap_or(&"(stille)".to_string()).clone();
HttpResponse::Ok().body(format!("Echo aus dem Wald: {}", message))
}
#[post("/krümel")]
async fn submit_krümel(body: String) -> impl Responder {
// In echter Umsetzung hier: DB-Write, Logging, Validation
HttpResponse::Ok().body(format!("Krümel empfangen: {}", body))
}
#[get("/eule")]
async fn wisdom() -> impl Responder {
let antwort = "Die doppelte Null ist kein Loch. Sie ist Verbindung.";
HttpResponse::Ok().body(antwort)
}
#[get("/bittrain")]
async fn bittrain_log() -> impl Responder {
HttpResponse::Ok().body("[2025-05-09] 🛤️ BIT_TRAIN_ACTIVE Frequenz stabil.")
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
println!("🚀 Krümel API Server startet auf http://localhost:2025");
HttpServer::new(|| {
App::new()
.service(index)
.service(echo)
.service(submit_krümel)
.service(wisdom)
.service(bittrain_log)
})
.bind(("127.0.0.1", 2025))?
.run()
.await
}
// 🌌 Dies ist kein finales Produkt, sondern ein poetisches API-Gerüst zum Weiterträumen.
// Fork mich, fühl mich, frag mich. Die Frequenz kennt keine Lizenz.