Contribution Guidelines
Thank you for your interest in contributing to the MOOD MNKY ecosystem! This document outlines the process, standards, and best practices for contributing to our projects.Code of Conduct
All contributors are expected to adhere to our Code of Conduct, which promotes a respectful, inclusive, and collaborative environment. Key principles include:- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community and users
- Showing empathy towards other community members
Getting Started
Repository Structure
Our mono repo structure organizes code and resources into several main directories:Setting Up Your Development Environment
-
Clone the repository:
-
Install dependencies:
-
Set up environment variables:
Copy the example environment file and update with your local configuration:
-
Start development server:
Development Workflow
1. Creating a New Feature
1
Create a new branch
feature/- For new featuresfix/- For bug fixesdocs/- For documentation updatesrefactor/- For code refactoringtest/- For adding tests
2
Develop your feature
Write your code following our code style guidelines.
3
Write tests
Add appropriate unit and integration tests for your feature.
4
Run local tests
5
Commit your changes
Follow our commit message convention (see below).
2. Submitting a Pull Request
1
Push your branch
2
Create a pull request
Go to our GitHub repository and create a pull request with the following information:
- Clear title describing the change
- Detailed description explaining what, why, and how
- Reference to related issues
- Screenshots or videos for UI changes
3
Code review
A team member will review your code. Address any feedback or requests for changes.
4
Automated checks
Wait for automated tests, builds, and linting to complete successfully.
5
Merge
Once approved and all checks pass, your PR will be merged into the main branch.
Coding Standards
TypeScript Style Guide
We follow a consistent TypeScript style across all projects:Key Principles
- Type Safety: Always use proper TypeScript types and interfaces
- Function Components: Use function components with hooks instead of class components
- Named Exports: Prefer named exports over default exports
- Descriptive Naming: Use clear, descriptive names for variables, functions, and components
- State Management: Use appropriate state management based on complexity
- Error Handling: Implement comprehensive error handling
- Async/Await: Use async/await for asynchronous operations
- Comments: Add comments for complex logic, but aim for self-documenting code
Commit Message Convention
We follow a modified version of the Conventional Commits specification:Types
feat: A new featurefix: A bug fixdocs: Documentation changesstyle: Changes that don’t affect code functionality (whitespace, formatting, etc.)refactor: Code changes that neither fix bugs nor add featuresperf: Performance improvementstest: Adding or modifying testschore: Changes to build process, tools, etc.
Example Commit Messages
Testing Guidelines
We use a combination of testing tools:- Jest: For unit and integration tests
- React Testing Library: For component tests
- Cypress: For end-to-end tests
Testing Requirements
- Unit Tests: Required for all utility functions and custom hooks
- Component Tests: Required for all UI components
- Integration Tests: Required for complex features and workflows
- End-to-End Tests: Required for critical user journeys
Documentation
Code Documentation
- Use JSDoc comments for functions, classes, and interfaces
- Document parameters, return values, and thrown exceptions
- Include examples for complex functions
Product Documentation
For changes to user-facing features:- Update relevant documentation in the
/docsdirectory - Add or update examples and usage instructions
- Include screenshots or videos for UI changes
Review Process
All contributions go through our review process:- Automated Checks: Linting, type checking, and tests
- Code Review: Review by at least one team member
- UX Review: For UI changes
- Security Review: For authentication, data handling, or API changes
- Performance Review: For changes that might impact performance
Continuous Integration and Deployment
Our CI/CD pipeline includes:- Build Verification: Ensures the project builds successfully
- Automated Tests: Runs unit, integration, and e2e tests
- Linting and Type Checking: Enforces code style and type safety
- Preview Deployments: Creates temporary deployment for PR review
- Production Deployment: Automated deployment to production after merge
Getting Help
If you need assistance at any point in the contribution process:- Developer Discord: Join our developer channel for real-time help
- GitHub Discussions: Post questions or suggestions
- Issues: Review existing issues or create a new one
- Documentation: Consult our comprehensive documentation
Recognition
We value all contributions and recognize contributors in several ways:- Contributors are listed in our GitHub repository
- Significant contributions are highlighted in release notes
- Regular contributors may be invited to join the core team
Thank you for contributing to MOOD MNKY! Your efforts help us build better products and experiences for our users.