Repository navigation
Add backend foundation: CDK stacks and shared layer - #5
Merged
Merged
Conversation
Both halves of the API need the same tables, Cognito pool, HTTP API and shared helpers. Domain constructs plug in with one line each in ApiStack so teammates do not edit the same code. Nothing is deployed yet.
|
👋 Quick PR hygiene check (nothing is blocked):
Small PRs with short, clear descriptions are what judges and recruiters read. See |
This was referenced Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds the
backend/CDK app (TypeScript) and the shared Python layer:DataStack: four DynamoDB tables from architecture.md section 6 (on-demand, PITR, AWS-managed encryption, RETAIN, GSIs, TTL).AuthStack: invite-only Cognito pool, TOTP MFA (REQUIRED by default,staffMfacontext), groupscic_admin,instructor,reviewer.ApiStack: HTTP API under/v1, CORS allowlist, default throttling, access log without IPs, Cognito JWT authorizer, publicGET /v1/health.lib/domains/context.ts: each API domain is its own construct and takes one line inApiStack, so two people can add endpoints without merge conflicts.cicshared layer:create_responsewith an origin allowlist, error mapping (generic 500s), route-key dispatch, authz helpers (class membership, reviewer never sees class data), PII-redacting logger, DynamoDB helpers.Nothing is deployed. Stack names start with
CicCurriculumbecause the shared AWS account already has other stacks.Why
Both halves of api.md need the same tables, pool, API and helpers.
How to test
cd backend && npm install && npm test && npm run test:py && npx tsc --noEmitVersions: TypeScript is pinned to 5.9 because ts-jest does not yet allow TypeScript 7.
package-lock.jsonis about 5,000 lines of the diff; the real change is about 900 lines.