I want to refactor the app architecture into roughly four components as per the diagram in sandbox/app-components-and-refactoring-2025-12-23.png

  1. The rendering layer, responsible for turning processed content into the final published output.
  2. The dashboard layer including management of users’ projects/sites.
  3. Second is the processing system which takes raw material (in R2) and processes it e.g. to extract metadata, transfom content etc
    • there is a sub-item which ingests content from GitHub (we want to refactor this to be in cloudflare workers like the current processing code rather than in inngest and nextjs)
  4. The API layer for "rawstore" (raw storage on R2) and the "metastore" (metadata in a database); some of this may not need a formal API and could be accessed directly or via a small shared library.

Note there are some components shared across a couple of areas e.g.

  • Login / logout (though maybe this is part of what i am calling the rendering layer)
  • maybe others we can thing of …