- Rust 1.87+ (stable)
- Node.js 20+
- npm 9+
# Frontend
cd web && npm ci && npm run build && cd ..
# Backend
cargo build --workspace
# Run tests
cargo test --workspace- Create a branch from
develop:git checkout -b feat/your-feature develop - Make changes + write tests
- Run
cargo fmt+cargo clippy -- -D warnings - Commit with conventional messages:
feat(scope): description - Push + open PR to
develop
| Check | Command |
|---|---|
| Check | cargo check --workspace |
| Format | cargo fmt --check |
| Clippy | cargo clippy -- -D warnings |
| Test | cargo test --workspace |
| Build | cargo build --release -p trapfalld |
| Cora Review | AI code review (PR only) |
crates/
├── trapfall-proto/ # Shared types (Issue, Event, Level, etc.)
├── trapfall-core/ # Store (SQLite), migrations, helpers
├── trapfall-ingest/ # Envelope parser
├── trapfall-search/ # LIKE-based search
├── trapfall-alert/ # Alert engine + webhook dispatch
├── trapfall-mcp/ # MCP server (stdio JSON-RPC)
├── trapfall-dashboard/# SvelteKit SPA (via rust-embed)
└── trapfalld/ # Main binary + HTTP server
web/ # SvelteKit frontend source
- Rust:
cargo fmt,cargo clippy -- -D warnings - TypeScript/Svelte: Prettier defaults
- Commits: Conventional (
feat:,fix:,ci:,docs:)
developis the default branch — all PRs target itmainis synced fromdevelopvia release tags- Never push directly to
developormain - Squash merge, delete branch after merge