set dotenv-load

# Run the server (reads .env)
run:
    cargo run -p server

# Seed the baseline Spectrum cataloguing vocabularies + field definitions (idempotent)
seed:
    cargo run -p server -- seed

# Run the full test suite via cargo-nextest (per-test isolation, live output,
# hang timeouts). nextest does not run doctests, so they run separately.
test:
    cargo nextest run --workspace
    cargo test --workspace --doc

# Format with the nightly toolchain
fmt:
    cargo +nightly fmt

# Lint, treating warnings as errors
lint:
    cargo clippy --workspace --all-targets -- -D warnings

# Run Storybook (web component explorer) on http://localhost:6006
storybook:
    cd web && pnpm storybook

# Format, lint, and test
check: fmt lint test
