Thank you for your interest in contributing to MeshMonitor! This guide will help you get started with development and ensure your contributions meet our quality standards.
We also have a comprehensive system test suite that verifies the full deployment using Docker.
# Run the full system test suite (builds fresh Docker image)
./tests/system-tests.sh
# Run tests against your running dev environment (Fast!)
./tests/dev-test.sh
# Run tests against a specific Meshtastic node
TEST_NODE_IP=192.168.1.50 ./tests/system-tests.shBefore submitting a PR, ensure all tests pass:
# Run all tests
npm run test:run
# Run tests in watch mode during development
npm run test
# Run tests with coverage report
npm run test:coverage
# Run specific test files
npm run test:run src/services/database.test.ts
# Run tests with UI (great for debugging)
npm run test:ui-
Unit Tests: Test individual functions and components
- Database operations (
src/services/database.test.ts) - React components (
src/components/*.test.tsx) - API endpoints (
src/server/*.test.ts)
- Database operations (
-
Type Checking: Ensure TypeScript types are correct
npm run typecheck
-
Linting: Follow our code style guidelines
npm run lint
When adding new features, include appropriate tests:
// Example test structure
describe('YourFeature', () => {
it('should handle normal cases', () => {
// Test implementation
});
it('should handle edge cases', () => {
// Test edge cases
});
it('should handle errors gracefully', () => {
// Test error handling
});
});-
Ensure all tests pass:
npm run test:run npm run typecheck npm run lint
-
Update documentation if you've changed APIs or added features
-
Test your changes with a real Meshtastic node if possible
-
Build the project to ensure it compiles:
npm run build npm run build:server
- Create a feature branch:
git checkout -b feature/your-feature-name # or git checkout -b fix/issue-description
refactor:Code refactoringtest:Test additions or changeschore:Maintenance tasks
- Use the shared
UiIconcomponent and a semantic registry name for app-owned interface icons. Do not hardcode emoji, checkmarks, arrows, stars, or similar Unicode glyphs in components or translated UI copy. - Use
BrandIconfor supported brands. Brand SVG data comes from Simple Icons and must record its source and version; do not substitute a lookalike emoji. - User-authored content and protocol/domain data (for example messages, reactions, waypoint symbols, and script-selected emoji) remain data, not interface icons. Any new source-level exception needs an issue-referenced ESLint disable explaining why it is content rather than UI.
npm run lint:ciblocks new hardcoded UI glyphs. Existing violations are ratcheted while they are migrated toUiIcon.
Our CI/CD pipeline runs automatically on all PRs:
-
PR Tests (
pr-tests.yml)- Runs on every PR
- Quick validation of changes
- Type checking and unit tests
-
Full CI (
ci.yml)- Comprehensive testing
- Multiple Node.js versions
- Docker build validation
- Security scanning
-
Release Pipeline (
release.yml)- Runs on version tags
- Full test suite
- Multi-platform Docker builds
- Automated release notes
All PRs must pass these checks:
- ✅ All tests passing
- ✅ TypeScript compilation successful
- ✅ Linter warnings resolved (or documented)
- ✅ Docker build successful
- ✅ Security scan clean
meshmonitor/
├── src/
│ ├── components/ # React components
│ ├── server/ # Express backend
│ ├── services/ # Shared services
│ └── test/ # Test utilities
├── docs/ # Documentation
│ └── architecture/ # System architecture docs
├── public/ # Static assets
├── .github/ # GitHub Actions workflows
└── tests/ # Additional test files
When reporting issues, please include:
-
Environment details:
- Node.js version
- Operating system
- Browser (for frontend issues)
- Meshtastic firmware version
-
Steps to reproduce
-
Expected vs actual behavior
-
Error messages and logs
-
Screenshots (if applicable)
We welcome feature requests! Please:
- Check existing issues first
- Describe the use case
- Explain the expected behavior
- Consider implementation complexity
Both frontend and backend support hot reloading in development mode.
# Reset database during development
rm data/meshmonitor.db
# The database will be recreated on next start# Build and test Docker image locally
docker build -t meshmonitor:local .
docker run -p 8080:3001 meshmonitor:local- Frontend debugging: Use React Developer Tools
- Backend debugging: Use Node.js inspector
node --inspect dist/server/server.js
- Test debugging: Use Vitest UI
npm run test:ui
We use ESLint and TypeScript for code quality:
- Use TypeScript for all new code
- Follow existing patterns in the codebase
- Add types for all function parameters and returns
- Use meaningful variable names
- Add comments for complex logic
- Keep functions small and focused
Your contributions make MeshMonitor better for everyone. We appreciate your time and effort in improving this project!
If you have questions, feel free to:
- Open an issue for discussion
- Ask in pull request comments
- Refer to existing code for patterns
Happy coding! 🚀