Collect · architecture profile

Foilbury

A showcase for collectible cards and cabinets. An Astro and EmDash site on Cloudflare with a card catalogue, media storage and scheduled work.

LiveArchitecture reviewed 7 November 2026Dossier reviewed 8 November 2026

How it is built.

Foilbury presents collectible cards and collection cabinets. A Cloudflare Worker serves an Astro and EmDash site, owns passkey and magic-link account security, and handles Discord interactions. A five-minute scheduled job runs maintenance. The production bindings are declared in a separate production configuration.

Stack
Astro 7.4, React 19.3, EmDash 1.4, Cloudflare Kumo, Tailwind 4Evidence: package.json
Runtime
Cloudflare Worker `foilbury` with Astro SSR, EmDash and a five-minute cron; a local tenant config exists for developmentEvidence: wrangler.production.jsonc; wrangler.jsonc
Storage
D1 `foilbury`, R2 `foilbury-media`, KV `SESSION` in the production config; local development uses the `foilbury-local` tenantEvidence: wrangler.production.jsonc; wrangler.jsonc
Identity
First-party `fb_session` cookies with passkeys/WebAuthn, email magic links, password login and Discord OAuth; Cloudflare Access guards admin surfaces; TOTP protects bot administration.Evidence: src/server/modules/passkeys.ts; src/server/modules/magic-links.ts; src/server/access.ts; src/server/modules/totp.ts
Delivery
Production deploy script (`pnpm deploy:production`) with pull-request checks; no deploy workflowEvidence: package.json; .github/workflows/check.yml
Integrations
Discord application interactions and webhooks; Resend email; Cloudflare Access; EmDash contentEvidence: src/worker.ts; src/server/discord/delivery.ts; src/server/email.ts

The shape of the system.

  1. Public showcaseAstro pages present cards, cabinets and collection views.Evidence: src/pages
  2. WorkerServes the site, API routes and scheduled work.Evidence: src/worker.ts; wrangler.jsonc
  3. IdentityAccount security covers passkeys, an authenticator and recovery codes beside Discord and email entry.Evidence: src/pages/account/security.astro; src/server/modules/totp.ts
  4. MediaCard imagery is served through a media route rather than embedded in content rows.Evidence: src/pages/media/asset/[id].ts
  5. Discord botThe same Worker answers Discord interactions and delivers bot messages; the web product and bot share the catalogue.Evidence: src/worker.ts; src/server/discord/delivery.ts

Engineering decisions worth knowing.

  • Collection actions get stronger proof than browsing

    Reading a public showcase needs no account. Actions that touch a Bot, its catalogue or its economy require a passkey or authenticator step.

  • Local and production tenants are named separately

    The checked-in development config describes `foilbury-local`; the production config names the real D1, R2 and KV bindings. Keeping them apart prevents a local deploy from pointing at production data.

What it connects to.

No verified cross-project runtime relationship. Foilbury 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.

  • The five-minute cron's job was not observed or verified.
  • The account journey was not completed in this review; passkey, magic-link and Discord paths were read from source.
  • Discord application secrets, Resend and Access configuration are external and were not exercised.
  • No deploy workflow exists; production deployment remains a manual script.