CLAUDE.md (874B)
1 # Beegram Development Guidelines 2 3 ## Philosophy 4 5 - **Explicit over clever** - No magic helpers, readable top-to-bottom 6 - **Pure functions** - Isolate logic from I/O 7 - **Linear flow** - Avoid callbacks where possible 8 - **Minimize shared state** - Pass values explicitly 9 - **Minimize indirection** - Don't hide logic behind abstractions 10 11 ## Architecture 12 13 ``` 14 Frontend (QML) 15 │ 16 ▼ 17 network_manager.rs ← Owns state, dispatches to Qt 18 │ 19 ▼ 20 http_client.rs ← Pure async functions (stateless) 21 sse_client.rs ← Channel-based events 22 keychain.rs ← Credential storage 23 types.rs ← Shared types 24 ``` 25 26 - `http_client.rs`: Pure functions taking `(client, token, params) -> Result` 27 - `network_manager.rs`: Owns state, passes it explicitly to pure functions 28 - Each frontend adapter owns its own state, calls shared pure functions