Recipe Book, four ways josephstrauss.dev

Issues that came up while building and hosting

The most interesting problems were in the seams between tools: file systems, certificates and proxies.

A folder that vanished

The claude-1 repo ignored data/, meant for its database. Windows treats upper and lower case as the same, so Git also ignored the Data/ source folder. Everything worked locally, but a fresh clone could not compile. The fix was to ignore only the database files.

Leftover processes

Old API processes held their own program files open, which made later builds fail with "file in use" errors. They had to be found and stopped first.

Static hosting cannot run an API

GitHub Pages serves files and nothing else. Each website is on Pages, while its API runs in a container reached through a Cloudflare Tunnel. That required three small changes in each app: a configurable API address, permission for the website's address to call the API, and a fallback page so deep links work.

A certificate one level too shallow

The first API address was api.opus.recipes.josephstrauss.dev. Cloudflare's free certificate covers only one level below the domain, so secure connections failed. The API moved to opus-recipes-api.josephstrauss.dev. The websites can use deeper addresses because GitHub issues a certificate for each one.

Rate limits behind a proxy

Behind a tunnel, every visitor appears to come from the same place, so one person could use up everyone's limit. The APIs now read the visitor's address from the header the tunnel adds. We checked that faking the header does not get around the limit.

Deep links that report 404

Opening a recipe link directly shows the right page, but Pages still labels the response "404 not found". Visitors do not notice. Search engines might.

Windows blocking test files

Windows Smart App Control blocked one freshly built test file. The tests were run in a Linux container instead.

All versions and posts