Thank you for your interest in contributing to React Image Editor! 🎉
We welcome contributions of all kinds, from bug reports and feature requests to code contributions and documentation improvements.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Setup
- Coding Guidelines
- Commit Message Guidelines
- Pull Request Process
- Testing
- Documentation
- Contributor License Agreement
- Getting Help
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to yuis.ice@example.com.
- Node.js: Version 18 or higher
- npm: Version 8 or higher (comes with Node.js)
- Git: For version control
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/react-image-editor.git cd react-image-editor - Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser to
http://localhost:5174
- Search existing issues to avoid duplicates
- Use the bug report template when creating a new issue
- Provide detailed information: OS, browser, steps to reproduce, etc.
- Include screenshots or videos if applicable
- Search existing feature requests to avoid duplicates
- Use the feature request template when creating a new request
- Explain your use case and why this feature would be valuable
- Consider starting a discussion first for major features
- Find an issue to work on or create one
- Comment on the issue to let others know you're working on it
- Fork and clone the repository
- Create a new branch for your feature or fix
- Make your changes following our coding guidelines
- Write tests for your changes
- Submit a pull request using our template
- Fix typos or clarify existing documentation
- Add examples or tutorials
- Improve API documentation
- Translate documentation to other languages
react-image-editor/
├── src/
│ ├── components/ # React components
│ ├── store/ # Zustand state management
│ ├── utils/ # Utility functions
│ ├── styles/ # CSS styles
│ └── types/ # TypeScript type definitions
├── public/ # Static assets
├── docs/ # Documentation
└── tests/ # Test files
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run type-check- Run TypeScript checksnpm test- Run tests
-
Create a
.envfile (optional):VITE_APP_NAME=React Image Editor VITE_DEBUG=true
-
VS Code Extensions (recommended):
- TypeScript and JavaScript Language Features
- ESLint
- Prettier
- Auto Rename Tag
- Bracket Pair Colorizer
- Use strict TypeScript configuration
- Define interfaces for all props and state
- Use type-only imports when appropriate:
import type { ImageState } from './types';
- Use functional components with hooks
- Prefer React.useRef for canvas element access
- Use React.memo for performance optimization when needed
- Follow React Hooks rules
- Use Canvas API directly instead of external libraries
- Implement pixel manipulation using ImageData for filters
- Ensure performance optimization for large images
- Handle browser compatibility considerations
- Use Zustand for global state
- Keep state minimal and normalized
- Implement proper undo/redo functionality
- Use immer for immutable updates when needed
- Use CSS modules or styled-components for component styles
- Follow BEM methodology for CSS class naming
- Ensure responsive design principles
- Support dark/light themes
- Group related files in the same directory
- Use index.ts files for clean imports
- Keep components small and focused
- Separate business logic from UI components
We follow the Conventional Commits specification:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the coderefactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testschore: Changes to the build process or auxiliary tools
feat(filters): add sepia filter effect
Add sepia tone filter with adjustable intensity parameter.
Implements canvas-based pixel manipulation for vintage effect.
Closes #42fix(crop): prevent negative crop dimensions
- Add validation for crop coordinates
- Ensure minimum crop size of 1x1 pixels
- Display user-friendly error messages
Fixes #38- Sync with upstream: Rebase your branch on the latest main
- Run tests: Ensure all tests pass
- Check linting: Run ESLint and fix any issues
- Test manually: Verify your changes work as expected
- Update documentation: Add or update relevant docs
- Clear title and description
- Link to related issues
- Include screenshots for UI changes
- Add tests for new functionality
- Update documentation if needed
- Follow coding guidelines
- Pass all CI checks
- Automated checks must pass (CI, tests, linting)
- Code review by at least one maintainer
- Manual testing for significant changes
- Documentation review if applicable
- Final approval and merge
- Unit tests for utility functions
- Component tests for React components
- Integration tests for user workflows
- Visual regression tests for UI changes
- Performance tests for image processing
// Example component test
import { render, screen } from '@testing-library/react';
import { FilterPanel } from './FilterPanel';
test('renders brightness slider', () => {
render(<FilterPanel />);
const slider = screen.getByLabelText(/brightness/i);
expect(slider).toBeInTheDocument();
});# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage
# Run specific test file
npm test FilterPanel.test.tsx- README.md: Project overview and quick start
- API Documentation: Function and component APIs
- Tutorials: Step-by-step guides
- Examples: Code examples and demos
- Contributing Guide: This document
- Use clear, concise language
- Include code examples
- Add screenshots for visual features
- Keep up-to-date with code changes
- Support multiple languages when possible
By contributing to React Image Editor, you agree that:
- Your contributions will be licensed under the MIT License
- You have the right to submit the code
- Your contributions are your own work or properly attributed
- You grant us a perpetual, worldwide, non-exclusive, royalty-free license to use your contributions
This is automatically agreed to when you submit a pull request.
- GitHub Discussions: For questions and general discussion
- GitHub Issues: For bug reports and feature requests
- Email: yuis.ice@example.com for security issues
- Discord: Join our Discord server (if available)
Q: How do I add a new image filter?
A: Check out the FilterPanel.tsx and imageProcessor.ts files for examples.
Q: Can I use external image processing libraries? A: We prefer Canvas API for consistency, but exceptions can be made for complex features.
Q: How do I test my changes with different image formats?
A: Use the test images in the public/test-images/ directory.
- React Documentation
- TypeScript Handbook
- Canvas API Documentation
- Zustand Documentation
- Vite Documentation
Contributors will be recognized in:
- README.md contributors section
- GitHub contributors page
- Release notes for significant contributions
- Hall of Fame for outstanding contributions
Thank you for contributing to React Image Editor! Your efforts help make this project better for everyone. 🚀