Thank you for your interest in contributing to this project! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Pull Request Process
- Coding Standards
- Testing Guidelines
- Documentation
Please read and follow our Code of Conduct to maintain a welcoming and inclusive community.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/plugin-ai-agent-rabbitmq.git cd plugin-ai-agent-rabbitmq - Add the upstream remote:
git remote add upstream https://github.com/umitkacar/plugin-ai-agent-rabbitmq.git
- Node.js >= 18.0.0
- Docker and Docker Compose
- Git
-
Install dependencies:
npm install
-
Start the infrastructure services:
docker-compose up -d
-
Set up environment variables:
cp .env.example .env # Edit .env with your configuration -
Run database migrations:
npm run migrate:up
-
Verify the setup:
npm test
feature/- New features (e.g.,feature/add-voting-algorithm)fix/- Bug fixes (e.g.,fix/rabbitmq-connection-leak)docs/- Documentation updates (e.g.,docs/update-api-reference)refactor/- Code refactoring (e.g.,refactor/simplify-auth-flow)test/- Test additions or fixes (e.g.,test/add-e2e-voting-tests)
We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Types:
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Code style changes (formatting, semicolons, etc.)refactor: Code changes that neither fix bugs nor add featuresperf: Performance improvementstest: Adding or correcting testschore: Changes to build process or auxiliary tools
Examples:
feat(voting): add ranked-choice voting algorithm
fix(rabbitmq): resolve connection timeout on high load
docs(api): update WebSocket endpoint documentation
test(gamification): add unit tests for achievement system-
Update your fork with the latest upstream changes:
git fetch upstream git rebase upstream/main
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes and commit them following the commit message format.
-
Run tests to ensure nothing is broken:
npm test npm run lint -
Push your branch to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub with:
- Clear title following commit message format
- Description of what changed and why
- Reference to related issues (if any)
- Screenshots for UI changes (if applicable)
-
Address review feedback by pushing additional commits.
-
Squash commits if requested before merge.
- Use ES Modules (
import/export) - Follow Airbnb JavaScript Style Guide
- Use
async/awaitfor asynchronous operations - Add JSDoc comments for public APIs
- Run
npm run lintbefore committing - Use Prettier for code formatting:
npm run format - Indentation: 2 spaces
- Line length: 100 characters max
src/
├── auth/ # Authentication & authorization
├── db/ # Database layer
├── errors/ # Error handling
├── logger/ # Logging
├── middleware/ # Express middleware
├── repositories/ # Data access layer
├── utils/ # Utilities
└── validation/ # Input validation
scripts/
├── gamification/ # Gamification system
├── mentorship/ # Mentorship system
├── voting/ # Voting algorithms
└── ... # Other operational scripts
-
Unit Tests (
tests/unit/)- Test individual functions and modules
- Mock external dependencies
- Fast execution
-
Integration Tests (
tests/integration/)- Test component interactions
- Use test database
- May use Docker services
-
E2E Tests (
tests/e2e/)- Test complete workflows
- Require full infrastructure
- Run before release
# All tests
npm test
# Unit tests only
npm run test:unit
# Integration tests
npm run test:integration
# E2E tests
npm run test:e2e
# With coverage
npm run test:coverage- Use descriptive test names
- Follow Arrange-Act-Assert pattern
- Cover edge cases
- Aim for 80%+ code coverage
- Adding new features
- Changing API endpoints
- Modifying configuration options
- Fixing bugs that affect behavior
docs/
├── api/ # API reference
├── architecture/ # System design
├── development/ # Developer guides
├── guides/ # User guides
├── logging/ # Logging & monitoring
├── operations/ # Ops runbooks
├── performance/ # Performance tuning
├── reports/ # Project reports
├── security/ # Security docs
└── testing/ # Testing guides
- Use Markdown format
- Include code examples
- Add diagrams where helpful
- Keep content up-to-date with code
If you have questions about contributing, please:
- Check existing issues
- Open a new issue with the
questionlabel - Join our discussions
Thank you for contributing!