Thank you for your interest in contributing to PrintMaster! This document provides guidelines and information to help you get started.
- Code of Conduct
- Getting Started
- Development Setup
- Project Structure
- Making Changes
- Testing
- Submitting Changes
- Adding Printer Support
Please be respectful and constructive in all interactions. We're building something useful together.
- Fork the repository on GitHub
- Clone your fork locally
- Create a branch for your changes
git clone https://github.com/YOUR_USERNAME/printmaster.git
cd printmaster
git checkout -b feature/your-feature-name- Go 1.24+ - Download
- Git - For version control
- PowerShell (Windows) or Bash (Linux/macOS) - For build scripts
# Windows - Build agent
.\build.ps1 agent
# Windows - Build server
.\build.ps1 server
# Windows - Build both
.\build.ps1 both# Test agent packages
cd agent; go test ./... -v
# Test server packages
cd server; go test ./... -v# Windows - Kill existing processes, build, and launch
.\dev\launch.ps1printmaster/
├── agent/ # Agent binary - printer discovery & monitoring
│ ├── scanner/ # SNMP scanning pipeline
│ │ └── vendor/ # Vendor-specific OID profiles
│ ├── storage/ # SQLite device/metrics storage
│ └── web/ # Embedded web UI
├── server/ # Server binary - multi-agent management
│ ├── handlers/ # HTTP API handlers
│ ├── storage/ # Database layer
│ └── web/ # Embedded web UI
├── common/ # Shared packages (logger, config, etc.)
└── docs/ # Design documentation
Key documentation:
- docs/BUILD_WORKFLOW.md - Build, test, and release procedures
- docs/PROJECT_STRUCTURE.md - Detailed architecture overview
- docs/ROADMAP.md - Planned features and priorities
- Follow standard Go conventions (
gofmt,go vet) - Use meaningful variable and function names
- Add comments for non-obvious logic
- Keep functions focused and reasonably sized
Write clear, descriptive commit messages:
component: short description of change
Longer explanation if needed. Explain the "why" not just the "what".
Examples:
agent/scanner: add Brother MFC series supportserver/api: fix pagination on device list endpointdocs: update SNMP reference with new OIDs
- Don't write bandaid fixes - If there's a bug, fix the root cause
- Don't edit VERSION files manually - Use
.\release.ps1for releases - Don't commit large uncommitted diffs - Land changes incrementally
# Run all tests for a component
cd agent && go test ./...
cd server && go test ./...
# Run specific test
go test -v -run TestFunctionName ./package/
# Run with race detection
go test -race ./...- Use table-driven tests where appropriate
- Use
t.Parallel()for independent tests - Mock external dependencies (SNMP, network, etc.)
- See existing tests for patterns, e.g.,
agent/scanner/tests
Before submitting:
- Ensure all existing tests pass
- Add tests for new functionality
- Add tests for bug fixes (to prevent regression)
-
Update your branch with the latest main:
git fetch origin git rebase origin/main
-
Run tests and ensure they pass
-
Push your branch and create a Pull Request
-
Fill out the PR template completely
-
Respond to feedback promptly
- Keep PRs focused - one feature or fix per PR
- Include tests for new code
- Update documentation if needed
- Reference related issues (e.g., "Fixes #123")
One of the most valuable contributions is adding support for new printer models!
- Find the vendor file in
agent/scanner/vendor/ - Add OID mappings for the printer's SNMP data
- Test with a real device if possible
- Submit a PR with the model info
If you have access to the printer:
# Basic device info
snmpwalk -v2c -c public <printer-ip> 1.3.6.1.2.1.1
# Printer MIB
snmpwalk -v2c -c public <printer-ip> 1.3.6.1.2.1.43
# Full walk (large output)
snmpwalk -v2c -c public <printer-ip> 1.3.6.1- docs/SNMP_REFERENCE.md - OID documentation
- agent/scanner/vendor/ - Existing vendor profiles
- Open a Printer Support Request if you need help
- Check existing issues
- Open a Question issue
- Read the documentation
Thank you for contributing! 🖨️