cargo check --workspace --bins --locked && cargo fmt --all --check && cargo clippy --workspace --all-targets --all-features --locked -- -D warnings && cargo test --workspace --all-targets --locked
# Protocol contract tests (separate from workspace tests)
cargo test --locked --test message_contracts auth_contract_returns_expected_fields
cargo test --locked --test message_contracts compatibility_contract_client_bootstrap_flow_stays_stable
cargo test --locked --test message_contracts protocol_contract_advertises_backward_compatible_version
cargo test --locked --test message_contracts file_contract_relays_media_metadata_and_chunks
# Feature-gated builds
cargo check --features discord-bridge --bin discord_bot --locked
cargo check -p chatify-client --features bridge-client --lockedAlways use --locked — CI enforces this for reproducible builds.
| Path | Purpose |
|---|---|
src/server/ |
WebSocket server, event store, auth — workspace member |
src/client/ |
Terminal dashboard — workspace member |
src/discord_bot.rs |
Discord bridge — separate binary, feature-gated |
tests/message_contracts/ |
Protocol contract tests — not in workspace test suite |
Binaries: chatify-server, chatify-client, discord_bot (feature-gated)
- DB key resolution: CLI flag
--db-key><db>.keyfile > auto-generated (never created if--db :memory:) - Never commit:
*.db.key,cert.pem,key.pem,*.db - Windows dev: Use
run-server.ps1/run-client.ps1— they handle artifact cleanup automatically - Release builds:
cargo build --releaseapplies LTO, strip, and opt-level 3
- Search is O(n) — decrypts all events in linear scan. Don't assume performance scales.
- Media transfer: Chunked over WebSocket (
file_meta+file_chunk), not HTTP. 100 MB cap enforced client-side. - Trust model: Explicit fingerprint verification, not TOFU. Key rotation blocks DMs until re-verified.
- Event store: Append-only SQLite. Schema has no-downgrade policy — newer server refuses older DB.
- Session tokens: Ephemeral — don't survive server restart. All clients re-auth after restart.
- Forgetting
--features discord-bridgewhen building the bot — it won't compile - Running server without
--db-keyor<db>.key— server generates one and saves it; if DB exists without key file, startup fails - Enabling TLS without cert/key — connection drops silently or fails upgrade
- Expecting search to perform on large datasets — it's a linear scan over encrypted data
- Assuming DB migrations are backward-compatible — they're not; server refuses older schema
- Full docs: README.md
- Contributing: CONTRIBUTING.md
- Architecture: docs/ARCHITECTURE.md
- Security notes: docs/SECURITY_NOTES.md