First off, thank you for considering contributing to RemitLend! It's people like you who make RemitLend a powerful tool for providing fair lending access to migrant workers worldwide.
This document provides a set of guidelines for contributing to RemitLend and its packages. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
- Code of Conduct
- Development Workflow
- Branching Strategy
- Commit Message Guidelines
- Pull Request Standards
- Testing Requirements
- Style Guides
By participating in this project, you agree to maintain a respectful, inclusive, and harassment-free environment for everyone. We are committed to providing a welcoming experience for contributors of all backgrounds and skill levels.
We follow a Feature-Branch-to-Main workflow. All development work should happen in feature branches and be merged into main via Pull Requests.
graph TD
Main[main branch] -->|Checkout| Feat[feat/your-feature]
Feat -->|Commits| Feat
Feat -->|Push| Remote[Remote Branch]
Remote -->|Open PR| PR[Pull Request]
PR -->|Review & CI| Merge[Merged to main]
Merge --> Main
- Fork & Clone: Fork the repository and clone it locally.
- Branch: Create a new branch from the latest
main. - Develop: Implement your changes, following code style and quality standards.
- Test: Ensure all tests pass (see Testing Requirements).
- Commit: Use Conventional Commits.
- Push & PR: Push your branch and open a Pull Request against
main.
Follow these naming conventions for your branches:
| Type | Prefix | Example |
|---|---|---|
| Feature | feat/ |
feat/lender-dashboard |
| Bug Fix | fix/ |
fix/nft-minting-error |
| Docs | docs/ |
docs/update-api-guide |
| Refactor | refactor/ |
refactor/loan-logic |
| Performance | perf/ |
perf/optimize-queries |
| Maintenance | chore/ |
chore/update-deps |
We strictly follow the Conventional Commits specification.
Format: <type>(<scope>): <subject>
- feat: A new feature (corresponds to
MINORin Semantic Versioning). - fix: A bug fix (corresponds to
PATCHin Semantic Versioning). - docs: Documentation only changes.
- style: Changes that do not affect the meaning of the code (white-space, formatting, etc).
- refactor: A code change that neither fixes a bug nor adds a feature.
- perf: A code change that improves performance.
- test: Adding missing tests or correcting existing tests.
- chore: Changes to the build process or auxiliary tools and libraries.
Example: feat(contracts): add flash loan prevention to lending pool
When opening a PR, ensure your description includes:
- Linked Issue: Close the relevant issue (e.g.,
Closes #123). - Description: A clear summary of the changes.
- Testing: Evidence that the changes were tested.
- Checklist:
- Code follows project style guides.
- Tests have been added/updated and pass.
- Documentation has been updated.
- Commit messages follow standards.
Before submitting, verify your changes by running:
cd frontend
npm run lint
npm run testcd backend
npm run lint
npm run testcd contracts
cargo fmt --check
cargo clippy
cargo test- TypeScript: Use functional components and hooks. Prefer
interfaceovertype. Ensure strict typing. - Rust: Follow standard Rust naming conventions and maintain idiomatic code.
Thank you for contributing to RemitLend! 🚀