feat: FAPP — Free Appointment Propagation Protocol for psychotherapy discovery

This commit is contained in:
2026-03-31 09:29:41 +00:00
parent e2c04cf0c3
commit cbfa7e16c4
4 changed files with 1261 additions and 0 deletions

View File

@@ -1,5 +1,32 @@
# Status Log
## 2026-03-31 — FAPP: Free Appointment Propagation Protocol
### Completed
- **Protocol spec** — `docs/specs/fapp-protocol.md`: decentralized psychotherapy appointment discovery over mesh
- **Rust module** — `crates/quicprochat-p2p/src/fapp.rs`: full data structures, store, query matching, signature verification
- **Message types**: SlotAnnounce, SlotQuery, SlotResponse, SlotReserve, SlotConfirm
- **Domain model**: Fachrichtung, Modalitaet, Kostentraeger, SlotType (German enum names for domain concepts)
- **FappStore**: in-memory cache with dedup (therapist_address + sequence), TTL expiry, signature verification, capacity limits
- **Query matching**: filter by Fachrichtung, Modalitaet, Kostentraeger, PLZ prefix, time range, SlotType, max_results
- **Tests**: 16 inline tests covering creation, signing, verification, tampering, forwarding, expiry, CBOR roundtrip, store dedup, sequence supersede, query filters (PLZ, SlotType, Kostentraeger, max_results)
- **Privacy model**: therapist identity public (Approbation-bound), patient queries anonymous
### Design Decisions
- Extends announce.rs capability bitfield with CAP_FAPP_THERAPIST (0x0100), CAP_FAPP_RELAY (0x0200), CAP_FAPP_PATIENT (0x0400)
- Uses same signing pattern as MeshAnnounce: hop_count excluded from signature, forwarding nodes don't re-sign
- CBOR wire format consistent with existing envelope/announce code
- Location hint is PLZ only (e.g. "80331") — never exact address
- Anti-spam: Approbation hash binding, signature verification, sequence-based dedup, rate limiting, TTL enforcement
### What's Next
- Integrate FAPP message handling into mesh_router.rs
- SlotReserve/SlotConfirm E2E encryption (X25519 key exchange)
- Return-path routing for anonymous SlotQuery responses
- Rate limiting per therapist address in FappStore
---
## 2026-03-30 — Implementation Sprint (S4-S5 + MLS-Lite)
### Completed