Build · architecture profile
Asset Hunter
A rights-aware catalogue of reusable assets. An Astro and EmDash content site on Cloudflare with an editor curation cockpit.
How it is built.
Asset Hunter is editorial infrastructure: an EmDash-backed catalogue with a public facing and a curation cockpit. Editors correct rights status and licence evidence; the code keeps the workflow and audit trail around each correction. The lifecycle is retired, so the site is a preserved record.
- Stack
- Astro 7.3, React 19.2, EmDash 1.0.1, Effect 4Evidence: package.json
- Runtime
- Cloudflare Worker `asset-hunter` with EmDash content; an EmDash scheduled handler is exported but no cron trigger is configuredEvidence: wrangler.jsonc; src/worker.ts
- Storage
- D1 `asset-hunter`, R2 `asset-hunter-media`Evidence: wrangler.jsonc
- Identity
- EmDash admin auth and RBAC; rights actions require role >= editor and answer 404 below that. The production setup wizard is refused unless built with EMDASH_ALLOW_SETUP=1, and the project's security review records that production had no administrator account.Evidence: src/pages/api/takedown.ts; src/middleware.ts; docs/SECURITY.md; astro.config.mjs
- Delivery
- Cloudflare custom domain assets.loftwah.com; lifecycle retiredEvidence: wrangler.jsonc; Woodhouse catalogue
- Integrations
- GitHub REST API for the hunt engine; EmDash for content. No project-to-project consumer was found.Evidence: engine/src/runtime/github.ts; engine/src/runtime/config.ts
The shape of the system.
- Public catalogueAstro pages present reviewed assets and their stated rights.Evidence: src/pages
- Curation cockpitEditors open, correct and close rights cases from one queue.Evidence: src/pages/curate/index.astro
- ContentEmDash owns the record and revisions; the workflow writes audit rows beside it.Evidence: src/pages/api/takedown.ts
- MediaApproved media is stored in R2, not in the content database.Evidence: wrangler.jsonc r2_buckets
- Hunt engineA separate TypeScript pipeline queries the GitHub REST API to find candidate assets before an editor reviews them.Evidence: engine/src/runtime/github.ts
Engineering decisions worth knowing.
- Rights are a workflow, not a label
A single rights_status field would lose why a case changed. The cockpit records the correction and the reason, and keeps both with the content revision.
- A missing permission answers 404
A 403 on a rights queue confirms the queue exists. Answering 404 to an unauthorised role avoids turning the catalogue into a directory of unfinished cases.
What it connects to.
No verified cross-project runtime relationship. Asset Hunter is reachable from Woodhouse as a published record, and its product links are ordinary navigable links.
Authoritative public sources
What this review does not know.
- Whether any other project consumes Asset Hunter's catalogue was not verified; no consumer call was found.
- The project's own security review records that production had no administrator account; this review did not provision or test one.
- The purpose of the local data.db file was not documented in the repository.
- The curation cockpit and scheduled handler were not exercised.