You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The backend provides REST and WebSocket APIs (Lambda + API Gateway) consumed by the React UI (Next.js static export on S3 + CloudFront). Together they handle document upload, processing orchestration, status tracking, and human review.
2. Architecture
Browser → CloudFront → S3 (static site)
│
├─ REST API ──→ API Gateway ──→ Lambda ──→ DynamoDB / S3
│ │
└─ WebSocket ──→ API Gateway ──→ Lambda ──→ DynamoDB (connections)
│
└──→ API Gateway Management API (push)
The bucket uses AWS Key Management Service (KMS) encryption, so pre-signed URLs must use Signature Version 4 (SigV4) for authentication (signature_version='s3v4').
7. Deployment
Deploy everything
cd backend && ./deploy.sh # API Gateway + Lambda + DynamoDBcd ui && ./deploy.sh # Build static site + S3 + CloudFront
Deploy individually
# Backend onlycd backend/infra && npm install && npx cdk deploy
# UI only (after changing code)cd ui && npm run build &&cd infra && npx cdk deploy
8. Configuration
The UI reads API URLs from environment variables baked at build time: