Thanks for your interest in contributing to Patch Studio! This guide will help you get started.
-
Fork the repository and clone your fork locally:
git clone https://github.com/<your-username>/patch-studio.git cd patch-studio
-
Install dependencies:
npm install
-
Start the dev server:
npm run dev
-
Open http://localhost:3000 in your browser.
-
Create a branch from
mainfor your changes:git checkout -b my-feature
-
Make your changes, then verify the build passes:
npm run build npm run lint
-
Commit your changes with a clear, descriptive message.
-
Push your branch and open a pull request against
main.
See the README for an overview of the project structure and tech stack. For deeper architecture details, check AGENTS.md.
- TypeScript — All code is written in TypeScript with strict mode enabled.
- Components — One component per file. Use functional components with hooks.
- Styling — Tailwind CSS v4 utility classes. Use
cn()fromsrc/lib/utils.tsfor conditional class merging. - State — Zustand store with slice pattern. Add new state to the appropriate slice in
src/lib/store/slices/. - Icons — Use Lucide React icons exclusively.
- UI primitives — Use shadcn/ui components. Add new ones with
npx shadcn@latest add <component>.
- Add the field to the relevant type in
src/lib/types/ - Add a store action in
src/lib/store/slices/layers.ts - Use
<SliderInput>for numerical values
- Add the type to
src/lib/types/effects.ts - Add controls in
src/components/sidebar/effects-panel.tsx - The audio engine passes effects through via
layerToSoundDef()
- Add the JSON file to
public/presets/ - Add a metadata entry in
src/lib/presets/registry.ts
- Build must pass —
npm run buildproduces a static export. PRs that break the build will not be merged. - shadcn/ui uses
@base-ui/react(not Radix) — component APIs may differ from what you expect. - Tailwind v4 — Use
@theme inline {}blocks, not:root/.darkCSS blocks (they get stripped). - Audio —
@web-kits/audiocreates full audio graphs per sound. Live parameter updates use throttled retrigger, not parameter patching. See the audio docs.
- Use GitHub Issues to report bugs or request features.
- Include steps to reproduce, expected behavior, and actual behavior.
- Screenshots or screen recordings are very helpful for UI issues.
- Keep PRs focused — one feature or fix per PR.
- Include a clear description of what changed and why.
- Ensure
npm run buildandnpm run lintpass before submitting. - Link any related issues.
By contributing to Patch Studio, you agree that your contributions will be licensed under the MIT License.