Slice · AI prompt
Standalone canvas studio: layers, filters, masks, transforms, aspect presets, export modal — fully offline demo.
# Install `design-studio` — Design Studio — photo / social design canvas
> Standalone canvas studio: layers, filters, masks, transforms, aspect presets, export modal — fully offline demo.
📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail : https://resource.rahmanef.com/slices/design-studio
🧠 JSON catalog : https://resource.rahmanef.com/api/knowledge?slice=design-studio
🔗 Source : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/design-studio
## 1. Install
```bash
npx rahman-resources add design-studio
# alias: npx rr add design-studio
```
The CLI copies `frontend/slices/design-studio/` 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`, `dialog`, `badge`, `tooltip`, `scroll-area`
## 3. Wire it up
Stack: Next 16 + React 19 + Tailwind 4 + shadcn/ui. Layered canvas editor. Fully client-side; no backend required.
STEP 1 — Install. `npx rr add design-studio`. Ensure `@/features/design-studio` resolves and Tailwind scans the slice folder.
STEP 2 — Deps. npm: `lucide-react`. shadcn: button, dialog, badge, tooltip, scroll-area.
STEP 3 — Mount. `<MediaStudio />` in a height-bearing box — unwired it edits bundled sample layers. Or register `mediaStudioApp` in an appshell manifest.
STEP 4 — Host wiring. `configureMediaStudio({ saveDoc, imageSources })` — saveDoc persists the serialized document (enables Save-to-host in the export modal); imageSources supplies image URLs for new layers.
## 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.