create-cancia
v0.1.0
Published
Scaffold an Astro + React site with Cancia — a client-editable CMS with no admin panel
Downloads
14
Readme
create-cancia
Scaffold an Astro + React site whose client can edit it — no admin panel, no separate server, no copy-pasting between a dashboard and the page.
pnpm create cancia my-client # single language (the default)
pnpm create cancia my-client --i18n # + Astro i18n routing
cd my-client
pnpm install
pnpm devClick the pencil, bottom right. No database, no token and no .env are needed
to start — the page renders its own text until something is stored.
What you get
An Astro site with React wired for islands, Tailwind v4, and Cancia configured the way a client project actually wants it: one SQLite file for content, a deploy hook for publishing, and a page that is already editable.
The generated AGENTS.md is the authoring contract — read it before adding
pages. The short version:
<h1>The quiet work of becoming.</h1>That is all a page needs. Run the MCP's cancia_onboard and the agent adds
data-cms="index.title"; you never write a key, an import, or a t() call. The
markup is also the fallback, so an empty database renders the page exactly as
written — which is what makes it safe to annotate a site that is already live.
The two rules worth knowing up front
Content lives in .astro; React is for interactivity. A hydrated island
re-renders on mount and would overwrite whatever the editor wrote. Editable text
belongs in .astro and reaches a component as props or children.
Repeating content should be a list, not repeated markup. Three testimonials
in a const array can be edited but never added to. cancia_apply_list
converts it and gives the client add / delete / reorder.
Before you deploy
Read src/lib/cms.ts. There is one build-environment detail — a static build
cannot see a database on a runtime volume — that silently reverts every publish
if it is wrong, with no error anywhere.
