Thank you for your interest in contributing to DeepMQ! This document provides guidelines and information for contributors.
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
- Node.js 18+ (LTS recommended)
- npm or yarn
- Git
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/deepmq.git cd deepmq -
Install dependencies:
npm install
-
Build the project:
npm run build
-
Run tests:
npm test
-
Create a feature branch:
git checkout -b feature/my-feature
-
Make your changes
-
Run the build and tests:
npm run build npm test -
Commit your changes:
git commit -m "Add my feature" -
Push to your fork:
git push origin feature/my-feature
-
Open a Pull Request
deepMQ/
├── src/
│ ├── protocol/ # AMQP protocol implementation
│ ├── core/ # Core entities (connection, channel, queue, etc.)
│ ├── routing/ # Message routing logic
│ ├── persistence/ # Storage layer
│ ├── events/ # Event system
│ ├── cli/ # Command-line interface
│ ├── server.ts # Main broker class
│ └── index.ts # Public exports
├── tests/
│ └── integration/ # Integration tests
├── docs/ # Documentation
└── dist/ # Compiled output
- Use TypeScript strict mode
- Provide explicit types for function parameters and return values
- Use interfaces for object shapes
- Avoid
anytype when possible
- Use 2-space indentation
- Use single quotes for strings
- Add trailing semicolons
- Maximum line length of 100 characters
- Use meaningful variable and function names
- Use kebab-case for file names:
frame-parser.ts - Use PascalCase for class names:
FrameParser - Use camelCase for functions and variables:
parseFrame
- Add JSDoc comments for public APIs
- Use inline comments sparingly, for complex logic
- Keep comments up-to-date with code changes
- Use specific error types when possible
- Include helpful error messages
- Don't swallow errors silently
# Run all tests
npm test
# Run specific test file
npm test -- dist/tests/integration/amqp-client.test.js- Place integration tests in
tests/integration/ - Use descriptive test names
- Test both success and failure cases
- Clean up resources in test teardown
import { describe, it, before, after } from 'node:test';
import * as assert from 'assert';
describe('Feature', () => {
before(async () => {
// Setup
});
after(async () => {
// Teardown
});
it('should do something', async () => {
// Test logic
assert.strictEqual(actual, expected);
});
});- Code builds without errors (
npm run build) - All tests pass (
npm test) - New features include tests
- Documentation is updated if needed
- Commit messages are clear and descriptive
Include in your PR description:
- What changes were made
- Why the changes were made
- How to test the changes
- Any breaking changes
- Maintainers will review your PR
- Address any feedback or requested changes
- Once approved, your PR will be merged
- Check existing issues for similar requests
- Open a new issue with the "enhancement" label
- Describe the feature and its use case
- Explain why it would benefit the project
Before implementing a significant feature:
- Open an issue to discuss the approach
- Wait for feedback from maintainers
- Reference the issue in your PR
- Check existing issues for duplicates
- Open a new issue with the "bug" label
- Include:
- DeepMQ version
- Node.js version
- Operating system
- Steps to reproduce
- Expected vs actual behavior
- Error messages or logs
- Reference the issue in your PR
- Include a test that reproduces the bug
- Verify the fix resolves the issue
Look for issues labeled "good first issue" for beginner-friendly tasks.
- TLS/SSL Support - Secure connections
- Management API - HTTP API for monitoring
- Dead Letter Exchanges - Handle failed messages
- Message TTL - Automatic message expiration
- Headers Exchange - Route by message headers
- Performance - Optimization and benchmarking
- Documentation - Improvements and examples
Releases are managed by maintainers:
- Version bump in
package.json - Update CHANGELOG.md
- Create git tag
- Publish to npm
- Open an issue for questions
- Check existing documentation
- Review closed issues for solutions
By contributing, you agree that your contributions will be licensed under the MIT License.