You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vibed/.beans/vibed-0fcp--add-justfiles-f...

70 lines
2.5 KiB
Markdown

---
# vibed-0fcp
title: Add justfiles for all projects with lint, check, build, build-release, and release recipes
status: todo
type: task
priority: normal
created_at: 2026-03-10T23:29:17Z
updated_at: 2026-03-10T23:29:17Z
---
## Background
The root `TODO.md` calls for each project in the mono-repo to have a `justfile` with standard recipe names so that any contributor can run the same commands regardless of project type. `just` is a command runner similar to Make but with cleaner syntax.
## Recipes to add per project
| Recipe | What it runs |
|---|---|
| `lint` | Auto-format: `cargo fmt`, `tofu fmt`, `mdbook build` (edu), etc. |
| `check` | Static checks: `cargo check && cargo clippy`, `tofu validate && tofu plan`, etc. |
| `build` | Dev build: `cargo build`, `trunk build`, `mdbook build` |
| `build-release` | Optimised binary or bundle: `cargo build --release`, `trunk build --release` |
| `release` | Deploy/publish: `tofu apply`, `wrangler deploy` (where applicable) |
Not every project needs every recipe; stub missing ones with an error or a no-op comment.
## Per-project breakdown
### `nbd/justfile`
- `lint`: `cargo fmt`
- `check`: `cargo check && cargo clippy && cargo test`
- `build`: `cargo build`
- `build-release`: `cargo build --release`
- `release`: n/a (CLI tool, no deployment)
### `edu/justfile`
- `lint`: `mdbook build` (build validates the content)
- `check`: `mdbook build`
- `build`: `mdbook build`
- `build-release`: same as `build` (mdbook has no separate release mode)
- `release`: TBD — CF Pages auto-deploys from main branch once infra is configured (see edu deployment ticket)
### `quotesdb/api/justfile`
- `lint`: `cargo fmt`
- `check`: `cargo check && cargo clippy`
- `build`: `cargo build`
- `build-release`: `cargo build --release`
- `release`: `wrangler deploy` (or `tofu apply` from `infra/`)
### `quotesdb/ui/justfile`
- `lint`: `cargo fmt`
- `check`: `cargo check && cargo clippy`
- `build`: `trunk build`
- `build-release`: `trunk build --release`
- `release`: CF Pages auto-deploys from main branch once infra is configured
## Files to create
- `nbd/justfile`
- `edu/justfile`
- `quotesdb/api/justfile`
- `quotesdb/ui/justfile`
## Conventions
- Recipe names must be consistent across all projects (`lint`, `check`, `build`, `build-release`, `release`).
- Commands are run from the directory containing the `justfile`, so paths are relative to the project directory.
- Add a comment above each recipe explaining what it does.
- Check whether the `just` package is already in each project's Nix dev shell (`flake.nix`); add it if missing.