Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
75a527c
[orchestrator] Add CONVENTIONS.md with shared standards
devin-ai-integration[bot] Mar 28, 2026
f078433
[unit-tests] Add Jest test infrastructure and comprehensive unit test…
devin-ai-integration[bot] Mar 28, 2026
f77aa8d
[e2e-tests] Add E2E test infrastructure, integration tests, Playwrigh…
devin-ai-integration[bot] Mar 28, 2026
9ddc826
[service-infra] Add database integration, containerization, CI/CD, ob…
devin-ai-integration[bot] Mar 28, 2026
2673a97
[app-core] Implement JWT auth, input validation, security hardening, …
devin-ai-integration[bot] Mar 28, 2026
f7ab3cb
[e2e-tests] Fix docker-compose healthcheck and CI artifact paths
devin-ai-integration[bot] Mar 28, 2026
4a10f7d
[service-infra] Fix dockerignore, k8s image refs, ingress rewrite, pr…
devin-ai-integration[bot] Mar 28, 2026
1980e33
[orchestrator] Merge app-core into productionize - resolve conflicts …
devin-ai-integration[bot] Mar 28, 2026
a911517
[orchestrator] Merge unit-tests into productionize - resolve conflict…
devin-ai-integration[bot] Mar 28, 2026
cb0bae8
[orchestrator] Merge e2e-tests into productionize - add E2E/integrati…
devin-ai-integration[bot] Mar 28, 2026
a95c3f6
[orchestrator] Add final documentation - README, ARCHITECTURE, DEPLOY…
devin-ai-integration[bot] Mar 28, 2026
ba53196
[orchestrator] Fix uuid ESM incompatibility and update unit tests for…
devin-ai-integration[bot] Mar 28, 2026
4ddfcc7
[orchestrator] Fix integration tests for auth-protected API
devin-ai-integration[bot] Mar 28, 2026
6506a0a
[orchestrator] Fix smoke tests and E2E tests for auth-protected API
devin-ai-integration[bot] Mar 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
node_modules/
.git/
.github/
.husky/
.env
.env.local
.env.*.local
*.log
*.md
!README.md
k8s/
tests/
coverage/
.DS_Store
34 changes: 34 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Backend Configuration
# All environment variables use the TODO_APP_ prefix per CONVENTIONS.md

# Application
TODO_APP_PORT=3000
TODO_APP_NODE_ENV=development
TODO_APP_CORS_ORIGIN=http://localhost:8080
TODO_APP_FRONTEND_PORT=8080

# JWT Authentication
TODO_APP_JWT_SECRET=change-me-in-production-use-a-long-random-string
TODO_APP_JWT_EXPIRY=15m
TODO_APP_REFRESH_TOKEN_EXPIRY=7d

# Database (PostgreSQL)
TODO_APP_DB_HOST=localhost
TODO_APP_DB_PORT=5432
TODO_APP_DB_NAME=todo_app
TODO_APP_DB_USER=todo_user
TODO_APP_DB_PASSWORD=changeme
TODO_APP_DB_POOL_MAX=20
TODO_APP_DB_POOL_IDLE_TIMEOUT=30000
TODO_APP_DB_POOL_CONN_TIMEOUT=5000

# Redis
TODO_APP_REDIS_URL=redis://localhost:6379
TODO_APP_REDIS_PORT=6379

# Logging
TODO_APP_LOG_LEVEL=info

# Rate Limiting
TODO_APP_RATE_LIMIT_WINDOW_MS=900000
TODO_APP_RATE_LIMIT_MAX=100
90 changes: 90 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: CD

on:
push:
branches: [main]

env:
REGISTRY: ghcr.io
BACKEND_IMAGE: ghcr.io/${{ github.repository }}/backend
FRONTEND_IMAGE: ghcr.io/${{ github.repository }}/frontend

jobs:
build-and-push:
name: Build and Push Images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push backend
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.backend
push: true
tags: |
${{ env.BACKEND_IMAGE }}:${{ github.sha }}
${{ env.BACKEND_IMAGE }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build and push frontend
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.frontend
push: true
tags: |
${{ env.FRONTEND_IMAGE }}:${{ github.sha }}
${{ env.FRONTEND_IMAGE }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max

deploy-staging:
name: Deploy to Staging
runs-on: ubuntu-latest
needs: build-and-push
environment: staging
steps:
- uses: actions/checkout@v4

- name: Deploy to staging
run: |
echo "Deploying to staging environment..."
echo "Backend image: ${{ env.BACKEND_IMAGE }}:${{ github.sha }}"
echo "Frontend image: ${{ env.FRONTEND_IMAGE }}:${{ github.sha }}"
# Replace with actual deployment commands (kubectl apply, helm upgrade, etc.)
# kubectl set image deployment/todo-backend backend=${{ env.BACKEND_IMAGE }}:${{ github.sha }}
# kubectl set image deployment/todo-frontend frontend=${{ env.FRONTEND_IMAGE }}:${{ github.sha }}

deploy-production:
name: Deploy to Production
runs-on: ubuntu-latest
needs: deploy-staging
environment:
name: production
# Requires manual approval via GitHub environment protection rules
steps:
- uses: actions/checkout@v4

- name: Deploy to production
run: |
echo "Deploying to production environment..."
echo "Backend image: ${{ env.BACKEND_IMAGE }}:${{ github.sha }}"
echo "Frontend image: ${{ env.FRONTEND_IMAGE }}:${{ github.sha }}"
# Replace with actual deployment commands
# kubectl set image deployment/todo-backend backend=${{ env.BACKEND_IMAGE }}:${{ github.sha }} --namespace=production
# kubectl set image deployment/todo-frontend frontend=${{ env.FRONTEND_IMAGE }}:${{ github.sha }} --namespace=production
121 changes: 121 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: CI

on:
push:
branches: [main, productionize, 'productionize/**']
pull_request:
branches: [main, productionize]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: backend/package-lock.json

- name: Install dependencies
working-directory: backend
run: npm ci

- name: Run lint
working-directory: backend
run: npm run lint

test:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_DB: todo_app_test
POSTGRES_USER: todo_user
POSTGRES_PASSWORD: todo_password
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U todo_user -d todo_app_test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: backend/package-lock.json

- name: Install dependencies
working-directory: backend
run: npm ci

- name: Run migrations
working-directory: backend
env:
TODO_APP_DB_HOST: localhost
TODO_APP_DB_PORT: 5432
TODO_APP_DB_NAME: todo_app_test
TODO_APP_DB_USER: todo_user
TODO_APP_DB_PASSWORD: todo_password
run: npm run migrate

- name: Run tests
working-directory: backend
env:
TODO_APP_DB_HOST: localhost
TODO_APP_DB_PORT: 5432
TODO_APP_DB_NAME: todo_app_test
TODO_APP_DB_USER: todo_user
TODO_APP_DB_PASSWORD: todo_password
TODO_APP_NODE_ENV: test
run: npm test

build-backend:
name: Build Backend Image
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build backend image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.backend
push: false
tags: todo-backend:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max

build-frontend:
name: Build Frontend Image
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build frontend image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.frontend
push: false
tags: todo-frontend:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
133 changes: 133 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: E2E & Integration Tests

on:
push:
branches: [productionize, 'productionize/**', 'devin/**']
pull_request:
branches: [productionize]

jobs:
integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install backend dependencies
run: cd backend && npm ci

- name: Install test dependencies
run: npm ci

- name: Run integration tests
run: npm run test:integration

- name: Upload integration test results
if: always()
uses: actions/upload-artifact@v4
with:
name: integration-test-results
path: test-results/integration-results.xml
retention-days: 14

e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
needs: integration-tests
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install backend dependencies
run: cd backend && npm ci

- name: Install test dependencies
run: npm ci

- name: Install Playwright browsers
run: npx playwright install --with-deps chromium

- name: Start backend server
run: cd backend && node server.js &
env:
TODO_APP_PORT: 3000

- name: Start frontend server
run: cd frontend && python3 -m http.server 8080 &

- name: Wait for services to be ready
run: |
echo "Waiting for backend..."
for i in $(seq 1 30); do
curl -sf http://localhost:3000/health && break
sleep 1
done
echo "Waiting for frontend..."
for i in $(seq 1 30); do
curl -sf http://localhost:8080/ && break
sleep 1
done
echo "Services are ready"

- name: Run E2E tests
run: npm run test:e2e
env:
TODO_APP_FRONTEND_URL: http://localhost:8080
TODO_APP_BACKEND_URL: http://localhost:3000

- name: Upload E2E test results
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-test-results
path: |
test-results/e2e-results.xml
playwright-report/
retention-days: 14

- name: Upload Playwright traces
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-traces
path: playwright-report/
retention-days: 7

smoke-tests:
name: Smoke Tests
runs-on: ubuntu-latest
needs: integration-tests
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install backend dependencies
run: cd backend && npm ci

- name: Start backend server
run: cd backend && node server.js &
env:
TODO_APP_PORT: 3000

- name: Wait for backend to be ready
run: |
for i in $(seq 1 30); do
curl -sf http://localhost:3000/health && break
sleep 1
done

- name: Run smoke tests
run: bash tests/smoke/smoke-test.sh http://localhost:3000
Loading
Loading