Thanks for your interest in contributing! Here's how to get started.
- Fork the repository
- Clone your fork:
git clone https://github.com/amina69/PetAd-Backend.git cd PetAd-Backend - Install dependencies:
npm install
- Setup environment:
cp .env.example .env # Edit .env with your values - Start services:
docker-compose up -d npx prisma migrate dev npm run start:dev
feature/add-pagination- New featuresfix/escrow-timeout- Bug fixesdocs/update-readme- Documentationrefactor/auth-service- Code refactoringtest/adoption-e2e- Tests
- Use TypeScript strict mode
- Follow ESLint rules (
npm run lint) - Format code with Prettier (
npm run format) - Keep functions small and focused
- Use dependency injection
- Write meaningful variable names
Follow Conventional Commits:
feat(pets): add search functionality
fix(auth): handle expired tokens
docs(readme): update setup instructions
test(adoption): add unit tests
refactor(escrow): simplify transaction logic- Create a branch from
main - Make your changes
- Run tests:
npm test - Lint code:
npm run lint - Commit following conventional commits
- Push to your fork
- Open a PR to
mainbranch - Link related issue
- Example: Closes #12
Fill out the PR template completely
- Tests pass
- Code linted
- Documentation updated (if needed)
- Follows code style guidelines
npm test # Run tests
npm run test:cov # Coverage report
npm run test:e2e # E2E testsMinimum coverage: 80% for new code
- Use issue templates
- Provide clear reproduction steps
- Include environment details
Happy coding! πΎ