Thank you for your interest in contributing to Fleet Control Center. This document outlines the guidelines and procedures for contributing to the project.
- Zero external dependencies. All code must use the Node.js standard library only. No npm packages. This requirement is non-negotiable.
- All new features require tests. Use
node:testandnode:assert/strict. - Security first. Do not introduce vulnerabilities such as injection, XSS, or path traversal. If you discover a vulnerability, report it privately via Security Advisories.
# Clone and verify
git clone https://github.com/alokemajumder/FleetControlCenter.git
cd clawcc
node --version # Must be >= 18.0.0
# Run tests
npm test # Unit tests (10 suites)
node test/e2e-smoke.js # E2E smoke tests
npm run test:all # Both
# Start the server
cp config/clawcc.config.example.json clawcc.config.json
npm startNo npm install is needed. There are no dependencies.
- Fork the repository on GitHub.
- Clone your fork locally.
- Create a branch from
main:git checkout -b feature/your-feature-name
- Make your changes. Keep commits focused and atomic.
- Add tests for any new functionality.
- Run the full test suite and confirm that all tests pass:
npm run test:all
- Push your branch and open a pull request against
main.
| Type | Description |
|---|---|
| Bug fixes | Include a failing test and the corresponding fix |
| Security improvements | Harden existing controls or introduce new defensive measures |
| Test coverage | Add tests for untested code paths |
| Documentation | Fix inaccuracies, improve clarity, or add examples |
| Performance | Optimize hot paths and include benchmarks showing improvement |
| New features | Open an issue first to discuss the design |
- Begin every file with
'use strict';. - Use
constby default,letwhen reassignment is necessary, and nevervar. - Use the
node:prefix for all standard library imports (e.g.,require('node:fs')). - Use factory functions (e.g.,
createEventStore()) instead of classes. - Keep functions small and focused. Prefer pure functions where possible.
- Write descriptive, actionable error messages.
- Avoid
console.login library code except for startup messages and error logging.
- Place test files in
test/<module-name>/<module-name>.test.js. - Use
describe()andit()fromnode:test. - Use
assertfromnode:assert/strict. - Tests must be deterministic -- no reliance on timing, network, or external state.
- Use temporary directories (
os.tmpdir()) for filesystem tests and clean up afterward. - Test both success and failure paths.
- Use the imperative mood: "Add feature" not "Added feature."
- Keep the first line under 72 characters.
- Reference issue numbers where applicable: "Fix session leak (#42)."
- Ensure all tests pass (
npm run test:all). - Update documentation if your change affects the API, configuration, or user-facing behavior.
- Fill out the pull request template with a description of what changed and why.
- A maintainer will review your pull request. Address any feedback promptly.
- Once approved, a maintainer will merge your pull request.
Open an issue on GitHub with the following information:
- Steps to reproduce the bug
- Expected behavior
- Actual behavior
- Node.js version and operating system
- Relevant log output
Do not open a public issue for security vulnerabilities. Instead, use GitHub Security Advisories to report them privately. See SECURITY.md for the full policy.
By contributing to Fleet Control Center, you agree that your contributions will be licensed under the MIT License.