Developer Guide
Repository layout
Section titled “Repository layout”apps/api/ API Worker (Hono, D1, R2, Better Auth)apps/admin/ Admin SPA (React, Vite), deployed as its own Workerpackages/database/ Drizzle schema, migrationspackages/contracts/ Shared Zod API contract (published to npm)packages/create/ @kenresoft-cms/create CLI and its Astro templatespackages/plugin-sdk/ Internal plugin SDKpackages/plugin-*/ Bundled plugins (ecommerce, hello)integrations/astro/ @kenresoft-cms/astroexamples/astro-site/ Large reference site (not a starter)scripts/ setup, update and rename-worker CLIsdocs/ Design documentswrangler.toml Root config for the API WorkerLocal development
Section titled “Local development”pnpm installcp .dev.vars.example .dev.vars # set the local Better Auth secretcp apps/admin/.env.example apps/admin/.envpnpm --filter @kenresoft-cms/database migrate:localpnpm devAPI: http://localhost:8787Admin: http://localhost:5173Run either alone with pnpm --filter @kenresoft-cms/api dev or pnpm --filter @kenresoft-cms/admin dev. .dev.vars overrides both [vars] and secrets during wrangler dev, which is where a local CORS_ORIGINS addition (for example a LAN address) belongs, never in the committed wrangler.toml.
A local install has no users. Create the Owner with the bootstrap and read the token from the wrangler dev terminal. With no email provider, verification links print there too.
Feature work goes on feature/* branches off develop. main is reserved for release promotion.
Where to go next
Section titled “Where to go next”- Public API: the read surface for frontends
- Plugins: extending the CMS
- Migrations and Testing
- API routes: every route by surface
The repository’s docs/ folder (ARCHITECTURE.md, PLUGINS.md, SITE_BUILDER.md, DEPLOYMENT.md, ASTRO.md) holds the deeper design records, including per-phase implementation history. Treat the code as the source of truth where they differ.