- README.md: Update tech stack versions, simplify content, add links to docs - CONTRIBUTING.md: Add commit guidelines, testing instructions, PR process - SECURITY.md: Add security measures, vulnerability reporting process - PULL_REQUEST_TEMPLATE.md: Add conventional commit types, breaking change section - Remove outdated plan documents (already implemented or superseded) - architecture.md: Already updated with comprehensive system documentation - release-engineering.md: Already updated with current pipeline status
3.6 KiB
3.6 KiB
Contributing Guidelines
Thank you for your interest in contributing to this project! This document provides guidelines and instructions for contributing.
Code of Conduct
Be respectful and constructive. Treat all contributors with courtesy.
Getting Started
Prerequisites
- Node.js 20+
- npm 10+
- Gitleaks (for secret scanning)
Setup
- Fork the repository
- Clone your fork
- Install dependencies:
npm install
cd backend && npm install && cd ..
- Install Gitleaks (for pre-commit hooks):
# macOS
brew install gitleaks
# Linux
curl -sSfL https://github.com/gitleaks/gitleaks/releases/latest/download/gitleaks_linux_x64.tar.gz | tar -xz
sudo mv gitleaks /usr/local/bin/
Development Workflow
Branch Naming
feat/feature-name- New featuresfix/bug-name- Bug fixesdocs/topic- Documentation changesrefactor/component- Code refactoringtest/test-name- Test additions/changes
Commit Guidelines
This project uses Conventional Commits:
<type>(<scope>): <subject>
[optional body]
[optional footer]
Types
| Type | Description | Version Impact |
|---|---|---|
feat |
New feature | Minor |
fix |
Bug fix | Patch |
perf |
Performance improvement | Patch |
revert |
Revert previous commit | Patch |
docs |
Documentation only | None |
style |
Code style (formatting) | None |
refactor |
Code refactoring | None |
test |
Adding/updating tests | None |
build |
Build system changes | None |
ci |
CI/CD changes | None |
chore |
Maintenance tasks | None |
Scopes
| Scope | Description |
|---|---|
admin |
Admin panel components |
api |
Backend API |
ui |
Frontend UI components |
docker |
Docker configuration |
ci |
CI/CD workflows |
deps |
Dependencies |
release |
Release configuration |
auth |
Authentication |
Examples
feat(admin): add export to PDF functionality
fix(api): resolve JWT token expiration issue
docs(readme): update installation instructions
ci(workflow): add staging deployment
Pre-commit Hooks
The project uses Husky for git hooks:
- pre-commit: Runs ESLint and Gitleaks secret scanning
- commit-msg: Validates commit message format with commitlint
Code Style
- ESLint configuration is enforced
- Run
npm run lintbefore committing - Fix issues with
npm run lint -- --fix
Testing
Run tests before submitting:
# Unit tests
npm run test:run
# Integration tests
npm run test:integration
# E2E tests (requires running server)
npm run test:e2e
# All tests with coverage
npm run test:coverage
Pull Request Process
- Create a feature branch from
master - Make your changes following the guidelines above
- Ensure all tests pass
- Ensure lint passes (
npm run lint) - Ensure build succeeds (
npm run build) - Push to your fork and create a pull request
- Fill out the PR template completely
- Wait for review
PR Checklist
- Follows contributing guidelines
- Commit messages follow conventional commits
- Lint passes (
npm run lint) - Tests pass (
npm run test:run) - Build succeeds (
npm run build) - Documentation updated if needed
Release Process
Releases are automated via semantic-release:
- Merge PR to
master - CI runs tests and build
- semantic-release analyzes commits
- Version bumped, changelog updated
- Git tag and release created
No manual release steps required.
Questions?
Open an issue for questions or discussions about contributions.