rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

App Store — install, create + toggle apps

Storefront + Create-App over one localStorage registry; useInstalledApps() feeds any appshell-style launcher.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
app-store.prompt.mdmarkdown
# Install `app-store` — App Store — install, create + toggle apps

> Storefront + Create-App over one localStorage registry; useInstalledApps() feeds any appshell-style launcher.

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

## 1. Install

```bash
npx rahman-resources add app-store
# alias: npx rr add app-store
```

The CLI copies `frontend/slices/app-store/` 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`, `badge`, `separator`, `scroll-area`, `switch`, `tooltip`

## 3. Wire it up

Stack: Next 16 + React 19 + Tailwind 4 + shadcn/ui. Storefront + Create-App over a localStorage app registry. Fully client-side.

STEP 1 — Install. `npx rr add app-store`. Ensure `@/features/app-store` resolves and Tailwind scans the slice folder.

STEP 2 — Deps. npm: `lucide-react`. shadcn: `npx shadcn@latest add button input badge separator scroll-area switch tooltip`.

STEP 3 — Mount. `<AppStore />` (storefront) and/or `<CreateApp />` (custom-app builder) — or register `appStoreApp` / `createAppApp` in an appshell manifest.

STEP 4 — Feed your launcher. `useInstalledApps()` returns AppDescriptor[] for everything installed/created (html → sandboxed iframe, command → console); `useDisabledIds()` filters your built-in manifest.

STEP 5 — Console exec (optional). `configureAppStoreExec({ mode:"live", exec:{run} })` so command/script apps run on a real one-shot shell (auth it like SSH).

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