A personal recipe collection with a Neubrutalist interface, recipe imports, weekly meal selection, and grocery lists.
Recipes, photos, preferences, and meal plans are saved in browser localStorage, separately for each browser and site. The site has no server or database of its own. This repository contains application source and generic image assets, not anyone’s recipe library.
If sync is turned on, each person can sign in with Google. Their recipes are then kept in one file in their own Google Drive’s hidden app folder (the drive.appdata permission), which this app can read but which gives it no access to their other Drive files. Recipes travel only between the browser and Google. assets/privacy.html explains this for visitors.
assets/index.html: interface, recipe storage, imports, and settings.assets/config.js: public site settings: the Google client ID for sync and the optional import helper address.assets/sync.js: Google sign-in, the Drive app-folder file, and merging changes between devices.assets/privacy.html: plain-language privacy page linked from the sync window..github/workflows/pages.yml: publishes assets/ to GitHub Pages.assets/recipe-markdown.js: safe basic Markdown rendering and editor controls.assets/meal-planner.js and .css: meal planning, ingredient parsing, grocery-list editing and exports.assets/vendor/: bundled pdf-lib 1.17.1 and its license.worker/template.js: Cloudflare Worker request handling, static asset serving, and bounded public recipe-page fetching (the optional import helper).scripts/build.sh: embeds the assets in dist/server/index.js.scripts/validate-artifact.mjs: verifies that the build exports a Worker fetch handler.Requires Bash, Python 3, and Node.js. No package install is required; the PDF library is bundled.
bash scripts/build.sh
node scripts/validate-artifact.mjs
The output is a Cloudflare Worker ES module at dist/server/index.js.
For a local preview:
python3 -m http.server 8765 --directory assets
Open http://localhost:8765. Everything works here except fetching a recipe by its web address, which needs the import helper; the bookmarklet and paste imports work.
main. The Deploy to GitHub Pages workflow publishes the assets folder to https://YOUR-NAME.github.io/REPOSITORY/.Sync needs a free Google Cloud OAuth client ID. The ID is public by design: Google only accepts it from the web addresses you list. Never put a client secret in this repository; sync doesn’t use one.
https://YOUR-NAME.github.io/REPOSITORY/privacy.html as the privacy policy.https://www.googleapis.com/auth/drive.appdata.https://YOUR-NAME.github.io (just the origin, no path), plus http://localhost:8765 for local testing. No redirect URIs are needed..apps.googleusercontent.com) into googleClientId in assets/config.js, commit, and push.How it behaves:
Recipe sites can’t be fetched from the browser directly, and GitHub Pages has no server. The import window therefore offers:
importHelperUrl in assets/config.js.bash scripts/build.sh produces dist/server/index.js, which serves the site and the /api/recipe-page helper. To use it from GitHub Pages, deploy it with your own Cloudflare account, set the Worker variable ALLOWED_ORIGINS to https://YOUR-NAME.github.io, and set importHelperUrl to https://YOUR-WORKER.workers.dev/api/recipe-page. The helper only fetches public HTTPS pages up to 2 MB, follows at most three redirects, and refuses requests from other sites. If the Worker hosts the site itself, set importHelperUrl to /api/recipe-page.
Each copy of the site keeps its own browser data. With sync turned on, people’s recipes live in their own Google Drive and not with whoever runs the site. If using an AI coding agent, ask it to preserve the existing source and behavior rather than replacing it with a newly generated approximation.