rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

Site Setup Wizard — first-run site setup

Post-claim setup wizard: identitas, branding + theme preset live-preview, seed konten — semua props-driven, zero backend lock-in.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
site-setup-wizard.prompt.mdmarkdown
# Install `site-setup-wizard` — Site Setup Wizard — first-run site setup

> Post-claim setup wizard: identitas, branding + theme preset live-preview, seed konten — semua props-driven, zero backend lock-in.

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

## 1. Install

```bash
npx rahman-resources add site-setup-wizard
# alias: npx rr add site-setup-wizard
```

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

## 2. What it ships

- shadcn primitives: `button`, `card`, `input`, `label`, `progress`, `select`

## 3. Wire it up

Run `npx rr add site-setup-wizard`. Show from your admin gate when `setup.status().onboarded === false`: `<OnboardingWizard onDone={...} save={(f) => settingsUpsert(f)} seedSample={() => seedSample({})} seeded={status?.seeded} ImageField={ImageField} presetOptions={presets} onPresetPreview={(n) => preview(n)} />`. `save` receives Partial<OnboardingFields> + `markOnboarded: true` — back it with a `settings.upsert` mutation that patches only provided fields. Theme bridge (optional): with the theme-presets slice installed build `presetOptions` from `groupTweakcnPresets(registry.items)` + `tweakcnSwatches(p)` and pass `useThemePreset().preview` as `onPresetPreview` — the picker then live-previews while the user browses and `Lewati setup` reverts via `onPresetPreview(null)`. Omit `presetOptions` to hide the picker entirely; omit `ImageField` to hide logo/favicon upload. Full wiring recipe in the slice's HOST-SETUP.md.

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