on 2026.05.06.0015 help sign in
skrepka/CLAUDE.md
49 lines 1.6 kB history raw
1# CLAUDE.md
3Decentralized E2E encrypted messenger. No accounts, no home servers — identity is a keypair.
5## Tech Stack
7- **Client:** F# / .NET 10 / Fabulous (Elm-style MVU) + Avalonia UI
8- **Server:** Knot (custom functional language, compiled via Rust toolchain)
9- **Crypto:** libsodium (Ed25519 + X25519 + XChaCha20-Poly1305)
10- **Persistence:** SQLite via Dapper.FSharp (client), in-memory (server)
12## Project Layout
14- `client/` — F# cross-platform app (macOS, iOS)
15 - `App.fs` — Main state machine (Model/Msg/CmdMsg/update/view)
16 - `Crypto.fs` — Encryption/decryption, key derivation
17 - `ApiClient.fs` — HTTP transport (auth, poll, send)
18 - `Store.fs` — SQLite persistence
19 - `Phonemic.fs` — Urbit @p syllable encoding for human-readable keys
20 - `Buttons.fs` — Animated button component
21 - `Platform/Desktop/` — macOS entry point
22 - `Platform/iOS/` — iOS entry point + native photo picker
23- `server.knot` — Complete server implementation (routes, federation, gossip)
24- `servers.json` — Bootstrap server list
25- `install.sh` — Linux deployment (systemd + Caddy)
27## Build & Run
29```bash
30# macOS desktop
31cd client && ./run-mac.sh
33# iOS simulator
34cd client && ./run-ios.sh
36# Plain build
37cd client && dotnet build
38```
40## Version Control
42Use **jj** (jujutsu), not git.
44## Code Conventions
46- Formatter: Fantomas (`dotnet tool restore && dotnet fantomas client/`)
47- F# naming: PascalCase types, camelCase functions/fields
48- Architecture: Elm-style MVU — all state in `Model`, all effects via `CmdMsg`
49- No mutable state outside UI framework