Contributing to Monstra
August 26, 2025 ยท View on GitHub
Thank you for your interest in contributing to Monstra! This document provides guidelines and information for contributors.
๐ค How to Contribute
Types of Contributions
We welcome various types of contributions:
- ๐ Bug Reports: Report bugs and issues
- ๐ก Feature Requests: Suggest new features and improvements
- ๐ Documentation: Improve documentation and examples
- ๐งช Tests: Add or improve tests
- ๐ง Code: Submit bug fixes and new features
- ๐ Examples: Create practical usage examples
๐ Getting Started
Prerequisites
- Swift 5.5+
- Xcode 15+ (for iOS/macOS development)
- Git
Development Setup
-
Fork the repository
git clone https://github.com/yourusername/Monstra.git cd Monstra -
Install development tools (optional but recommended)
brew install swiftlint swiftformat -
Build the project
swift build -
Run tests
swift test
๐ Development Workflow
1. Create a Feature Branch
git checkout -b feature/your-feature-name
# or
git checkout -b bugfix/your-bug-description
2. Make Your Changes
- Follow the existing code style and patterns
- Add tests for new functionality
- Update documentation as needed
- Ensure all tests pass
3. Commit Your Changes
git add .
git commit -m "feat: add new feature description"
Commit Message Format:
feat:for new featuresfix:for bug fixesdocs:for documentation changestest:for test additionsrefactor:for code refactoringstyle:for formatting changes
4. Push and Create Pull Request
git push origin feature/your-feature-name
Then create a Pull Request on GitHub.
๐งช Testing Guidelines
Running Tests
# Run all tests
swift test
# Run specific test suites
swift test --filter MonoTaskTests
swift test --filter MemoryCacheTests
swift test --filter PerformanceTests
# Run with verbose output
swift test --verbose
Test Requirements
- Coverage: Aim for high test coverage (80%+)
- Unit Tests: Test individual components thoroughly
- Integration Tests: Test component interactions
- Performance Tests: Ensure performance characteristics
- Edge Cases: Test boundary conditions and error scenarios
๐ Code Style Guidelines
Swift Style
- Follow Swift API Design Guidelines
- Use meaningful variable and function names
- Add comprehensive documentation comments
- Keep functions focused and concise
Documentation
- Use Swift DocC format for API documentation
- Include usage examples in comments
- Document complex algorithms and design decisions
- Keep README and documentation up to date
Performance
- Consider performance implications of changes
- Run performance tests before and after changes
- Document performance characteristics
- Avoid unnecessary allocations and computations
๐ Bug Reports
Before Reporting
- Check if the issue has already been reported
- Try to reproduce the issue with the latest version
- Check if it's a known limitation
Bug Report Template
**Description**
Brief description of the issue
**Steps to Reproduce**
1. Step 1
2. Step 2
3. Step 3
**Expected Behavior**
What you expected to happen
**Actual Behavior**
What actually happened
**Environment**
- OS: [e.g., macOS 14.0, iOS 17.0]
- Swift Version: [e.g., 5.5]
- Monstra Version: [e.g., 1.0.0]
**Additional Context**
Any other relevant information
๐ก Feature Requests
Feature Request Template
**Problem Statement**
Describe the problem you're trying to solve
**Proposed Solution**
Describe your proposed solution
**Alternatives Considered**
Describe alternatives you've considered
**Additional Context**
Any other relevant information
๐ Code Review Process
Pull Request Requirements
- Tests: All tests must pass
- Documentation: Update relevant documentation
- Examples: Add examples for new features
- Performance: Consider performance impact
- Backward Compatibility: Maintain API compatibility
Review Checklist
- Code follows project style guidelines
- Tests are comprehensive and pass
- Documentation is updated
- Performance impact is considered
- Backward compatibility is maintained
- Examples are provided for new features
๐ Issue Labels
We use the following labels to categorize issues:
bug: Something isn't workingenhancement: New feature or requestdocumentation: Improvements or additions to documentationgood first issue: Good for newcomershelp wanted: Extra attention is neededperformance: Performance-related issuesquestion: Further information is requestedwontfix: This will not be worked on
๐ฏ Areas for Contribution
High Priority
- Performance improvements
- Additional test coverage
- Documentation improvements
- Bug fixes
Medium Priority
- New utility functions
- Additional examples
- Performance benchmarks
- Cross-platform support
Low Priority
- Nice-to-have features
- Experimental implementations
- Additional convenience methods
๐ Getting Help
Questions and Discussion
- GitHub Discussions: Use GitHub Discussions for questions
- GitHub Issues: Use Issues for bugs and feature requests
- Pull Requests: Use PRs for code contributions
Community Guidelines
- Be respectful and inclusive
- Help others learn and contribute
- Provide constructive feedback
- Follow the project's code of conduct
๐ Recognition
Contributors will be recognized in:
- Project README
- Release notes
- GitHub contributors list
- Project documentation
๐ License
By contributing to Monstra, you agree that your contributions will be licensed under the same license as the project (MIT License).
Thank you for contributing to Monstra! ๐