Skip to content

System Overview

PR Readiness Coach architecture showing clients, Amplify, Cognito, API Gateway, Lambda, Bedrock, and DynamoDB

Entrypoints share one TypeScript core under src/core/ so local demos, CI comments, IDE hooks, and the UI stay comparable — same prompts, heuristics, and report schema.

PieceRole
CLI (pr-ready)Local analysis against git, --path, or remote API
Lambda + API GatewayPOST /analyze for machine clients; Cognito routes for the UI
BedrockDiff Analyst + Risk Reviewer (Nova Lite) and Ship Coach (Claude Haiku 4.5 AU profile)
DynamoDBOptional run history (-c enableDynamo=true), ~30-day TTL
CognitoOwner-only SPA auth — self-sign-up disabled
Amplify HostingSPA zip-deployed after CDK — not Git-connected
ClientCredentialRoutes
GitHub Actions / CLIAPI key (x-api-key)POST /analyze
Amplify SPACognito JWT Authorization: BearerGET /runs, GET /runs/{runId}, POST /ui/analyze

Infrastructure is AWS CDK (TypeScript) — not SAM — targeting ap-southeast-2:

  1. CDK creates API + Lambda + Cognito + DynamoDB + Amplify app/branch (enableAutoBuild: false)
  2. Separate deploy-amplify job / npm run deploy:amplify builds web/ and zip-uploads
  3. GitHub Actions OIDC
    GitHub Actions OIDC assume-role for Deploy — no long-lived AWS access keys in the public product repo.
    on main — no long-lived AWS keys in the product repo

Editable diagram source for this site: docs/pr-readiness-architecture.drawio (SVG/PNG under public/diagrams/).