This procedure prepares a checkout for code changes.
-
Install all the tools in Requirements, including the development section.
-
Install the JavaScript dependencies.
bun install --frozen-lockfile
-
For native ingestion work, build the pinned nfdump fork.
git submodule update --init --recursive ./vendor/scripts/compile-nfdump.sh
Cargo builds the pipeline itself. scripts/netflow-db.sh and the Rust checks build it on demand.
Start only the dashboard:
bun run dev:webStart only the landing site:
bun run dev:landingStart both applications:
bun run devThe root dev command starts both applications. It does not start the pipeline.
Run these commands before you complete a change:
bun run format
bun run lint
bun run typecheckThe root commands check the dashboard and the Rust workspace. format runs Prettier and cargo fmt. lint runs ESLint and Clippy. typecheck runs svelte-check and cargo check.
Run the landing checks separately:
bun run --cwd apps/landing lint
bun run --cwd apps/landing format:check
bun run build:landingRun focused tests for the changed code:
bun run test:web
bun run test:dbRun the Playwright suite when a browser flow changes:
bun run test:e2eAlways use bun run test. Do not use bun test in this repository.
bun run build:web
bun run build:landingThe root build command builds only the landing site. Use the explicit commands for complete verification.
The Drizzle schema is in apps/web/src/lib/server/db/schema.ts.
-
Change the schema and the compatible local pipeline schema.
-
Generate a migration.
bun run --cwd apps/web db:generate
-
Review the generated SQL in
apps/web/drizzle. -
Apply the migration to a local D1 database.
bun run --cwd apps/web d1:migrations:apply:local
-
Run the schema and route tests.
Before shared use, you can replace an unapplied greenfield baseline. After shared use, always add a new migration.
Do not apply the observation-metrics baseline to a database from the prior baseline. Create a new database for this product.
Run the full pipeline tests:
bun run test:dbThis runs cargo test --workspace --all-features --locked. The root lint and format:check commands run the other Rust checks:
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo fmt --all --checkrustup installs the pinned toolchain from rust-toolchain.toml automatically.
For the MAAD comparison against the pinned Haskell oracle, read MAAD conformance.