Thank you for helping improve PropChain! This guide explains how to contribute issues and pull requests, what we expect from branches and PRs, and how to run tests and lint locally.
If you find a bug or want to request a feature:
- Search existing issues first to avoid duplicates.
- Open a new issue with:
- Clear title
- Description of the problem or enhancement
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Relevant environment, logs, or screenshots
Create branches from main and use a descriptive, consistent branch name:
feature/<ticket-number>-<short-description>bugfix/<ticket-number>-<short-description>fix/<ticket-number>-<short-description>chore/<short-description>
Examples:
feature/123-add-login-rate-limitingbugfix/456-fix-dispute-controller-roleschore/update-prisma-schema
Branch names should be lowercase, use hyphens, and briefly describe the change.
Use the existing repo scripts and conventions:
- Install dependencies:
npm install - Start development mode:
npm run start:dev - Generate Prisma client:
npm run db:generate - Run migrations locally:
npm run migrate - Reset migrations when needed:
npm run migrate:reset
Keep each PR focused on a single issue or feature whenever possible.
Before opening a PR, run the relevant checks:
- Run all tests:
npm test - Run tests in watch mode:
npm run test:watch - Run test coverage:
npm run test:cov - Run lint (must pass with zero warnings):
npm run lint -- --max-warnings=0 - Format code:
npm run format
If your change touches database schema or Prisma models, update the schema and run:
npm run db:generate
npm run migrateWhen you open a PR, please include:
- A descriptive title
- A short summary of the change
- Related issue number(s)
- Testing steps and commands run locally
- Any setup notes such as environment variables or migrations
- Screenshots or API request examples when relevant
A good PR should be:
- Small and focused
- Based on an up-to-date
main - Passing tests and lint checks
- Clear about the problem and the solution
- Link the PR to the related issue when available.
- Keep discussion in the PR thread.
- Address feedback promptly by updating the branch.
- Rebase or merge
mainif needed to resolve conflicts.
This repository uses Husky and lint-staged to enforce code quality on every commit.
When you run git commit, the following checks execute automatically:
- ESLint runs with
--fixon all staged.tsfiles - Prettier formats all staged
.ts,.json, and.mdfiles
If any check fails, the commit is blocked. Fix the issues before committing:
# Check for lint errors manually
npm run lint
# Fix formatting manually
npm run format.husky/pre-commit- Runslint-stagedon commit.lintstagedrc.json- Defines which tools run on which files
This repository uses ESLint and Prettier.
- Follow existing code patterns and module boundaries.
- Keep naming clear and consistent.
- Prefer small, testable changes.
- Avoid commented-out code in production commits.
- If your change involves database migrations, include migration details in the PR.
- If you add or update docs, link them from the PR description.
- Make sure environment variables are not committed.
Thank you for contributing to PropChain!