Thank you for your interest in contributing to MDUS! This document provides guidelines and information for contributors.
- 🐛 Bug Reports: Help us identify and fix issues
- 💡 Feature Requests: Suggest new features or improvements
- 🔧 Code Contributions: Submit bug fixes or new features
- 📚 Documentation: Improve documentation and examples
- 🧪 Testing: Add test cases and improve test coverage
- 🎨 UI/UX: Enhance user interface and experience
# Fork the repository on GitHub
# Then clone your fork
git clone https://github.com/YOUR_USERNAME/MDUS-system.git
cd MDUS-system
# Add upstream remote
git remote add upstream https://github.com/MichaelEnny/MDUS-system.git# Copy environment configuration
cp .env.example .env
# Edit .env with your settings
# Start development environment
docker-compose up -d
# Or set up locally
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r api-backend/requirements.txtgit checkout -b feature/your-feature-name
# or
git checkout -b bugfix/issue-number- Follow PEP 8 style guidelines
- Use Black for code formatting
- Use isort for import sorting
- Maximum line length: 88 characters
# Format code
black .
isort .
# Check style
flake8 .- Follow ESLint configuration
- Use Prettier for formatting
- Use camelCase for variables and functions
- Use PascalCase for components
# Format code
npm run format
# Check style
npm run lint- Use lowercase for keywords
- Use snake_case for table and column names
- Include appropriate indexes
- Document complex queries
Use conventional commit format:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringtest: Adding or updating testsperf: Performance improvementsci: CI/CD changes
Examples:
feat(api): add document batch processing endpoint
fix(frontend): resolve file upload timeout issue
docs(readme): update installation instructions
test(integration): add performance benchmarking tests
- Run All Tests:
# Integration tests
python run_integration_tests.py
# Unit tests (when available)
pytest tests/unit/
# Frontend tests
cd web-frontend && npm test-
Code Coverage:
- Maintain or improve existing coverage
- Add tests for new features
- Include edge cases
-
Performance Tests:
- Run performance benchmarks
- Ensure no regression in response times
- Statistical validation for performance claims
- Test individual functions/methods
- Mock external dependencies
- Fast execution (< 1s per test)
- Test service interactions
- Use real database/cache
- Include statistical validation
- Test complete workflows
- User-facing scenarios
- Performance validation
def process_document(document_id: str, options: Dict[str, Any]) -> ProcessingResult:
"""
Process a document using AI models.
Args:
document_id: Unique identifier for the document
options: Processing configuration options
Returns:
ProcessingResult: Results of document analysis
Raises:
DocumentNotFoundError: If document doesn't exist
ProcessingError: If processing fails
"""/**
* Upload a document file to the server
* @param file - The file to upload
* @param options - Upload configuration options
* @returns Promise that resolves to upload result
*/
async function uploadDocument(file: File, options: UploadOptions): Promise<UploadResult>- Update OpenAPI/Swagger specs
- Include request/response examples
- Document error codes
- Provide usage examples
- Update feature lists
- Add configuration options
- Include troubleshooting steps
- Update performance benchmarks
-
Self Review:
- Review your own code thoroughly
- Check for potential issues
- Ensure tests pass
-
Documentation:
- Update relevant documentation
- Add inline comments for complex logic
- Update API documentation
-
Testing:
- Add appropriate tests
- Verify all existing tests pass
- Include performance validation
Reviewers will check for:
- Functionality: Code works as intended
- Performance: No significant performance regression
- Security: No security vulnerabilities
- Maintainability: Code is readable and maintainable
- Testing: Adequate test coverage
- Documentation: Proper documentation updates
- Respond to all review comments
- Make requested changes promptly
- Ask for clarification when needed
- Update tests based on feedback
- Search Existing Issues: Check if bug already reported
- Reproduce: Ensure bug is reproducible
- Minimal Example: Create minimal reproduction case
## Bug Description
Brief description of the bug
## Steps to Reproduce
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
## Expected Behavior
What you expected to happen
## Actual Behavior
What actually happened
## Environment
- OS: [e.g. Windows 10, macOS 12.0, Ubuntu 20.04]
- Docker Version: [e.g. 20.10.12]
- Browser: [e.g. Chrome 96.0, Firefox 95.0]
- MDUS Version: [e.g. 1.0.0]
## Additional Context
Screenshots, logs, or other relevant information## Feature Description
Clear description of the feature
## Problem Statement
What problem does this solve?
## Proposed Solution
Detailed description of your proposed solution
## Alternatives Considered
Other solutions you've considered
## Additional Context
Mockups, examples, or other contextAll contributions undergo security review:
- Input Validation: All inputs properly validated
- Authentication: Proper authentication checks
- Authorization: Appropriate access controls
- Data Handling: Secure data processing
- Dependencies: No vulnerable dependencies
Do not report security vulnerabilities through public issues.
Instead:
- Email security concerns to: security@mdus-system.com
- Include detailed description
- Provide steps to reproduce
- Allow time for investigation before public disclosure
- API Response Time: < 200ms average
- Database Queries: < 50ms average
- Cache Operations: < 10ms
- Memory Usage: Monitor for leaks
- CPU Usage: Optimize for efficiency
# Run performance benchmarks
cd tests/integration
pytest -m performance
# Check specific metrics
pytest -m performance --benchmark-only- Profile code before optimizing
- Use appropriate data structures
- Implement efficient algorithms
- Cache frequently accessed data
- Optimize database queries
- Tests: All tests pass
- Code Style: Follows project conventions
- Documentation: Updated where necessary
- Performance: No significant regression
- Security: Security review completed
- Compatibility: Backward compatibility maintained
A contribution is considered complete when:
- Functionality: Feature works as specified
- Testing: Adequate test coverage
- Documentation: Updated documentation
- Review: Code review approved
- CI/CD: All automated checks pass
- Performance: Performance benchmarks met
- Be Respectful: Treat all community members with respect
- Be Constructive: Provide helpful and constructive feedback
- Be Collaborative: Work together towards common goals
- Be Patient: Help newcomers learn and contribute
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and discussions
- Pull Requests: Code contributions and reviews
- Email: Security issues and private concerns
Contributors are recognized in several ways:
- Contributors File: Listed in CONTRIBUTORS.md
- Release Notes: Mentioned in release announcements
- GitHub Recognition: GitHub contributor statistics
- Community Recognition: Featured in community updates
- FastAPI Documentation: https://fastapi.tiangolo.com/
- React Documentation: https://reactjs.org/docs/
- Docker Documentation: https://docs.docker.com/
- PostgreSQL Documentation: https://www.postgresql.org/docs/
- VS Code Extensions: Python, TypeScript, Docker
- Git Hooks: Pre-commit hooks for code quality
- Testing Tools: pytest, Jest, Cypress
- Monitoring Tools: Docker stats, performance profilers
- GitHub Repository: https://github.com/MichaelEnny/MDUS-system
- Issue Tracker: https://github.com/MichaelEnny/MDUS-system/issues
- Discussions: https://github.com/MichaelEnny/MDUS-system/discussions
- Wiki: https://github.com/MichaelEnny/MDUS-system/wiki
Thank you for contributing to MDUS! Your contributions help make this project better for everyone. 🚀