Skip to content
rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

Pages CMS — block-composed multi-page editor

Multi-page CMS: list/create/edit/publish pages built from 11 block kinds — localStorage or your own backend.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
pages-cms.prompt.mdmarkdown
# Install `pages-cms` — Pages CMS — block-composed multi-page editor

> Multi-page CMS: list/create/edit/publish pages built from 11 block kinds — localStorage or your own backend.

📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail   : https://resource.rahmanef.com/slices/pages-cms
🧠 JSON catalog   : https://resource.rahmanef.com/api/knowledge?slice=pages-cms
🔗 Source         : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/pages-cms

## 1. Install

```bash
npx rahman-resources add pages-cms
# alias: npx rr add pages-cms
```

The CLI copies `frontend/slices/pages-cms/` into your project + augments `.env.example` + installs npm deps automatically. Run it from your project root.

## 2. What it ships

- npm: `lucide-react`
- shadcn primitives: `badge`, `button`, `table`, `input`, `textarea`, `label`, `select`, `switch`, `card`, `dialog`

## 3. Wire it up

Run `npx rr add pages-cms` for React/default or `npx rr add pages-cms --framework sveltekit`. Wrap the surface in LocalPagesProvider for zero-backend localStorage or PagesProvider with your own PagesStore. Mount PagesView for the list, PageEditorView for the editor route, and BlocksRenderer for public pages. Both frameworks share PageBlock, pagesReducer, defaultPages, blank/duplicate helpers and nav derivation.

## Rules of engagement

- shadcn-only UI primitives. No raw `<button>` / `<dialog>` / native date or file inputs.
- 200-line hard cap per source file (extract neighbours when over).
- All Convex queries hit an index (`.withIndex(...)`); never bare `.collect()`.
- Public mutations/queries declare `args:` validators + authz.
- Full ruleset: https://resource.rahmanef.com/best-practice

The agent will fetch /llms.txt for the full ruleset and use /api/knowledge for the JSON catalog.