Thank you for your interest in contributing! This guide will help you get started.
git clone https://github.com/alohays/monitor-forge.git
cd monitor-forge
npm install # installs dependencies and auto-generates manifests
npm run dev # starts dev server at http://localhost:5173- Never manually edit
monitor-forge.config.json— always use the forge CLI - Always validate before building:
npm run forge -- validate - All code, comments, commit messages, and documentation must be in English
- Create feature branches from
main - Use descriptive branch names:
feat/add-panel-type,fix/rss-parsing,docs/contributing
Follow Conventional Commits:
feat:— new featurefix:— bug fixdocs:— documentationchore:— maintenancerefactor:— code restructuringtest:— adding or updating tests
Run all checks:
npm test # run tests
npm run forge -- build --skip-vite --format json # generate manifests (required for typecheck)
npm run typecheck # TypeScript check
npm run forge -- validate --format json # config validation- Create a JSON file in
presets/following the existing format - The config schema at
forge/src/config/schema.ts(Zod) is the single source of truth - Source names must be lowercase alphanumeric with hyphens
- Colors must be 6-digit hex codes
- Validate:
npm run forge -- validate
- Create a new panel class extending
PanelBaseinsrc/core/panels/ - Register it in the panel registry
- Add corresponding tests
- All user-facing content must be sanitized with DOMPurify
- Create a new source class extending
SourceBaseinsrc/core/sources/ - Register it in the source registry
- Add corresponding tests
- GeoJSON files go in
data/geo/, not insrc/ - Supported layer types: points, lines, polygons, heatmap, hexagon
- TypeScript strict mode
- Use DOMPurify for all innerHTML/user-facing content
- Edge Functions (in
api/) must not use Node.js APIs (nofs,path,Buffer) - Use shared utilities from
api/_shared/for API responses
Open a Discussion for questions that aren't bug reports or feature requests.