Thanks for your interest in contributing! This document provides guidelines for contributing to the OVOS Music Visualizer.
- Node.js 20+ and pnpm
- OpenVoiceOS instance running (for testing)
- Git
-
Fork and clone the repository:
git clone https://github.com/OscillateLabsLLC/ocp-mac-visualizer cd ocp-mac-visualizer -
Install dependencies:
pnpm install
-
Start the development server:
pnpm run build node lib/server.js
The visualizer will be available at
http://localhost:3000.
ocp-mac-visualizer/
├── src/ # Source code
│ └── server.ts # Express server with Socket.IO
├── public/ # Static frontend assets
│ ├── index.html # Main HTML page
│ ├── style.css # Styling
│ └── script.js # Client-side JavaScript
├── test/ # Test files
├── .projenrc.js # Projen configuration
└── package.json # Dependencies and scripts
This project uses Projen for project configuration management. Important: Do not manually edit package.json or workflow files.
To modify project configuration:
- Edit
.projenrc.js - Run
pnpm projento regenerate files
- Follow TypeScript/JavaScript best practices
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions focused and concise
The project is currently configured with Jest but tests have not yet been implemented. This is a great area for contribution!
# Run tests (when implemented)
pnpm test# Compile TypeScript
pnpm compile
# Build project
pnpm build
# Run tests
pnpm test
# Update dependencies
pnpm upgradeUse clear, descriptive commit messages following Conventional Commits:
feat: add volume control to visualizer
fix: resolve WebSocket reconnection issue
docs: update setup instructions
test: add tests for playback controls
chore: update dependencies
Common prefixes:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test additions or modificationsrefactor:- Code refactoringperf:- Performance improvementschore:- Maintenance tasksci:- CI/CD changes
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Run
pnpm buildto ensure it compiles - Test manually with a running OVOS instance
- Commit with conventional commit messages
- Push to your fork
- Open a pull request
PR Guidelines:
- Keep PRs focused on a single concern
- Include tests for new functionality
- Update documentation as needed
- Ensure CI checks pass
- Link related issues
The visualizer connects to OVOS via WebSocket. Configure the connection in src/server.ts:
const ovosSocket = new WebSocket("ws://localhost:8181/core");Update the URL if your OVOS instance runs on a different host/port.
The default port is 3000. Change it by setting the PORT environment variable:
PORT=8080 node lib/server.js- Ensure your OVOS instance is running
- Start the visualizer
- Play music through OVOS
- Verify the visualizer updates correctly
- Test playback controls
The project includes Docker support:
# Build image
docker build -t ocp-mac-visualizer .
# Run container
docker run -p 3000:3000 ocp-mac-visualizer- Open an issue for bugs or feature requests
- Join the OpenVoiceOS Matrix chat
- Check existing issues before creating new ones
Be respectful and constructive. We're building tools for the OpenVoiceOS community - professionalism and clear communication are essential.
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.