Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
e7b47bc
Update lucide-react dependency and refactor DAW components for improv…
arthtyagi Oct 27, 2025
7716216
Enhance cachedTimeGridAtom to conditionally generate time grid based …
arthtyagi Oct 27, 2025
4f2f02b
Refactor duration formatting by moving `formatDuration` to daw-sdk
arthtyagi Oct 27, 2025
3eca2f1
Update project structure and enhance DAW SDK integration
arthtyagi Oct 28, 2025
2866447
Add bridge usage guide and migration progress documentation
arthtyagi Oct 28, 2025
f599930
Implement OPFS support and integrate DAWProvider
arthtyagi Oct 28, 2025
98c5654
up
arthtyagi Oct 28, 2025
8a3410f
Implement performance improvements and bridge mutations for DAW
arthtyagi Oct 28, 2025
1dd221e
Complete Phase 3 of SDK Migration with Performance Enhancements and A…
arthtyagi Oct 28, 2025
0db74a2
Add comprehensive bug fixes and migration documentation
arthtyagi Oct 29, 2025
1284228
Refactor automation handling and fix clip movement issues
arthtyagi Oct 29, 2025
8745163
Refactor clip automation handling and improve playback service
arthtyagi Oct 29, 2025
c5e12dc
Add detailed plan for fixing automation and playback issues
arthtyagi Oct 29, 2025
b3c9fb5
up
arthtyagi Oct 29, 2025
6c8d52b
Enhance playback service and clip automation handling
arthtyagi Oct 29, 2025
a12bb1f
Enhance playback synchronization and update handling
arthtyagi Oct 31, 2025
8798ad5
Refine time update logic in playback synchronization
arthtyagi Oct 31, 2025
0c0e302
Enhance automation binding and clip update logic
arthtyagi Oct 31, 2025
d76b252
Refactor mock atom getters and setters in automation tests
arthtyagi Oct 31, 2025
a778705
Enhance playback synchronization and track rescheduling
arthtyagi Oct 31, 2025
b57142c
up
arthtyagi Oct 31, 2025
102b080
Add new command files for commit, PR creation, deslop, merge conflict…
arthtyagi Oct 31, 2025
4f19764
Refactor drag-and-drop clip handling for improved track synchronization
arthtyagi Oct 31, 2025
2ecd678
Refactor code formatting and improve readability across multiple comp…
arthtyagi Oct 31, 2025
241273e
Refactor imports and performance utilities for improved clarity and f…
arthtyagi Oct 31, 2025
421794a
Update CSS for improved pointer event handling during drag operations
arthtyagi Oct 31, 2025
9a65693
up
arthtyagi Oct 31, 2025
014a124
Update CI workflow to exclude TypeScript build info from cache and cl…
arthtyagi Oct 31, 2025
16b2de8
Update dependency management in turbo.json for check-types task
arthtyagi Oct 31, 2025
bf38e1c
Update import statements in export-dialog component for improved func…
arthtyagi Oct 31, 2025
86b19d5
format
arthtyagi Oct 31, 2025
cd42f26
up ci/cd
arthtyagi Oct 31, 2025
8909707
Remove outdated automation plan and introduce audio scheduling consta…
arthtyagi Oct 31, 2025
66ba06b
Implement snap granularity controls and integrate timebase snapping l…
arthtyagi Oct 31, 2025
2edc065
Update dependencies and improve DAW timeline functionality
arthtyagi Nov 1, 2025
e28fe50
Enhance audio scheduling and documentation updates
arthtyagi Nov 1, 2025
1ecf829
Enhance track management and synchronization in playback service
arthtyagi Nov 1, 2025
d00fee9
Add MCP server configuration and update dependencies
arthtyagi Nov 3, 2025
d8feb57
Add PlayheadLine component to DAWTrackContent for synchronized playba…
arthtyagi Nov 3, 2025
ff06a35
Refactor DAW components for improved synchronization and performance
arthtyagi Nov 3, 2025
02a08e1
Refactor timeline element selection in UnifiedPlayhead component
arthtyagi Nov 3, 2025
458d3f8
Refactor DAW components and remove unused elements
arthtyagi Nov 3, 2025
42494bf
Refactor DAW components for improved readability and performance
arthtyagi Nov 3, 2025
d6b1d0b
Enhance resolveClipRelativePoint function for improved clip time hand…
arthtyagi Nov 3, 2025
4edc1e7
Refactor CurvePreview component for enhanced curve evaluation logic
arthtyagi Nov 3, 2025
499be74
up
arthtyagi Nov 3, 2025
220959d
Refactor useTransportEvents hook for improved callback handling
arthtyagi Nov 3, 2025
a8f5cf4
Update project documentation and enhance code quality tools
arthtyagi Nov 5, 2025
3dab4d8
Update canvas element in TimelineGridCanvas for improved rendering
arthtyagi Nov 5, 2025
52f4f56
lint
arthtyagi Nov 5, 2025
e37d0e7
Remove outdated Next.js dependency from package.json
arthtyagi Nov 5, 2025
d0b44a0
updated bun lock
arthtyagi Nov 5, 2025
bd33a91
chore: resolve merge conflicts
arthtyagi Nov 6, 2025
e05e3b7
up
arthtyagi Nov 6, 2025
c044d67
Enhance TrackGridLines and useTimebase for improved functionality
arthtyagi Nov 6, 2025
75b77f6
Refactor resolveClipRelativePoint function for clarity and accuracy
arthtyagi Nov 6, 2025
0733c28
Update UnifiedPlayhead to improve time calculation accuracy
arthtyagi Nov 6, 2025
7112bf3
format
arthtyagi Nov 6, 2025
c1bc450
format
arthtyagi Nov 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .cursor/commands/remindx.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ For playback engine (specifically, the audio manager/context), we have chosen th

* MEDIA BUNNY EXAMPLES: https://mediabunny.dev/examples

* WEB AUDIO API DOCS: https://webaudio.github.io/web-audio-api/

## MCP Server Instructions

* Firecrawl MCP for crawling, scraping, and more.
* Context7 MCP for docs.
* Context7 MCP for docs - for instance, if you need up-to-date docs on the Web Audio API or React, you can use the context7 mcp to search the web for the latest docs. or if you want the latest React docs.

cursor rules - @wav0\_daw.mdc
cursor rules - @wav0_daw.mdc
mediabunny docs - @MediaBunny

mcps available - firecrawl mcp (crawling/scraping) and context7 mcp (search any docs/library).
Expand Down
269 changes: 57 additions & 212 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Contributing to WAV0

Thank you for your interest in contributing to WAV0! We're building the future of AI-native music production, and your contributions help make audio creation accessible to everyone.

## 🎯 Our Mission

WAV0 is designed to make music production as fast and accessible as possible. Think of us as the "Figma for audio" - we want to reduce the steps from idea to sound while maintaining professional quality. Our goal is to make anyone capable of creating music, regardless of their technical background.
Thank you for your interest in contributing to WAV0! We're building the future of AI-native audio production and sound design, and your contributions help make high-quality production accessible to everyone.

## 🚀 Quick Start

Expand All @@ -14,90 +10,25 @@ WAV0 is designed to make music production as fast and accessible as possible. Th
- Git
- A modern web browser

### Development Setup

1. **Fork and clone the repository**
```bash
git clone https://github.com/yourusername/wav0.git
cd wav0
```

2. **Install dependencies**
```bash
bun install
```

3. **Set up environment variables**
```bash
cp .env.example .env.local
# Edit .env.local with your API keys and configuration
```

4. **Start the development server**
```bash
bun dev
```

5. **Open your browser**
Navigate to `http://localhost:3000` to see WAV0 running locally.

## 🏗️ Project Structure
## 💡 Tips for New Contributors

```
wav0/
├── app/ # Next.js App Router pages
│ ├── (marketing)/ # Marketing pages
│ ├── (protected)/ # Protected app pages
│ └── api/ # API routes
├── components/ # React components
│ ├── daw/ # DAW-specific components
│ ├── ai-elements/ # AI chat interface components
│ └── ui/ # Reusable UI components
├── lib/ # Core libraries and utilities
│ ├── audio/ # Audio processing and playback
│ ├── state/ # State management (Jotai)
│ └── utils/ # Utility functions
├── db/ # Database schema and migrations
└── public/ # Static assets
```

## 🎵 Core Components

### WAV0 AI Agent
- **Location**: `app/(protected)/create/`
- **Purpose**: AI-powered music generation and editing
- **Key Features**: Natural language to audio, soundpack generation

### Studio/DAW
- **Location**: `app/(protected)/daw/` and `components/daw/`
- **Purpose**: In-browser digital audio workstation
- **Key Features**: Multi-track editing, automation, real-time playback

### Playground
- **Location**: `app/(protected)/create/`
- **Purpose**: Quick experimentation with AI generation
- **Key Features**: Rapid prototyping, asset generation

### Vault
- **Location**: `app/(protected)/vault/`
- **Purpose**: Secure storage and version control for audio files
- **Key Features**: Private storage, sharing controls, version history
- **Ask questions on [Discord](https://wav0.app/discord)** - Don't hesitate to reach out! The community is friendly and helpful.
- **Explore the codebase** - Use your IDE's search to find related code, check existing patterns, and understand the architecture before making changes.
- **Start small** - Fix typos, improve documentation, or tackle "good first issue" labels to get familiar with the codebase.
- **Read the docs** - Check [AGENTS.md](../AGENTS.md) and [CLAUDE.md](../CLAUDE.md) for detailed development guidelines and patterns.

## 🛠️ Development Guidelines

See [AGENTS.md](../AGENTS.md) for development guidelines and the `.cursor/rules` folder for more detailed guidelines.

### Code Style

We use [Biome](https://biomejs.dev/) for linting and formatting:

```bash
# Check for issues
bun lint

# Auto-fix issues
bun lint:fix

# Format code
bun format
bun lint # Check for issues
bun lint:fix # Auto-fix issues
bun format # Format code
```

### TypeScript
Expand All @@ -114,123 +45,41 @@ bun format
- Use `useCallback` and `useMemo` for performance optimization
- Follow the component structure: exported component, subcomponents, helpers, types

### Audio Development

- **Audio Engine**: Built on [MediaBunny](https://mediabunny.dev) for browser-based processing
- **State Management**: Jotai for global state, React Query for server state
- **Real-time Processing**: Web Audio API with optimized performance

## 🧪 Testing
## 🤖 AI Development Guidelines

```bash
# Run type checking
bun typecheck

# Run linting
bun lint

# Build the project
bun build
```
AI use is **accepted and encouraged** for productivity, but **no slop allowed**. Quality over speed.

### Testing GitHub Workflows Locally
### Recommended Tools & Workflow

We use [act](https://github.com/nektos/act) to test GitHub Actions workflows locally before pushing. This saves time and prevents broken CI runs.
**Cursor (Recommended)**
- Use **Plan Mode** first to understand the approach
- Then use **Build Mode** to implement
- Ask questions and understand changes before committing
- Leverage features like **Agent Review** and **Bugbot** for code quality checks

#### Prerequisites
**Code Review Tools**
- Use tools like **CodeRabbit** and similar AI code review assistants
- Don't blindly accept suggestions—review and understand them

1. **Install Docker** (required for act to run)
- [Docker Desktop](https://www.docker.com/products/docker-desktop) for macOS/Windows
- Docker Engine for Linux
### Quality Checklist

2. **Install act**
```bash
# macOS (Homebrew)
brew install act
Before submitting PRs:
- ✅ Run `bun lint` and fix all issues
- ✅ Run `bun check-types` to ensure no TypeScript errors
- ✅ Run `bun build` to verify the project builds successfully
- ✅ Run `bun test` if tests exist
- ✅ Review your diff for AI-generated slop

# Windows (Chocolatey)
choco install act-cli
### Removing AI Slop

# Linux
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
```
We have a **deslop command** in `.cursor/commands/` to help clean up AI-generated code issues:

#### Running Workflows Locally
- Extra comments that a human wouldn't add or are inconsistent with the codebase
- Unnecessary defensive checks or try/catch blocks in trusted codepaths
- Type casts to `any` to bypass type issues
- Any style inconsistencies with the rest of the file

**Test CI workflow (lint, typecheck, build):**
```bash
# Run the full CI workflow
act -W .github/workflows/ci.yml

# Run with specific GitHub image (more accurate)
act -W .github/workflows/ci.yml -P ubuntu-latest=catthehacker/ubuntu:act-latest

# Pass secrets for Turbo remote caching (optional)
act -W .github/workflows/ci.yml \
-s TURBO_TOKEN=your_token \
-s TURBO_TEAM=your_team
```

**Test Convex deploy workflow (production):**
```bash
# ⚠️ WARNING: This will actually deploy to Convex if you provide real keys
act push -W .github/workflows/deploy-convex.yml \
-P ubuntu-latest=catthehacker/ubuntu:act-latest \
-s CONVEX_DEPLOY_KEY=your_deploy_key \
-s CONVEX_DEPLOYMENT=your_deployment_id

# Use --dryrun to test without executing
act push -W .github/workflows/deploy-convex.yml --dryrun
```

**Test Convex preview deploy:**
```bash
# Test preview deploy (requires ENABLE_CONVEX_PREVIEWS=1)
act pull_request -W .github/workflows/deploy-convex.yml \
-P ubuntu-latest=catthehacker/ubuntu:act-latest \
-s CONVEX_DEPLOY_KEY=your_preview_key \
-s CONVEX_DEPLOYMENT=your_preview_deployment \
--var ENABLE_CONVEX_PREVIEWS=1
```

#### Common act Options

- `-W <workflow.yml>` - Specify which workflow to run
- `-P ubuntu-latest=<image>` - Override runner image
- `-s KEY=value` - Pass secrets
- `--var KEY=value` - Pass repository variables
- `-n` or `--dryrun` - Show what would run without executing
- `-l` - List available workflows and jobs
- `--job <job_name>` - Run a specific job only
- `-v` - Verbose output for debugging

#### Best Practices

1. **Always use --dryrun first** for deploy workflows to avoid accidental deployments
2. **Use catthehacker/ubuntu images** for better compatibility with GitHub Actions
3. **Test with real secrets in a safe environment** (e.g., preview/staging)
4. **Check Docker resources** - act can be resource-intensive; ensure Docker has enough RAM/CPU

#### Troubleshooting

**act fails to start:**
- Ensure Docker is running (`docker ps`)
- Try pulling the runner image manually: `docker pull catthehacker/ubuntu:act-latest`

**Workflow differences from GitHub:**
- Some GitHub Actions features aren't fully supported by act
- Environment contexts may differ slightly
- Use GitHub's runner images for maximum accuracy

**Secrets not working:**
- Use `-s` flag, not `--secret` (older syntax)
- Check secret names match workflow exactly (case-sensitive)
- Use `--secret-file .secrets` for multiple secrets:
```bash
# .secrets file format:
CONVEX_DEPLOY_KEY=xxx
TURBO_TOKEN=yyy
```
**Always review AI-generated code**—understand what it does, ensure it matches our patterns, and remove slop before committing.

## 📝 Making Changes

Expand Down Expand Up @@ -287,6 +136,17 @@ Then create a pull request with:
- **Error Prevention**: Prevent destructive actions, provide undo options
- **Workflow Efficiency**: Minimize clicks and steps to common tasks

### Audio-Specific Considerations

- Focus on browser compatibility
- Optimize for real-time performance
- Consider memory usage for large audio files
- Test across different audio formats
- Maintain professional DAW standards
- Ensure precise timing and synchronization
- Support common keyboard shortcuts
- Provide visual feedback for all interactions

## 🐛 Bug Reports

When reporting bugs, please include:
Expand All @@ -306,39 +166,24 @@ When suggesting features:
3. **Use Cases**: Specific scenarios where this would be helpful
4. **Priority**: How important is this to your workflow?

## 🎵 Audio-Specific Contributions
## 🧪 Testing GitHub Workflows Locally

### Audio Processing
- Focus on browser compatibility
- Optimize for real-time performance
- Consider memory usage for large audio files
- Test across different audio formats
We use [act](https://github.com/nektos/act) to test GitHub Actions workflows locally. Install Docker and act, then:

### DAW Features
- Maintain professional DAW standards
- Ensure precise timing and synchronization
- Support common keyboard shortcuts
- Provide visual feedback for all interactions

### AI Integration
- Make AI features intuitive and fast
- Provide clear feedback on generation progress
- Allow easy iteration and refinement
- Support export to common formats
```bash
# Test CI workflow
act -W .github/workflows/ci.yml -P ubuntu-latest=catthehacker/ubuntu:act-latest

## 📚 Resources
# Test deploy workflow (use --dryrun first!)
act push -W .github/workflows/deploy-convex.yml --dryrun
```

- [Next.js Documentation](https://nextjs.org/docs)
- [MediaBunny Guide](https://mediabunny.dev/guide/introduction)
- [Jotai Documentation](https://jotai.org/)
- [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API)
- [Biome Documentation](https://biomejs.dev/)
See [act documentation](https://github.com/nektos/act) for full usage.

## 💬 Community

- **Discord**: [Join our community](https://discord.gg/wav0)
- **Discord**: [Join our community](https://wav0.app/discord)
- **Twitter**: [@wav0ai](https://twitter.com/wav0ai)
- **Documentation**: [wav0.app/docs](https://wav0.app/docs)

## 📄 License

Expand Down
23 changes: 23 additions & 0 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"mcpServers": {
"firecrawl": {
"command": "npx",
"args": ["-y", "firecrawl-mcp"],
"env": {
"FIRECRAWL_API_KEY": "${FIRECRAWL_API_KEY}"
}
},
"context7": {
"command": "npx",
"args": ["-y", "@context7/mcp-server"],
"env": {
"CONTEXT7_API_KEY": "${CTX_7_TOKEN}"
}
},
"next-devtools": {
"command": "bunx",
"args": ["-y", "next-devtools-mcp@latest"],
"env": {}
}
}
}
10 changes: 6 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ bun build # TypeScript check + build with Turbopack
bun start # Start production server

# Code Quality
bun typecheck # TypeScript type checking
bun check-types # TypeScript type checking
bun lint # Run Biome linter
bun lint:fix # Auto-fix linting issues
bun format # Format code with Biome
bun test # Run tests
```

## Code Style Guidelines
Expand Down Expand Up @@ -178,8 +179,9 @@ For playback engine (specifically, the audio manager/context), we have chosen th

- MEDIA BUNNY GUIDE: https://mediabunny.dev/guide/introduction
- MEDIA BUNNY EXAMPLES: https://mediabunny.dev/examples

- WEB AUDIO API DOCS: https://webaudio.github.io/web-audio-api/

## MCP Server Instructions
- Firecrawl MCP for crawling, scraping, and more.
- Context7 MCP for docs.
* Firecrawl MCP for crawling, scraping, and more.
* Context7 MCP for docs - for instance, if you need up-to-date docs on the Web Audio API or React, you can use the context7 mcp to search the web for the latest docs. or if you want the latest React docs.

Loading