Soundless Beatbox

A playful rhythm maker where users build short beat patterns using visual blocks (kick/snare/hat/clap) on a grid, then “perform” them with optional Web Audio playback or silent animation-only mode. The app includes a pattern library with save/load via localStorage, a tempo control, step-by-step playback indicator, and an export feature that copies a shareable text code for a beat. Clear component boundaries: grid sequencer, instrument palette, transport controls, preset manager, and share/export modal.

To Do29
Scaffold project

Run: npm create vite@latest . -- --template react-ts && npm i && npm i -D tailwindcss postcss autoprefixer && npx tailwindcss init -p && npm i class-variance-authority clsx tailwind-merge lucide-react && npx shadcn@latest init.

by system

Add Tailwind globals

Create src/index.css with Tailwind directives and basic CSS variables for shadcn/ui.

by system

Add shadcn utilities

Add src/lib/utils.ts with cn() helper for Tailwind class merging.

by system

Install base UI components

Add shadcn/ui components needed (button, slider, switch, dialog, tabs, dropdown-menu, toast).

by system

Define app types

Create src/types/sequencer.ts with Instrument, Step, Pattern, and Transport state types.

by system

Create default instruments

Add src/data/instruments.ts defining kick/snare/hat/clap metadata (label, color, key).

by system

Create default presets

Add src/data/presets.ts with a few built-in patterns for the library.

by system

Create encode/decode

Implement src/lib/shareCode.ts to encode/decode patterns to a compact shareable text code.

by system

Add localStorage wrapper

Implement src/lib/storage.ts for saving/loading/deleting patterns with safe JSON parsing.

by system

Add audio engine

Implement src/lib/audioEngine.ts with Web Audio click sounds per instrument and lazy AudioContext init.

by system

Add silent playback timer

Implement src/lib/transport.ts to compute step intervals from BPM and drive a step callback via setInterval.

by system

Create app layout

Implement src/App.tsx layout shell with header, main grid area, and right-side panels.

by system

Add app state hook

Create src/hooks/useSequencerState.ts to hold pattern grid, bpm, playing, currentStep, and mode.

by system

Instrument palette UI

Create src/components/InstrumentPalette.tsx to show instrument legend with colors and names.

by system

Step cell component

Create src/components/StepCell.tsx as a clickable block with active and playhead visual states.

by system

Sequencer grid UI

Create src/components/SequencerGrid.tsx rendering instrument rows x steps and wiring cell toggles.

by system

Grid header ruler

Create src/components/StepRuler.tsx to label beats/bars above the grid (e.g., 1-16 with bar marks).

by system

Transport controls UI

Create src/components/TransportControls.tsx with Play/Pause, Stop, and Clear buttons.

by system

Tempo slider UI

Create src/components/TempoControl.tsx with shadcn Slider and numeric BPM display/edit.

by system

Audio mode switch

Create src/components/PlaybackModeToggle.tsx to switch between Audio and Silent animation modes.

by system

Playback indicator logic

Wire playhead step updates in src/hooks/useSequencerState.ts using transport timer and cleanup.

by system

Audio playback wiring

Trigger audioEngine hits on each step when in Audio mode inside the playhead tick handler.

by system

Preset manager UI

Create src/components/PresetManager.tsx to list presets, select one, and show saved patterns section.

by system

Save pattern dialog

Create src/components/SavePatternDialog.tsx to name and save the current pattern to localStorage.

by system

Load/delete actions

Add load and delete handlers in PresetManager using storage wrapper without touching grid internals.

by system

Export/share modal UI

Create src/components/ShareExportModal.tsx using Dialog with code display and copy button.

by system

Copy-to-clipboard helper

Implement src/lib/clipboard.ts to copy text and throw a friendly error on failure.

by system

Import from code

Add an import input in ShareExportModal to decode a share code and load it into state.

by system

Toast notifications

Add src/components/ToasterHost.tsx and show toasts for save/load/copy/import success or errors.

by system

In Progress0
In Review0
Done0