Scale_of_Wins

Scale of Wins

AI-guided proposal/closing tool for Augusto Digital’s sales motion. Monorepo:

Package What Runs on
packages/frontend Vite + React SPA (react-router, Cognito login via OIDC) S3 + CloudFront
packages/backend Express 5 (TypeScript) + Drizzle ORM AWS Lambda (via @codegenie/serverless-express) behind API Gateway HTTP API
packages/infrastructure AWS CDK v2 (TypeScript)

The original single-file prototype (index.html, scale-of-win-proposal.html) stays at the repo root untouched — it is live at https://scaleofwins.augusto.digital/scale-of-win-proposal via Cloudflare Pages.

Requirements

Local development

make up       # installs deps (in a container), starts postgres + backend + frontend
make logs     # follow backend/frontend logs
make down     # stop everything
make migrate  # run drizzle migrations against the local db
make psql     # psql into the local db

Everything works without auth config; to exercise login locally, copy .env.example to .env and fill in the dev Cognito values from the scale-of-wins-be-dev stack outputs, then make up again. Without them the app runs “open” with a banner.

Schema changes: edit packages/backend/src/db/schema.ts, then npm run db:generate -w packages/backend and commit the new file in packages/backend/drizzle/.

AWS (dev)

Account 057826131059 (Sheffield Software), region us-east-2. Stacks:

Note: Aurora scales to zero in dev — the first request after idle takes ~15s while it resumes.

Deploys

Merges to main deploy automatically via .github/workflows/deploy.yml (GitHub OIDC → the scale-of-wins-gha-deploy role): CDK deploy, migrate Lambda invoke, frontend build with dev stack outputs, S3 sync, CloudFront invalidation.

From the dev machine, make deploy-dev does the CDK part by assuming the same role. Auth for humans is via aws sso login --sso-session sheffield-software.