First off, thank you for considering contributing to CoDi API! It's people like you that make this project such a great tool for the Mexican fintech community.
- Code of Conduct
- How Can I Contribute?
- Getting Started
- Development Workflow
- Coding Standards
- Commit Message Guidelines
- Pull Request Process
- Testing Guidelines
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Before creating bug reports, please check existing issues to avoid duplicates.
When you create a new bug report, our template will guide you through providing:
- Clear title and description
- Steps to reproduce the behavior
- Expected vs actual behavior
- Environment details: Node.js version, OS, etc.
- Error messages or logs (sanitize sensitive data)
Security Note: For security vulnerabilities, please follow our Security Policy instead of creating a public issue.
Enhancement suggestions are tracked as GitHub issues.
When you create a new feature request, our template will guide you through providing:
- Use a clear title describing the enhancement
- Provide detailed description of the suggested enhancement
- Explain why this enhancement would be useful
- List alternatives you've considered
- Impact assessment on existing functionality and integrations
Look for issues tagged with:
good first issue- Simple issues perfect for newcomershelp wanted- Issues where we need community helpdocumentation- Documentation improvements
- 🐛 Bug fixes
- 📝 Documentation improvements
- ✨ New features (discuss in an issue first)
- ✅ Test coverage improvements
- 🔒 Security enhancements
- 🌐 Internationalization (i18n)
- ⚡ Performance optimizations
git clone https://github.com/YOUR_USERNAME/codi-api.git
cd codi-apigit remote add upstream https://github.com/portfedh/codi-api.gitgit checkout -b feature/your-feature-nameBranch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation updatestest/- Test improvementsrefactor/- Code refactoring
npm install
cp .env.example .env
# Edit .env with your test configuration- Keep commits focused - one logical change per commit
- Write tests for new features or bug fixes
- Run tests before committing
- Follow coding standards
- Update documentation if needed
npm test # Run all tests
npm test -- --watch # Watch mode
npm test -- --coverage # With coveragenpm run dev # Start development server
curl http://localhost:3131/v2/health # Test endpoint- Use 2 spaces for indentation
- Use semicolons at the end of statements
- Use single quotes for strings
- Use const by default,
letwhen reassignment needed - Use async/await instead of raw promises
// Variables and functions: camelCase
const apiKey = "abc123";
function getUserData() {}
// Classes: PascalCase
class PaymentProcessor {}
// Constants: UPPER_SNAKE_CASE
const MAX_RETRY_ATTEMPTS = 3;Use JSDoc comments for functions:
/**
* Sends a CoDi payment request via QR code.
*
* @param {Object} req - Express request object
* @param {Object} res - Express response object
* @returns {Promise<void>}
*/
async function sendQrPayment(req, res) {
// Implementation
}try {
const result = await processPayment(data);
return res.json({ success: true, result });
} catch (error) {
console.error("Payment processing failed:", error);
return res.status(500).json({
success: false,
message: "Payment processing failed",
});
}Follow Conventional Commits:
<type>(<scope>): <subject>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
feat(qr): add timeout configuration for QR generation
fix(webhook): prevent duplicate payment processing
docs(readme): update installation instructions- ✅ Tests pass:
npm testsucceeds - ✅ Code is formatted per standards
- ✅ Documentation updated
- ✅ Commits have meaningful messages
- ✅ Branch is up to date with main
-
Push to your fork:
git push origin feature/your-feature-name
-
Create Pull Request on GitHub
-
Our PR template will auto-populate. Fill it out with:
- Description of changes
- Type of change (bug fix, feature, etc.)
- Testing performed
- Related issues
- License compliance checklist
- Security considerations
- Maintainers will review your PR
- Address any requested changes
- Once approved, your PR will be merged
- Your contribution will be credited
describe("Feature Name", () => {
it("should do X when Y happens", () => {
// Arrange
const input = "test";
// Act
const result = processInput(input);
// Assert
expect(result).toBe("expected");
});
});- Aim for 80%+ coverage on new code
- Test happy paths and error cases
- Test edge cases and boundary conditions
- Mock external dependencies
- 💬 GitHub Discussions for general questions
- 🐛 GitHub Issues for bugs and feature requests
- 📧 Email for security issues (see SECURITY.md)
If you find CoDi API useful and want to support its development, consider becoming a sponsor. Your support helps maintain and improve this project for the community! 💖
Contributors will be recognized in:
- GitHub contributors list
- Release notes for significant contributions
- README acknowledgments for major features
Thank you for contributing to CoDi API! 🚀