How to Contribute
We welcome contributions to Invoice OCR! Whether you’re fixing bugs, adding features, or improving documentation, your help is appreciated.Getting Started
- Fork the repository and clone it locally
- Set up your environment:
- Create a branch for your changes
- Make your changes following our code style guidelines
- Test your changes thoroughly
- Submit a pull request
Pull Request Process
Before Submitting
- Run linting:
npm run lint - Fix all lint errors before committing
- Run tests:
npm testornpm run test:run - Ensure all tests pass
- Test your changes locally with
npm run dev
PR Requirements
Your pull request should include:-
Clear purpose and scope
- Describe what your PR does and why
- Link to related issues (e.g., “Fixes #123”)
-
Screenshots or GIFs for UI changes
- Before/after comparisons help reviewers understand visual changes
- Use tools like Kap or ScreenToGif
-
Local test steps
- Provide steps to test your changes
- Include sample data or test cases if applicable
-
Environment variable changes
- Document any new or modified env vars
- Update
.env.exampleif needed
Example PR Description
Issue Reporting
Bug Reports
When reporting bugs, please include:- Clear description of the issue
- Steps to reproduce the problem
- Expected vs actual behavior
- Environment details:
- Node.js version
- npm version
- Operating system
- Browser (if UI-related)
- Error messages or screenshots
- Sample data (if applicable, ensure no sensitive information)
Feature Requests
For feature requests, describe:- Use case: What problem does this solve?
- Proposed solution: How should it work?
- Alternatives considered: Other approaches you’ve thought about
- Additional context: Screenshots, mockups, or examples
Code Review Process
- Automated checks run on every PR (linting, tests)
- Maintainer review for code quality and design
- Discussion and iteration if changes are needed
- Merge once approved and all checks pass
Security
Reporting Security Issues
Do not open public issues for security vulnerabilities. Instead, contact the maintainers directly.Security Best Practices
- Never commit secrets: Use
.env.local(gitignored) - Keep API keys server-side only: No client-side exposure
- Validate inputs: All user inputs should be sanitized
- Review dependencies: Keep packages up to date
Getting Help
If you need help contributing:- Check the development documentation
- Review existing issues and PRs for examples
- Ask questions in issue discussions
- Reach out to maintainers for guidance
