Getting started
Before you begin contributing:- Set up your development environment following the setup guide
- Read the architecture documentation to understand the codebase structure at architecture
- Check existing issues to see if your idea or bug is already being addressed
- Fork the repository to your own GitHub account
How to contribute
Reporting bugs
If you find a bug, please create an issue with:- Clear title: Brief description of the problem
- Steps to reproduce: Detailed steps to recreate the issue
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Environment: OS, Node.js version, browser (if frontend issue)
- Screenshots: If applicable
Suggesting features
Feature requests are welcome! Please create an issue describing:- Problem statement: What problem does this feature solve?
- Proposed solution: How would you implement it?
- Alternatives considered: What other approaches did you think about?
- Impact: Who benefits and how?
Submitting pull requests
Make your changes
Write your code following the style guidelines below. Keep commits focused and atomic:
Test your changes
Ensure your changes work as expected:
- Test manually in the browser
- Verify database operations work correctly
- Check that existing functionality still works
- Test edge cases and error conditions
Code style guidelines
General JavaScript
- Use ES6+ features where appropriate (arrow functions, destructuring, etc.)
- Use 2 spaces for indentation
- Use single quotes for strings (following existing codebase style)
- Use semicolons consistently
- Keep functions small and focused on a single responsibility
React components
Functional vs. class components:- Use class components for containers that connect to Redux
- Use functional components for presentational components when possible
- Consider adding PropTypes validation for components (currently not enforced)
- Destructure props in render method for cleaner code
Redux patterns
Action creators:- Keep reducers pure (no side effects)
- Use immutable updates (spread operators, Array methods that return new arrays)
- Handle all relevant action types
- Always return state for unhandled actions
Express routes
Route organization:- Group related routes in separate files under
server/api/routes/ - Use Express Router for modular route definitions
- Use descriptive route names and HTTP methods
Database queries
Sequelize best practices:- Use
findOne,findAll,create,update,destroymethods - Use
whereclauses for filtering - Use
includefor eager loading associations - Handle errors appropriately
Testing
Testing guidelines (tests not yet implemented)
Testing guidelines (tests not yet implemented)
Currently, the project does not have a comprehensive test suite. This is a great area for contribution!Areas that need testing:
- Algorithm correctness (unit tests for
__alg/ArithmaticHelpers.js) - Redux reducers (pure functions, easy to test)
- API endpoints (integration tests)
- React components (snapshot and interaction tests)
- Jest: Test runner and assertion library
- React Testing Library: React component testing
- Supertest: Express API testing
Development workflow
Branch strategy
main: Stable, deployable code- Feature branches:
feature/description - Bug fix branches:
fix/description - Refactoring branches:
refactor/description
main via pull request after review.
Commit messages
Write clear, concise commit messages: Good:Code review
All pull requests should be reviewed before merging:- Check functionality: Does it work as intended?
- Review code quality: Is it readable and maintainable?
- Verify style: Does it follow project conventions?
- Test edge cases: What could break?
- Consider performance: Are there efficiency concerns?
Areas that need improvement
The project has several areas where contributions would be especially valuable:High priority
- Test suite: Add comprehensive unit and integration tests
- Error handling: Improve error messages and user feedback
- Input validation: Add validation for user inputs (card quantities, deck size)
- Algorithm optimization: Profile and optimize probability calculations
- Documentation: Add JSDoc comments to complex functions
Medium priority
- Card data source: Implement automated card data import from MTG API
- Deck export: Add ability to export decks to common formats
- Advanced filters: More sophisticated card search and filtering
- Multi-card probability: Calculate probability of drawing multiple specific cards
- Mobile responsiveness: Improve UI for mobile devices
Nice to have
- User accounts: Save decks to user accounts
- Deck statistics: Show deck composition graphs and statistics
- Card images: Display card images from Scryfall or similar API
- Probability visualization: Charts showing probability over multiple turns
- Deck recommendations: Suggest cards based on deck composition
Questions and support
If you have questions about contributing:- Check the documentation: Setup and Architecture guides
- Open an issue: For questions about implementation approach
- Join discussions: Participate in existing issue discussions
License
By contributing to this project, you agree that your contributions will be licensed under the same license as the project (ISC).Recognition
All contributors will be recognized in the project. Thank you for helping make the MTG Deck Builder better!Ready to contribute? Pick an issue labeled
good first issue or help wanted to get started!