Files
pos-system/CONTRIBUTING.md
Ho Ngoc Hai 4da46b5b8e Sure! Pl
2025-12-27 01:31:10 +07:00

2.0 KiB

Contributing Guide

Thank you for considering contributing to GoodGo Microservices Platform!

Development Workflow

Branch Strategy

We follow Git Flow:

  • main - Production-ready code
  • develop - Integration branch for features
  • feature/* - New features
  • bugfix/* - Bug fixes
  • hotfix/* - Critical production fixes

Commit Convention

We use Conventional Commits:

feat: add login endpoint
fix: resolve token expiration issue
docs: update API documentation
refactor: restructure auth module
test: add unit tests for auth service
chore: update dependencies
ci: add GitHub Actions workflow
perf: optimize database queries

Pull Request Process

  1. Create feature branch from develop
  2. Implement changes with tests
  3. Run linter and tests locally
  4. Push and create PR
  5. CI/CD will auto-run checks
  6. Code review required
  7. Merge into develop (auto-deploy to staging)
  8. QA testing on staging
  9. Merge into main (manual deploy to production)

Code Standards

  • TypeScript: Strict mode enabled
  • Linting: ESLint with shared config
  • Formatting: Prettier
  • Testing: Minimum 80% coverage
  • Documentation: JSDoc for public APIs

Running Tests

# All tests
pnpm test

# Specific package
pnpm --filter @goodgo/auth-service test

# With coverage
pnpm --filter @goodgo/auth-service test:coverage

Code Review Checklist

  • Code follows style guidelines
  • Tests added/updated
  • Documentation updated
  • No console.logs or debug code
  • Environment variables documented
  • Breaking changes documented

Adding a New Service

  1. Copy services/_template to services/new-service
  2. Update package.json name and dependencies
  3. Implement service logic
  4. Add tests
  5. Update documentation
  6. Create CI/CD workflow

Adding a New Package

  1. Create package in packages/new-package
  2. Add to workspace
  3. Export from index.ts
  4. Add tests
  5. Document usage

Questions?

Feel free to open an issue or contact the team.