Update README.md to provide a comprehensive overview of The Order monorepo, including repository structure, quickstart guide, development workflow, and contribution guidelines.
This commit is contained in:
48
.github/CODEOWNERS
vendored
Normal file
48
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# Global owners
|
||||
* @the-order/core-team
|
||||
|
||||
# Apps
|
||||
/apps/portal-public/ @the-order/frontend-team
|
||||
/apps/portal-internal/ @the-order/frontend-team @the-order/admin-team
|
||||
/apps/mcp-members/ @the-order/mcp-team
|
||||
/apps/mcp-legal/ @the-order/mcp-team @the-order/legal-team
|
||||
|
||||
# Services
|
||||
/services/intake/ @the-order/backend-team
|
||||
/services/identity/ @the-order/identity-team @the-order/security-team
|
||||
/services/finance/ @the-order/finance-team @the-order/backend-team
|
||||
/services/dataroom/ @the-order/backend-team @the-order/security-team
|
||||
/services/omnis-brand/ @the-order/omnis-team
|
||||
/services/arromis-brand/ @the-order/arromis-team
|
||||
|
||||
# Packages
|
||||
/packages/ui/ @the-order/frontend-team
|
||||
/packages/schemas/ @the-order/backend-team @the-order/frontend-team
|
||||
/packages/auth/ @the-order/identity-team @the-order/security-team
|
||||
/packages/storage/ @the-order/backend-team
|
||||
/packages/crypto/ @the-order/security-team @the-order/identity-team
|
||||
/packages/workflows/ @the-order/backend-team
|
||||
/packages/test-utils/ @the-order/backend-team
|
||||
|
||||
# Infrastructure
|
||||
/infra/ @the-order/devops-team @the-order/security-team
|
||||
/infra/terraform/ @the-order/devops-team
|
||||
/infra/k8s/ @the-order/devops-team
|
||||
/infra/gateways/ @the-order/devops-team @the-order/security-team
|
||||
|
||||
# Documentation
|
||||
/docs/ @the-order/core-team
|
||||
/docs/governance/ @the-order/core-team @the-order/security-team
|
||||
/docs/architecture/ @the-order/architecture-team
|
||||
/docs/legal/ @the-order/legal-team
|
||||
|
||||
# CI/CD
|
||||
/.github/workflows/ @the-order/devops-team
|
||||
/.github/CODEOWNERS @the-order/core-team
|
||||
|
||||
# Root config files
|
||||
/package.json @the-order/core-team
|
||||
/pnpm-workspace.yaml @the-order/core-team
|
||||
/turbo.json @the-order/core-team
|
||||
/tsconfig*.json @the-order/core-team
|
||||
|
||||
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Create a report to help us improve
|
||||
title: '[BUG] '
|
||||
labels: bug
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## Description
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
## Steps to Reproduce
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
## Expected Behavior
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
## Actual Behavior
|
||||
A clear and concise description of what actually happened.
|
||||
|
||||
## Environment
|
||||
- OS: [e.g. Ubuntu 22.04]
|
||||
- Node.js version: [e.g. 18.17.0]
|
||||
- pnpm version: [e.g. 8.15.0]
|
||||
- Browser (if applicable): [e.g. Chrome 120]
|
||||
|
||||
## Screenshots
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
## Additional Context
|
||||
Add any other context about the problem here.
|
||||
|
||||
## Possible Solution
|
||||
If you have suggestions on how to fix the bug, please describe them here.
|
||||
|
||||
29
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
29
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for this project
|
||||
title: '[FEATURE] '
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## Description
|
||||
A clear and concise description of what the feature is.
|
||||
|
||||
## Problem Statement
|
||||
What problem does this feature solve? What is the use case?
|
||||
|
||||
## Proposed Solution
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
## Alternatives Considered
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
## Additional Context
|
||||
Add any other context, mockups, or screenshots about the feature request here.
|
||||
|
||||
## Implementation Notes
|
||||
If you have ideas on how this could be implemented, please share them here.
|
||||
|
||||
## Related Issues
|
||||
Link to any related issues or discussions.
|
||||
|
||||
38
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
38
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
## Description
|
||||
Brief description of changes
|
||||
|
||||
## Type of Change
|
||||
- [ ] Bug fix
|
||||
- [ ] New feature
|
||||
- [ ] Breaking change
|
||||
- [ ] Documentation update
|
||||
- [ ] Performance improvement
|
||||
- [ ] Refactoring
|
||||
|
||||
## Related Issues
|
||||
Closes #(issue number)
|
||||
|
||||
## Testing
|
||||
How was this tested?
|
||||
|
||||
- [ ] Unit tests added/updated
|
||||
- [ ] Integration tests added/updated
|
||||
- [ ] Manual testing performed
|
||||
|
||||
## Checklist
|
||||
- [ ] Code follows style guidelines
|
||||
- [ ] Self-review completed
|
||||
- [ ] Comments added for complex code
|
||||
- [ ] Documentation updated
|
||||
- [ ] Tests added/updated
|
||||
- [ ] All tests pass
|
||||
- [ ] No new warnings
|
||||
- [ ] Type checking passes
|
||||
- [ ] Linting passes
|
||||
|
||||
## Screenshots (if applicable)
|
||||
<!-- Add screenshots here -->
|
||||
|
||||
## Additional Notes
|
||||
<!-- Any additional information -->
|
||||
|
||||
235
.github/workflows/ci.yml
vendored
Normal file
235
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,235 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, develop]
|
||||
pull_request:
|
||||
branches: [main, develop]
|
||||
|
||||
env:
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
|
||||
jobs:
|
||||
lint-and-typecheck:
|
||||
name: Lint and Type Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
|
||||
- name: Type check
|
||||
run: pnpm type-check
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm test
|
||||
|
||||
- name: Upload coverage
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: ./coverage/lcov.info
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
security-scan:
|
||||
name: Security Scan
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
scan-type: 'fs'
|
||||
scan-ref: '.'
|
||||
format: 'sarif'
|
||||
output: 'trivy-results.sarif'
|
||||
|
||||
- name: Upload Trivy results to GitHub Security
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
|
||||
sbom:
|
||||
name: Generate SBOM
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Install Syft
|
||||
uses: anchore/sbom-action/download-syft@v0
|
||||
with:
|
||||
syft-version: latest
|
||||
|
||||
- name: Generate SBOM
|
||||
run: |
|
||||
syft packages dir:. -o spdx-json > sbom.spdx.json
|
||||
syft packages dir:. -o cyclonedx-json > sbom.cyclonedx.json
|
||||
|
||||
- name: Upload SBOM artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: sbom
|
||||
path: |
|
||||
sbom.spdx.json
|
||||
sbom.cyclonedx.json
|
||||
|
||||
- name: Run Grype scan
|
||||
uses: anchore/scan-action@v3
|
||||
id: grype
|
||||
with:
|
||||
path: "."
|
||||
fail-build: false
|
||||
severity-cutoff: high
|
||||
|
||||
- name: Upload Grype results
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
if: always()
|
||||
with:
|
||||
sarif_file: ${{ steps.grype.outputs.sarif }}
|
||||
|
||||
docker-build:
|
||||
name: Build Docker Images
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
needs: [build]
|
||||
strategy:
|
||||
matrix:
|
||||
service:
|
||||
- intake
|
||||
- identity
|
||||
- finance
|
||||
- dataroom
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}/${{ matrix.service }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=sha
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./services/${{ matrix.service }}
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
- name: Sign image with Cosign
|
||||
uses: sigstore/cosign-installer@v3
|
||||
if: github.ref == 'refs/heads/main'
|
||||
|
||||
- name: Sign container image
|
||||
run: |
|
||||
cosign sign --yes ${{ steps.meta.outputs.tags }}
|
||||
|
||||
71
.github/workflows/release.yml
vendored
Normal file
71
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
env:
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'pnpm'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm test
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Deploy to Staging
|
||||
run: |
|
||||
echo "Deploy to staging environment"
|
||||
# Add deployment steps here
|
||||
|
||||
- name: Wait for approval
|
||||
uses: trstringer/manual-approval@v1
|
||||
with:
|
||||
secret: ${{ github.TOKEN }}
|
||||
approvers: the-order/release-team
|
||||
minimum-approvals: 1
|
||||
|
||||
- name: Deploy to Production
|
||||
if: success()
|
||||
run: |
|
||||
echo "Deploy to production environment"
|
||||
# Add deployment steps here
|
||||
|
||||
Reference in New Issue
Block a user