This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm start- Start development server (runs turbo dev in parallel for app and static)npm run build- Build the entire project (app and static site)npm test- Run tests across all packages using turbonpm run lint- Run linting with Biome across all packagesnpm run format- Format code with Biome across all packagesnpm run check- Run linting and formatting check with Biome
npm run dev -w app- Start dev server for the main appnpm run build -w app- Build the main React applicationnpm run test -w app- Run tests for the appnpm run lint -w app- Run Biome linting for the appnpm run format -w app- Format app code with Biomenpm run check -w app- Run Biome checks for the app
npm run dev:electron- Start Electron development (concurrently runs app dev server and electron)npm run build:electron- Build the Electron applicationnpm run make:electron- Package Electron app for distributionnpm run make:darwin- Package for macOSnpm run make:win- Package for Windows
docker compose up- Run the entire application in Docker
Signal is a web-based music sequencer built with React and TypeScript, with cross-platform Electron support. The project uses a monorepo structure managed by Turbo.
Main Application (/app)
- React application using MobX for state management
- WebGL-based rendering for performance-critical UI components (piano roll, arrange view)
- Web Audio API integration for MIDI playback and audio synthesis
- Modular store architecture with reactive patterns
Core Stores (MobX-based):
RootStore- Central store managing audio context, synthesizers, and MIDI I/OSongStore- Song data and track managementPianoRollStore- Piano roll editor stateArrangeViewStore- Arrange view state and selectionsControlStore- Control pane for automation data
Key Views:
- Piano Roll Editor - MIDI note editing with WebGL-accelerated rendering
- Arrange View - Multi-track timeline view
- Tempo Graph - Tempo automation editing
- Control Pane - Parameter automation (velocity, pan, etc.)
Packages (/packages)
@signal-app/player- Audio playback engine with SoundFont synthesis@signal-app/api- Firebase/Cloud integration for song storage@signal-app/community- Community features and song sharingdialog-hooks- React hooks for modal dialogsfirebaseui-web-react- Firebase authentication components
Electron Application (/electron)
- Cross-platform desktop wrapper
- File system access for local MIDI files
- Native OS integration (menus, file associations)
Static Site (/static)
- Marketing/landing page built with Next.js
Song Structure:
Song- Top-level container with tracks, tempo, time signaturesTrack- Individual instrument track with MIDI eventsTrackEvent- MIDI events (notes, control changes, program changes)
Audio Pipeline:
- Web Audio API context management in
RootStore - SoundFont-based synthesis via
SoundFontSynth - Real-time MIDI input/output through
MIDIInput/MIDIOutput - Audio rendering for export via
renderAudio
- Frontend: React 18, TypeScript, MobX, Emotion CSS-in-JS
- Audio: Web Audio API, SoundFont synthesis, WebMIDI API
- Graphics: WebGL for performance-critical rendering
- Build: Vite, Turbo (monorepo), ESLint, Prettier
- Desktop: Electron with Forge
- Cloud: Firebase (auth, storage), Vercel (hosting)
- Component co-location pattern: related files grouped by feature
- Shared utilities in
/helpersand/services - Domain entities in
/entities(geometry, beats, selections, transforms) - WebGL shaders and rendering code in
/gland component-specific shader directories
The application emphasizes real-time performance for audio and UI, using WebGL acceleration for intensive graphics operations and optimized audio scheduling for glitch-free playback.