Content sites

Budget student recipe blog with cost per portion

Astro content site where each recipe shows cost per portion from a price table, plus a print-friendly shopping list built from chosen recipes.

astrotypescriptzodvitestprettier

Built 1 time, downloaded 0 times.

Install from your terminal

Run this in your project folder. It signs you in, shows what changes and asks before it overwrites a file.

npx claude-lab add budget-student-recipe-blog-with-cost-per-portion-8f7c62
CLAUDE.md
# Budget recipes

A recipe blog for budget student meals. Every recipe page shows cost per portion and links to a printable shopping list.

## Stack

- Astro with Markdown content collections in `src/content/recipes`
- TypeScript (strict)
- Zod for the recipe schema
- Vitest for cost math
- Prettier for formatting
- Node 20 or newer

## Commands

- `npm install`: install dependencies
- `npm run dev`: start the local site
- `npm run build`: build to `dist/`
- `npm test`: run Vitest
- `npm run check`: run `astro check` and `tsc`
- `npm run format`: run Prettier

Use the `verify` skill before saying anything is done.

## Folder map

- `src/content/recipes/`: one `.md` file per recipe
- `src/data/prices.json`: ingredient price table, the only place prices live
- `src/lib/cost.ts`: cost per portion and unit conversions
- `src/lib/shopping.ts`: merges and groups ingredients for the shopping list
- `src/pages/shopping-list.astro`: print page
- `src/styles/print.css`: print styles

## Rules

Cost:
- Cost per portion = sum over ingredients of (quantity converted to price unit x price) / servings.
- Never hardcode a cost in a recipe file.
- Prices live only in `prices.json`.

Units:
- Store all quantities in metric base units: g, ml, or each.
- Conversions live in `cost.ts`. Do not invent conversions in prose.

Content:
- Every recipe needs servings, prep time, cook time, ingredients with quantities, steps, and a "budget tip" line.
- No affiliate links.
- No secrets in the repo.

Prices:
- Do not guess prices in `prices.json`.
- If you are unsure of a price, add a `TODO` comment and tell the user.

Working style:
- Plan first for anything touching `cost.ts` or `shopping.ts`.
- Make small commits.
- Run `npm test` after each change.
- Ask before adding a dependency.

Review:
- Read REVIEW.md before opening a pull request or saying work is ready.

@REVIEW.md
Use for my project