Slice · AI prompt
Public 'book a session' form + the owner's triage inbox in one app — backend injected.
# Install `booking` — Booking — session request form + owner inbox
> Public 'book a session' form + the owner's triage inbox in one app — backend injected.
📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail : https://resource.rahmanef.com/slices/booking
🧠 JSON catalog : https://resource.rahmanef.com/api/knowledge?slice=booking
🔗 Source : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/booking
## 1. Install
```bash
npx rahman-resources add booking
# alias: npx rr add booking
```
The CLI copies `frontend/slices/booking/` 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`, `textarea`, `scroll-area`
## 3. Wire it up
Stack: Next 16 + React 19 + Tailwind 4 + shadcn/ui. A booking request form + owner inbox. Fully client-side; backend optional.
STEP 1 — Install. `npx rr add booking`. Ensure `@/features/booking` resolves and Tailwind scans the slice folder.
STEP 2 — Deps. npm: `lucide-react`. shadcn: `npx shadcn@latest add button input textarea scroll-area`.
STEP 3 — Mount. `<Booking />` in a height-bearing box — unwired it runs on an in-memory mock store (form + inbox both live). Or register `bookingApp` in an appshell manifest.
STEP 4 — Real backend. `configureBooking({ mode:"live", submit, list, setStatus, canManage })` — submit takes { name, email, topic, preferredTime?, note? }; list returns rows with { id, status, createdAt }; omit list/canManage for a write-only public form.
## 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.