Slice · AI prompt
Owner-gated CRUD for a curated icon-launcher — add/edit/remove/reorder links that open in a new tab, backend injected.
# Install `resources-launcher-admin` — Resources Admin — curated icon-launcher CRUD
> Owner-gated CRUD for a curated icon-launcher — add/edit/remove/reorder links that open in a new tab, backend injected.
📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail : https://resource.rahmanef.com/slices/resources-launcher-admin
🧠 JSON catalog : https://resource.rahmanef.com/api/knowledge?slice=resources-launcher-admin
🔗 Source : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/resources-launcher-admin
## 1. Install
```bash
npx rahman-resources add resources-launcher-admin
# alias: npx rr add resources-launcher-admin
```
The CLI copies `frontend/slices/resources-launcher-admin/` 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: `button`, `input`, `label`, `scroll-area`, `native-select`
## 3. Wire it up
Stack: Next 16 + React 19 + Tailwind 4 + shadcn/ui. A curated icon-launcher admin (CRUD + reorder). Fully client-side; backend optional.
STEP 1 — Install. `npx rr add resources-launcher-admin`. Ensure `@/features/resources-launcher-admin` resolves and Tailwind scans the slice folder.
STEP 2 — Deps. npm: `lucide-react`. shadcn: `npx shadcn@latest add button input label scroll-area native-select`.
STEP 3 — Mount. `<ResourcesAdmin />` in a height-bearing box — unwired it runs on an in-memory mock store (add / edit / remove / reorder all live). Or register `resourcesAdminApp` in an appshell manifest.
STEP 4 — Real backend. `configureResources({ mode:"live", list, upsert, remove, canManage })` — list returns rows { id, label, icon, url, group, order }; upsert takes the same minus id to insert (pass id to patch); canManage gates the editor + reorder. Icons are lucide NAME strings resolved via resolveIcon.
## 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.