Repository & Naming Conventions
Repository & Naming Conventions
Git Repository Structure
Repository Name Format:
[company]-[product-name]-[component]
Examples: paymentapp-api paymentapp-web paymentapp-mobile paymentapp-docs paymentapp-devops
Naming Convention: lowercase-with-hyphens
GitHub Folder Structure:
paymentapp-api/
├─ src/ # Source code │├─ controllers/ # API endpoint handlers
││├─ auth.controller.js ││├─ payment.controller.js ││└─ user.controller.js ││ │├─ services/ # Business logic ││├─ auth.service.js ││├─ payment.service.js ││└─ stripe.integration.js ││ │├─ models/ # Data models ││├─ user.model.js ││└─ payment.model.js ││ │├─ middleware/ # Express middleware ││├─ auth.middleware.js ││├─ error.middleware.js ││└─ validation.middleware.js ││ │├─ config/ # Configuration ││├─ database.js ││├─ env.js ││└─ constants.js ││ │├─ utils/ # Utility functions ││├─ logger.js ││├─ encryption.js ││└─ validators.js ││ │└─ app.js # Express app setup │ ├─ tests/ # Test suites │├─ unit/ # Unit tests ││├─ auth.test.js ││└─ payment.test.js ││ │├─ integration/ # Integration tests ││└─ api.test.js ││ │└─ e2e/ # End-to-end tests │ └─ payment-flow.test.js │ ├─ migrations/ # Database migrations │├─ 001_create_users_table.js
│└─ 002_create_payments_table.js │ ├─ docs/ # Documentation │├─ API.md # API specifications
-
│├─ ARCHITECTURE.md # System design
-
│├─ DEPLOYMENT.md # Deployment guide │└─ CONTRIBUTING.md # Dev guide
-
│ ├─ .github/ # GitHub specific │└─ workflows/ │ ├─ ci.yml # CI pipeline │ ├─ deploy.yml # Deployment │ └─ security-scan.yml # Security checks │ ├─ .env.example # Environment template
-
├─ .gitignore # Git ignore rules ├─ Dockerfile # Docker configuration
-
├─ docker-compose.yml # Docker compose ├─ package.json # Node dependencies ├─ package-lock.json ├─ jest.config.js # Jest configuration ├─ .eslintrc.js # ESLint rules ├─ .prettierrc # Prettier formatting ├─ README.md # Project overview └─ LICENSE # License file
Git Branches:
Main branches (protected):
├─ main # Production-ready code │└─ Tag: v1.0.0, v1.0.1, etc. │
- └─ develop # Staging/development
Feature branches (temporary):
-
├─ feature/PAYAPP-US-050-payment-processing
-
├─ feature/PAYAPP-US-051-password-reset
-
├─ bugfix/PAYAPP-BUG-123-login-crash
-
├─ hotfix/PAYAPP-CRITICAL-payment-down
-
└─ chore/PAYAPP-OPS-001-update-dependencies
Naming: [type]/[JIRA-ID]-[short-description] Types: feature, bugfix, hotfix, chore, docs, refactor
Commit Message Format:
[JIRA-ID] Short description (50 characters max)
Longer explanation if needed. Reference the issue:
-
What changed
-
Why it changed
-
How it addresses the issue
Closes PAYAPP-050
Example:
PAYAPP-050: Implement payment processing endpoint
-
Add POST /api/v1/payments/process endpoint
-
Validate payment method and amount
-
Integrate with Stripe API
-
Add error handling for Stripe failures
-
Add unit tests (100% coverage)
-
Add integration tests with test Stripe account