Document Content

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

### Latest Checkpoint (2026-03-12)

* Added publication drift tracking with `published_hash`, a `republish-stale` CLI command, and richer artifact summaries so edited approved recipes can be detected and refreshed safely.

* Added batch-aware pilot reporting to `status`, including `--batch` filtering, `--json` output, OCR confidence breakdowns, card-type counts, and top review reasons.

* Verified the project again with `npm test`, `ASTRO_TELEMETRY_DISABLED=1 npm run check`, and `ASTRO_TELEMETRY_DISABLED=1 npm run build`.

* Synced the latest GitHub commits to `main`, including `6dfb585` (`Track stale published artifacts`) and `3f457c1` (`Add batch status reporting`).

### Batch 1 OCR Checkpoint (2026-03-13)

* Patched the ingest pipeline to use the working Z.ai Coding Plan vision path for local image OCR instead of the paid `layout_parsing` OCR endpoint.

* Added retry handling for transient Z.ai `500` failures during recipe structuring, plus OCR cleanup tests and a multi-recipe detection heuristic.

* Ran the first real 3-image batch from `2026.3.11-batch-1`.

* Outcome: `1` approved and published (`Pasta Primavera`), `2` moved to manual review (`Cabbage Casserole` because the image contains a second recipe, and `Mushy Asparagus Sauce` because OCR confidence stayed low).

* Synced the working changes to GitHub in commit `6c52dad` (`Use coding plan OCR path`).

### Split Workflow Checkpoint (2026-03-13)

* Added a new `recipes split` workflow that previews OCR-detected recipe sections from a multi-recipe scan and can create a separate staged artifact for a selected section.

* Added `--trim-current` so the current artifact can be reduced to the OCR section that matches its title after the new split artifact is created.

* Added a `--manual` split fallback for cases where OCR section detection worked but the structuring model is unavailable or unreliable.

* Verified the live `IMG_2441.JPG` pilot path: `Cabbage Casserole` is now trimmed, approved, and published; `Barbecued Hamburgers` is staged as a manual review artifact; `Mushy Asparagus Sauce` remains in review.

* Validation after this pass: `npm test`, `npm run check`, and `npm run build` all passed. Current batch status is `2` published artifacts and `2` review artifacts.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

#

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

\#Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for 

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

# Vicki-Recipe coding project doc

This space is for Codex agent, Aaron, and Openclaw to collaborate on the build, testing, and deployment of this app.

Original prompt to Codex: i have hundreds of handwritten and printed recipe cards I need to digitize, make publicly viewable, and be able to search and filter them. here are some ideas on solving this problem that my openclaw skill was working on. here is the tool stack I have available: Notion, Codex, Netlify, github, Google Drive, Google Cloud, an iphone (for scanning in recipes), icloud for storage, GLM 5.0 access on a coding plan, OpenRouter (if needed, but prefer to use GLM models since the coding plan is a flat rate I've already paid for), OpenClaw, agent mail.  critically evaluate the most efficient, effective, and modular way to build a physical notecard recipe -> publicly viewable/digitized/searchable/filterable database. We do not need user accounts, security hardening, AI integration, or anything else fancy. We can host on a custom domain I own if that makes sense.

Codex Plan:

# Recommended Build: Git-Backed Static Recipe Archive with Batch OCR

## Summary

* Build the public archive as a static site on Netlify, backed by a GitHub repo that stores the approved recipe records and web-optimized scan images.

* Use iPhone document scans saved to iCloud as the raw intake layer.

* Use a local Codex/OpenClaw batch-ingest script to OCR each card, extract structured recipe data, and create draft records.

* Use `GLM-OCR` as the production OCR backend, with Google Cloud Vision only for low-confidence fallback cases.

* Keep Notion out of the core architecture for MVP. It is optional later as a convenience review tool, but it should not be the public frontend or the only source of truth.

This is the best balance of efficiency, effectiveness, and modularity because:

* Your current OpenClaw skill is a good proof of concept, but it is one-card-at-a-time, single-image, Notion-centric, and does not create a durable publish pipeline.

* Notion is weak for your stated public search goal: Notion’s own docs say database search covers titles and property values, not page body contents like ingredients/instructions, and custom domains for Notion Sites require a paid add-on.

* A static site with Pagefind gives true full-text search plus facet filters with no runtime database or app server.

* Netlify gives easy Git-based deploys and custom domains without making the content model depend on Netlify.

## Key Changes / Architecture

* **Capture layer**

  * Scan each recipe card as one multi-page PDF on iPhone using `Files` or `Notes`, with front and back in the same file.

  * Save scans to an iCloud folder such as `Vickis-Recipes/raw/YYYY-MM-batch/recipe-0001.pdf`.

  * Keep raw scans outside the site repo so Git does not become the archival store for large binaries.

* **Ingest layer**

  * Build a local CLI workflow: `scan batch -> OCR -> structured extract -> confidence score -> approve/publish`.

  * For each raw scan, create:

    * a staging OCR artifact: raw OCR text + model JSON output

    * an approved canonical recipe record in the repo

    * optimized public images or PDF derivatives for the site

  * Use `GLM-OCR` for automated batch OCR. Reserve your GLM coding-plan Vision tools for spot checks and hard-to-read cards.

  * If OCR confidence is low, or the title/ingredients/instructions parse is incomplete, route the recipe to a manual review queue instead of publishing it.

  * Google Cloud Vision is the fallback engine only for stubborn handwriting batches, not the default path.

* **Canonical content model**

  * One approved recipe per file, preferably Markdown with frontmatter or a typed JSON/YAML record.

  * Required fields:

    * `id`

    * `slug`

    * `title`

    * `ingredients[]`

    * `instructions[]`

    * `notes[]`

    * `source_name`

    * `source_family`

    * `course`

    * `proteins[]`

    * `cuisine`

    * `dessert`

    * `tags[]`

    * `card_type` (`handwritten`, `printed`, `mixed`)

    * `ocr_confidence`

    * `review_status` (`approved`, `needs_review`)

    * `scan_assets[]`

  * Preserve original wording as the default. Do not normalize ingredient phrasing unless you add a separate normalized field later.

  * Keep staging OCR output separate from approved public content so you can re-run OCR later without rewriting the site schema.

* **Public site**

  * Build the site as a static content site and deploy from GitHub to Netlify.

  * Use Pagefind after each build for full-text search across title, ingredients, instructions, and notes.

  * Expose public filters for:

    * course

    * protein

    * dessert

    * cuisine

    * family/source

    * tags

    * handwritten vs printed

  * Recipe detail pages should show:

    * transcription

    * structured ingredients and steps

    * source/provenance metadata

    * thumbnail(s) of the original card with a link to the full scan

  * Use your custom domain on Netlify for the public site.

  * Do not make the public site depend on live Notion or live Google APIs at runtime.

* **Notion**

  * Exclude from MVP core.

  * Only add later if you decide you need a friendlier non-technical review surface.

  * If added later, Notion should be an editor/review inbox that exports into the canonical repo schema, not the permanent source of truth.

## Test Plan

* Run a pilot on 20 cards:

  * 8 clearly printed

  * 8 mixed handwriting/print

  * 4 hardest handwritten cards

* Validate:

  * OCR capture quality for front/back PDFs

  * percentage of recipes that skip manual review

  * average correction time for low-confidence items

  * search hits on ingredient-only terms

  * filter correctness for multi-value fields like proteins and tags

  * mobile readability and scan-image load time

* Acceptance criteria for MVP:

  * full-text search finds terms from ingredients and instructions

  * facet filters work without server-side code

  * low-confidence recipes are blocked from publish until reviewed

  * publish flow is one command plus Netlify deploy

  * raw scans remain recoverable even if the site stack changes later

## Assumptions / Defaults

* One technical operator can review low-confidence recipes.

* A small OCR API spend is acceptable because it materially improves automation; the flat-rate coding plan remains useful for review and exception handling.

* The public site is read-only and needs no accounts.

* Raw archival scans live in iCloud/Drive; the repo stores approved structured data plus optimized public assets only.

* If Vicki later needs direct editing, we add a thin editorial layer without changing the published data model.

## Source Notes

* Notion database search limitation: [Notion Search](https://www.notion.com/help/search), [Views, filters, sorts & groups](https://www.notion.com/help/views-filters-and-sorts)

* Notion custom domain pricing/add-on: [Connect a custom domain with Notion Sites](https://www.notion.com/help/connect-a-custom-domain-with-notion-sites)

* Netlify custom domains: [Assign a domain to your site or app](https://docs.netlify.com/domains/manage-domains/assign-a-domain-to-your-site-app/), [Understand domains](https://docs.netlify.com/domains/domains-fundamentals/understand-domains/)

* Pagefind full-text search and filters: [Getting started](https://pagefind.app/docs/), [Setting up filters](https://pagefind.app/docs/filtering/), [Setting up metadata](https://pagefind.app/docs/metadata/)

* iPhone scan-to-PDF workflow: [Apple Support: scan documents on iPhone or iPad](https://support.apple.com/en-us/108963)

* GLM options: [GLM-OCR](https://docs.z.ai/guides/vlm/glm-ocr), [Vision MCP Server](https://docs.z.ai/devpack/mcp/vision-mcp-server)

* Google fallback OCR: [Detect handwriting in images](https://cloud.google.com/vision/docs/handwriting), [Detect text in files (PDF/TIFF)](https://cloud.google.com/vision/docs/pdf)

## Implementation Progress

### Completed

* Bootstrapped the project in a standalone Git repository and synced it to GitHub at `https://github.com/a-makelky/vikci-recipe.git`.

* Implemented the static Astro site with a searchable recipe index, filter UI, recipe detail pages, and Pagefind-based full-text search.

* Added the shared recipe schema and canonical content model for approved recipes, staging artifacts, and published scan assets.

* Implemented the local CLI pipeline for ingest, review, approve, and publish flows, with `GLM-OCR` as the primary OCR adapter and Google Vision fallback support for low-confidence image cases.

* Added project docs, environment templates, Netlify config, sample recipe entries, and automated tests.

### Verified

* `npm test` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run check` passes.

* `ASTRO_TELEMETRY_DISABLED=1 npm run build` passes and Pagefind indexes the approved recipe pages successfully.

### Still Needed

* Add real `.env` values, especially `ZAI_API_KEY` and the raw scan directory path.

* Run the 20-card pilot batch from the plan to validate OCR quality, review thresholds, and publish flow with real scans.

* Connect the GitHub repo to Netlify and configure the production custom domain.

* Decide when to replace the demo recipe entries with the first approved real recipes.

### Notes

* The OCR adapters are implemented, but live OCR against real cards has not been exercised yet because no API secrets or sample scans were provided in this workspace.

* The document had a brief stale-read issue during join, but authoritative `state` and `snapshot` reads recovered and this update was inserted from the current live revision.

# Vicki-Recipe coding pro

# Vick

# Vicki-Recipe coding projec

# Vicki-Recipe coding project doc

This space is for @

# Vicki-Reci

Proof Shared Document

Proof Shared Document

This is a collaborative document on Proof. To read or edit it programmatically:

  • Fetch this URL with Accept: application/json to get content + API links.
  • Fetch this URL with Accept: text/markdown to get raw markdown.
  • Read endpoint: GET /api/agent/gb98e9g4/v3/document (one call: markdown + comments + suggestions)
  • Edit endpoint: POST /api/agent/gb98e9g4/v3/edit (intent-level operations including comment/suggest; no base token)
  • Bug reporting: POST /api/bridge/report_bug (or /d/gb98e9g4/bridge/report_bug)
  • Full API docs: /agent-docs
  • Open source reference: https://github.com/EveryInc/proof-sdk
  • No browser automation needed — use plain HTTP requests (curl/web_fetch).

Auth: If this URL includes ?token=, send it as Authorization: Bearer <token>.