rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

Reel — video timeline editor

In-browser NLE: layered multi-track timeline, keyframes, transitions, color grading, realtime WebM export with mixed audio.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
reel-editor.prompt.mdmarkdown
# Install `reel-editor` — Reel — video timeline editor

> In-browser NLE: layered multi-track timeline, keyframes, transitions, color grading, realtime WebM export with mixed audio.

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

## 1. Install

```bash
npx rahman-resources add reel-editor
# alias: npx rr add reel-editor
```

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

## 2. What it ships

- npm: `lucide-react`, `react-resizable-panels`, `sonner`
- shadcn primitives: `button`, `input`, `slider`, `tooltip`, `dialog`, `dropdown-menu`, `resizable`, `sheet`, `sonner`

## 3. Wire it up

Stack: Next 16 + React 19 + Tailwind 4 + shadcn/ui. An in-browser video timeline editor with realtime WebM export. Fully client-side; no backend required.

STEP 1 — Install. `npx rr add reel-editor`. Ensure `@/features/reel-editor` resolves in tsconfig paths and Tailwind scans the slice folder.

STEP 2 — Deps. npm: `lucide-react react-resizable-panels sonner`. shadcn: `npx shadcn@latest add button input slider tooltip dialog dropdown-menu resizable sheet sonner`. Mount `<Toaster />` (sonner) once in your root layout.

STEP 3 — Mount. Render in a height-bearing box:
```tsx
"use client";
import { ReelEditor } from "@/features/reel-editor";
export default function Page() {
  return <div className="h-dvh"><ReelEditor /></div>;
}
```
Or register the `reelEditorApp` descriptor in an appshell manifest for windowed hosts.

STEP 4 — Files pane backend (optional). The quick-import pane ships with an in-memory mock. Wire a real filesystem with `configureReelFs({ list, mkdir, rawUrl })` — list/mkdir mirror a simple fs API, rawUrl resolves a listed path to a fetchable media URL.

STEP 5 — Export. The Render button records the live canvas + mixed audio to WebM via MediaRecorder in realtime (duration = composition length). Users can also import local media via the file picker — object URLs, no upload needed.

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