Skip to content
rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

Sections — composable marketing/landing sections

Framework-parity landing composition: admin CRUD + config-driven stats/testimonials/pricing/FAQ/newsletter/custom renderers.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
sections.prompt.mdmarkdown
# Install `sections` — Sections — composable marketing/landing sections

> Framework-parity landing composition: admin CRUD + config-driven stats/testimonials/pricing/FAQ/newsletter/custom renderers.

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

## 1. Install

```bash
npx rahman-resources add sections
# alias: npx rr add sections
```

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

## 2. What it ships

- npm: `lucide-react`, `embla-carousel-autoplay`
- shadcn primitives: `accordion`, `badge`, `button`, `card`, `carousel`, `dialog`, `input`, `switch`, `table`, `textarea`

## 3. Wire it up

Run `npx rr add sections` for React/default or `npx rr add sections --framework sveltekit`. Wire a LandingStore adapter ({items, publicBase, adminBase, create, update, remove}), then mount LandingView/LandingEditorView directly or through LandingProvider. Fold landingReducer into your host store and seed with defaultLandingSections(). Public pages map enabled LandingSection rows to the shipped stats/testimonials/pricing/faq/newsletter/custom renderers (or host renderers for hero/features/blog/etc.) inside LandingSectionShell. Both frameworks share the reducer, ordering, field schema, types and config parser. React is self-contained apart from declared npm/shadcn primitives; Svelte needs only svelte@^5.

## 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.