Thank you for your interest in contributing to RemitFlow! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Workflow
- Pull Request Process
- Coding Standards
- Testing Requirements
- Issue Reporting
- Community
We are committed to providing a welcoming and inclusive environment. Please:
- Be respectful and constructive in all interactions
- Focus on what is best for the community
- Show empathy towards other community members
- Accept constructive criticism gracefully
- Node.js: v18 or higher
- npm: v9 or higher
- Git: Latest stable version
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/RemitFlow-Frontend.git cd RemitFlow-Frontend -
Add the upstream remote:
git remote add upstream https://github.com/ORIGINAL_OWNER/RemitFlow-Frontend.git
npm installnpm run devThe app will be available at http://localhost:5173
Always create a new branch for your work:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fixBranch naming conventions:
feature/- New features or enhancementsfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringtest/- Adding or updating testschore/- Maintenance tasks
- Write clear, concise commit messages (see Commit Message Guidelines)
- Keep commits focused and atomic
- Test your changes thoroughly
- Follow the Coding Standards
Regularly sync with the upstream repository:
git fetch upstream
git rebase upstream/mainBefore submitting, ensure all tests pass:
npm test # Run all tests
npm run test:watch # Run tests in watch mode
npm run lighthouse # Run Lighthouse checksVerify the production build works:
npm run build
npm run preview- All tests pass (
npm test) - Code follows project conventions
- No console errors or warnings
- Lighthouse checks pass (if UI changes)
- Documentation updated (if needed)
- Commits are clean and well-organized
-
Push your branch to your fork:
git push origin your-branch-name
-
Open a Pull Request on GitHub with:
- Clear title: Summarize the change in <70 characters
- Description: Explain what, why, and how
- Issue reference: Link related issues (e.g., "Fixes #123")
- Screenshots: Include before/after for UI changes
- Testing notes: Describe how you tested the changes
-
Respond to review feedback promptly
-
Keep the PR updated with the main branch
-
Once approved, a maintainer will merge your PR
Use conventional commit format:
type(scope): brief description
Examples:
feat(send-money): add multi-recipient support
fix(transfers): resolve date filter bug
docs(readme): update installation instructions
refactor(components): simplify Button component
test(integration): add transfer filter tests
## Description
Brief summary of changes
## Motivation
Why is this change needed?
## Changes Made
- Change 1
- Change 2
- Change 3
## Testing
How were these changes tested?
## Screenshots (if applicable)
[Add screenshots for UI changes]
## Checklist
- [ ] Tests pass locally
- [ ] Code follows style guidelines
- [ ] Documentation updated
- [ ] No breaking changes (or documented if unavoidable)
- [ ] Lighthouse checks pass (for UI changes)
Fixes #<issue-number>- Use functional components with hooks
- Follow React best practices (proper hook usage, avoid unnecessary re-renders)
- Use descriptive variable and function names
- Keep components small and focused (single responsibility)
- Add PropTypes or comments for component props
- Avoid inline styles (use CSS classes)
- Use plain CSS with theme tokens (no preprocessors)
- Follow BEM-like naming for classes:
.component__element--modifier - Keep styles scoped to components (e.g.,
Button.cssforButton.jsx) - Use CSS custom properties for theming (see
src/index.css) - Ensure 44×44px minimum touch targets for interactive elements (WCAG 2.5.5)
src/
components/ # Reusable UI components
Button.jsx
Button.css
Button.stories.jsx
pages/ # Route-level components
services/ # API, wallet, business logic
hooks/ # Custom React hooks
context/ # React Context providers
utils/ # Pure utility functions
constants/ # Configuration and constants
- Indentation: 2 spaces
- Quotes: Single quotes for strings
- Semicolons: Required
- Line length: Prefer <100 characters
- Trailing commas: Use in multi-line objects/arrays
All contributions must maintain accessibility standards:
- Semantic HTML elements (
<button>,<nav>,<main>, etc.) - ARIA labels for icon buttons and non-text controls
- Keyboard navigation support
- Sufficient color contrast (WCAG AA minimum)
- Minimum 44×44px touch targets for interactive elements
- Proper focus management
- Test pure functions in
src/utils/,src/lib/ - Test custom hooks with React Testing Library
- Mock external dependencies (API calls, localStorage, etc.)
- Test user flows (e.g., send money, filter transfers)
- Test component interactions with user events
- Verify state updates and side effects
- Cover error scenarios and edge cases
Place tests in test/ directory:
import { render, screen, fireEvent } from '@testing-library/react';
import { describe, it, expect } from 'vitest';
import Button from '../src/components/Button';
describe('Button', () => {
it('renders with text', () => {
render(<Button>Click me</Button>);
expect(screen.getByRole('button')).toHaveTextContent('Click me');
});
it('calls onClick when clicked', () => {
const handleClick = vi.fn();
render(<Button onClick={handleClick}>Click</Button>);
fireEvent.click(screen.getByRole('button'));
expect(handleClick).toHaveBeenCalledTimes(1);
});
});For new interactive components, ensure touch target compliance:
/* Button.css */
.button {
min-width: 44px;
min-height: 44px;
/* ... other styles */
}Tests in test/touch-targets.test.js will verify this automatically.
Follow Conventional Commits:
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, no logic change)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks (dependencies, config)perf: Performance improvements
feat(send-money): add recipient validation
Validate recipient address format before enabling send button.
Displays inline error message for invalid addresses.
Closes #42
fix(transfers): correct date range filter logic
The "Last 30 days" filter was incorrectly calculating start date.
Now uses proper UTC date comparison.
Fixes #89
Before opening a new issue:
- Search existing issues to avoid duplicates
- Use issue templates: Choose Bug Report or Feature Request
- Provide details: Follow the template prompts
- Be responsive: Reply to questions from maintainers
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Browser and OS information
- Screenshots (if applicable)
- Problem statement (what need does this address?)
- Proposed solution
- Alternative approaches considered
- Mockups or examples (if applicable)
See Issue Triage Process for more details.
- GitHub Discussions: Ask questions and share ideas
- Issues: Report bugs and request features
- Pull Requests: Contribute code and documentation
Contributors are recognized in:
- GitHub Contributors page
- Release notes (for significant contributions)
- Project README (for major features)
If you have questions about contributing:
- Check existing documentation (README, this file)
- Search closed issues and PRs
- Ask in GitHub Discussions
- Reach out to maintainers
Thank you for contributing to RemitFlow! 🚀