Skip to content
rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

Testimonials

Framework-neutral testimonials backend: bounded public list/get, server-authorized admin CRUD, and internal seed. React/Next remains the default distribution contract; explicit Svelte/SvelteKit installs reuse the same TypeScript + Convex source without invented UI.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
testimonials.prompt.mdmarkdown
# Install `testimonials` — Testimonials

> Framework-neutral testimonials backend: bounded public list/get, server-authorized admin CRUD, and internal seed.

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

## 1. Install

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

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

## 2. What it ships

- npm: `convex`
- peer slices (cascade install):
  - `convex-auth` — requireAdmin uses getAuthUserId from @convex-dev/auth.
- env vars:
  - `SUPER_ADMIN_EMAIL` (convex)
- convex feature paths: `convex/features/testimonials`

## 3. Wire it up

Run `npx rr add testimonials` (or `--framework sveltekit`). Compose `testimonialsTables` into the root schema. Read from `api.features.testimonials.query.listAll` / `get` through the host Convex client; call `create` / `update` / `remove` only through authenticated admin flows because authorization is enforced server-side by `requireAdmin`.

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