First off, thank you for considering contributing to the Grix Interface! Your help is appreciated.
There are many ways to contribute, including:
- Reporting bugs
- Suggesting enhancements or new features
- Writing or improving documentation
- Adding or improving tests (Unit, Integration, E2E)
- Writing code for bug fixes or new features
- Fork the repository: Click the "Fork" button on the top right of the repository page.
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/grixprotocol.git cd grixprotocol/interface - Install dependencies: This project uses
pnpmfor package management.pnpm install
- Run the development server:
This will start the Vite development server, available at
pnpm dev
http://localhost:5173.
- Find an Issue: propose your own idea by creating a new issue. Discuss your plan with the maintainers before starting significant work.
- Create a Branch: Create a descriptive branch from
main.git checkout -b feature/your-feature-name # or fix/your-bug-fix-name - Make Changes: Write your code, documentation, or tests.
- Ensure Code Quality:
- Linting & Formatting: Run the linters and formatters to ensure your code adheres to the project's style guide.
pnpm lint:fix pnpm prettier:fix
- Testing: Add relevant tests for your changes and ensure all tests pass.
pnpm test # Run unit tests (Jest) pnpm playwright # Run E2E tests (Playwright) - see package.json for more options
- Linting & Formatting: Run the linters and formatters to ensure your code adheres to the project's style guide.
- Commit Changes: Use clear and descriptive commit messages. Consider following the Conventional Commits specification.
git add . git commit -m "feat: Add awesome new feature"
- Push Changes: Push your branch to your fork.
git push origin feature/your-feature-name
- Open a Pull Request (PR): Go to the original repository on GitHub and open a Pull Request from your branch to the
mainbranch.- Provide a clear title and description for your PR.
- Link any relevant issues (e.g.,
Closes #123). - Ensure all checks (like CI tests) pass.
- Style: We use Prettier for code formatting and ESLint for linting. Please run
pnpm formatbefore committing your changes. - Types: This project uses TypeScript. Leverage static typing to improve code quality and maintainability.
- Unit Tests: Jest is used for unit testing components and utility functions. Place test files (
*.test.tsor*.test.tsx) alongside the code they test or in relevant__tests__directories. - End-to-End (E2E) Tests: Playwright is used for E2E testing user flows. E2E tests are located in the
tests/directory.
- Ensure your code builds (
pnpm build). - Ensure all linters and formatters pass (
pnpm format). - Ensure all tests pass (
pnpm testandpnpm playwright). - Update the
README.mdor other documentation if your changes affect usage or setup. - Be responsive to feedback and code reviews.
By contributing, you agree that your contributions will be licensed under the GNU General Public License v3.0 that covers the project.