Project Overview: cf-tweets
I decided to establish cf-tweets as a lean React Router + Cloudflare Workers baseline, then capture operational guardrails early so future implementation work stays fast and predictable.
What We Built
- A full-stack React Router project scaffold intended for production use, with SSR, HMR, TypeScript, and Tailwind already in place from the starter.
- A Worker-oriented deployment path (
npm run deploy-> Wrangler) so local development and Cloudflare delivery stay on one track. - A focused app surface under
app/with explicit routing and server entry files, plus Cloudflare config (wrangler.jsonc) and worker entry (workers/app.ts) in the active change set. - A clear bootstrap point in git history:
"Initial commit from create-react-router"(9a2a6c6).
Why We Built It
- We prioritized speed of iteration over platform complexity: one practical stack (Node.js + Vite + Workers) and a direct deploy path.
- We needed an implementation agents can operate reliably, so project memory and decision notes are treated as first-class, not optional docs.
- We intentionally keep shared context centralized (
/Users/kristian/Documents/obsidian/agent) to reduce drift between sessions. - Recent execution signal supports this direction: the latest tracked session is explicitly about continuing implementation in the dedicated
cf-tweetschannel.
How It Works
- Day-to-day loop:
npm run devfor local work,npm run typecheckto regenerate Cloudflare/Router types and validate TypeScript,npm run buildfor production artifacts, andnpm run deployfor Worker release. - Type generation is built into workflow (
cf-typegenon postinstall), which keeps Worker bindings/types synchronized instead of relying on manual updates. - Database bootstrap has a practical rule from project memory: avoid multi-statement
env.DB.exec()in this context and run schema setup per statement withprepare(...).run(). - Submission creation is hardened for local/dev variability: set key insert fields explicitly and persist a fallback suggestion payload when workflow plumbing is unavailable.