rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

Services

Service offerings backend — title + summary + deliverables array + sort order. Public read, admin CRUD, internal seed. Pairs with a frontend services grid/list (consumer-side). Lifted 2026-05-16 from rahmanef.com; token-based admin gate swapped for rr `_shared/auth`.

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

> Service offerings backend — title + summary + deliverables array + sort order.

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

## 1. Install

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

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

## 2. What it ships

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

## 3. Wire it up

Run `npx rr add services`. Compose `servicesTables` into root schema. Use `useQuery(api.features.services.queries.listAll)` from a server component / route to render service cards. CRUD via admin UI calling `create` / `update` / `remove` after `requireAdmin` passes.

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