7d40a2cd56
- .config/nextest.toml: hang-timeout profile (warn 60s, kill 120s) - justfile: 'just test' = cargo nextest run --workspace + cargo test --doc - CLAUDE.md: refresh stale Status + Commands for the real workspace + nextest 163 tests run in ~7s (vs multi-minute serial cargo test). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
31 lines
1.7 KiB
Markdown
31 lines
1.7 KiB
Markdown
# CLAUDE.md
|
|
|
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
|
|
## Status
|
|
|
|
Rust (edition 2024) workspace + React SPA collection-management system. Backend crates: `domain`, `db`, `api`, `auth`, `search`, `server` (axum 0.8 + sqlx/Postgres + Meilisearch). Frontend in `web/` (React 19 + Vite + pnpm). Tests need the docker-compose stack up (Postgres on **:5442**, Meilisearch on **:7700**); each `#[sqlx::test]` provisions its own temp DB.
|
|
|
|
## Commands
|
|
|
|
```bash
|
|
just check # fmt + lint + test — the standard pre-commit gate
|
|
docker compose up -d # start Postgres (:5442) + Meilisearch (:7700) for tests
|
|
cargo build --workspace # build
|
|
cargo run -p server # run the server (or: just run — loads .env)
|
|
cargo nextest run --workspace # run all tests — PREFERRED (per-test isolation, live output, hang timeouts)
|
|
cargo nextest run -E 'test(<name>)' # run tests matching a name substring
|
|
cargo test --workspace --doc # doctests (nextest does not run these)
|
|
cargo +nightly fmt # format — always nightly, not stable
|
|
cargo clippy --workspace --all-targets -- -D warnings # lint before committing
|
|
```
|
|
|
|
(`just test` runs nextest + doctests; config in `.config/nextest.toml`.)
|
|
|
|
## Conventions
|
|
|
|
- **CLI args & env vars:** use `clap` with the `derive` feature.
|
|
- **Code navigation:** prefer the insikt LSP server over grep/glob — it resolves macro-generated symbols that text search misses. (insikt runs standalone, not via the gateway MCP.)
|
|
- **Dependencies:** manage via the `cargo-mcp` server rather than editing `Cargo.toml` by hand.
|
|
- **Formatting:** `cargo +nightly fmt` (nightly toolchain required).
|