feat: Add job history tracking with re-download capability and full-stack local deployment#11
Closed
AWS-fpenland wants to merge 43 commits intoASUCICREPO:mainfrom
Closed
feat: Add job history tracking with re-download capability and full-stack local deployment#11AWS-fpenland wants to merge 43 commits intoASUCICREPO:mainfrom
AWS-fpenland wants to merge 43 commits intoASUCICREPO:mainfrom
Conversation
Replace Math.random() with context parameter to prevent domain recreation on every deploy. Pass COGNITO_DOMAIN_PREFIX context for existing deployments.
- Requirements: job tracking, history retrieval, re-download, access control, UI - Design: DynamoDB table, single Lambda with method routing, tab-based UI - Tasks: 6 task groups covering CDK, Lambda, frontend, deploy scripts
- DynamoDB table: PDFAccessibility-JobHistory (PK=user_sub, SK=created_at) - Lambda: single function handling POST/GET/PUT via HTTP method routing - API Gateway: /jobs resource with Cognito authorizer on existing API - Amplify env var: REACT_APP_JOB_HISTORY_API - CfnOutput: JobHistoryEndpoint
- JobHistory.jsx: MUI table with status chips, format badges, download - MainApp.js: tab navigation (New Remediation / My Documents) - UploadSection.jsx: create job record after S3 upload - ProcessingContainer.jsx: update job status on complete/timeout - constants.jsx: add JobHistoryAPI constant
- Use ref instead of state for pageCount (state not flushed before handleUpload reads it synchronously) - Fix falsy check: page_count of 0 was showing as dash
- Create deploy-full-stack-local.sh for end-to-end local deployment - Deploys CDK backend and React frontend without GitHub/CodeBuild - Ideal for local development and rapid iteration - Add comprehensive documentation in FULL_STACK_LOCAL_DEPLOYMENT.md - Add deployment method comparison guide in DEPLOYMENT_COMPARISON.md - Update README with deployment options section - Update structure.md to document new script - Make deploy-amplify-direct.sh executable
CORS was removed from the backend stacks (commits 085349e, 5d22360) so the UI deployment must configure it. Both deploy scripts now set CORS on the PDF processing buckets to allow browser PutObject calls.
Support deploying UI backend (CDK) and frontend (Amplify) from private repositories via CodeBuild with CodeConnections auth. Includes config file support, non-interactive mode, IAM propagation delays, cleanup, and pipeline-helpers library.
feat(deploy): Add private repo deployment script
Only admins can now create user accounts via the AWS Console or AdminCreateUser API. Existing postConfirmation trigger and user verification settings remain for admin-created users.
feat(auth): Disable Cognito self-service signup
Random domain prefix caused UserPoolDomain replacement on every stack update, failing because Cognito cannot create a new domain while the old one exists. Derive prefix from account ID instead.
fix(auth): Make Cognito domain prefix deterministic
Pass SELF_SIGNUP as CDK context through the full chain: deploy scripts → CodeBuild env var → buildspec → CDK context. Defaults to false (admin-only). Both deploy.sh (interactive prompt) and deploy-private.sh (config/env var) supported.
Feature/private ci cd
set userpool domain to false
Math.random() generated a new prefix on every synth, causing CloudFormation to replace the CfnUserPoolDomain on every deploy. Now uses cdk.Names.uniqueId for stability, with optional DOMAIN_PREFIX context override.
The deploy scripts already pass -c SELF_SIGNUP=true|false but the CDK stack was hardcoded to true. Now reads the context variable, defaulting to false when not provided.
CodeBuild webhooks trigger on push and PR merge to the target branch. File path filters scope backend builds to cdk_backend/, buildspec.yml, and lambda/ changes, and frontend builds to pdf_ui/ and buildspec-frontend.yml. CodeCommit is skipped since it lacks webhook support.
Restructure README with Option A (public repo, simple one-time deploy) and Option B (private repo with CI/CD webhooks, non-interactive mode, and cleanup). Includes manual webhook configuration instructions for the AWS Console.
Replaces cdk.Names.uniqueId with this.account so the Cognito domain prefix is stable per account but unique across different AWS accounts.
Covers dependencies, build output, env files, IDE/OS artifacts, Python cache, and temp files. Removes previously tracked .DS_Store files.
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.
Overview
This merge request adds comprehensive job history tracking and introduces a full-stack local deployment workflow for faster development iteration.
Features Added
1. Job History & Re-Download Capability
2. Full-Stack Local Deployment
3. Infrastructure Improvements
Technical Details
Backend Changes:
Frontend Changes:
Deployment:
Testing
Breaking Changes
None. All changes are additive and backward compatible.
Documentation
Related Issues
Addresses the need for: