Browsable HTML view of the traceability map linking every legacy source file to the modernization modules it supports. Derived directly from the deployed source-of-truth repo.
cobol-batch, python-flask, template, container, data) describe the source role.CARD-DEMO/legacy/carddemo-account-flask/ unless prefixed with another root shown in the row.CARD-DEMO/docs/module-file-map.md; this HTML view is kept in sync but may present fewer cross-cutting rows than the Markdown.
account-listing| Layer | File | Role |
|---|---|---|
| cobol-batch | app/cobol/CBACT01C.cbl | Sequential account reader; emits ACCT01|... lines when CB_STREAM=1. |
| cobol-copybook | app/cobol/CVACT01Y.cpy | ACCOUNT-RECORD layout (300 bytes). |
| python-flask | app/bridge.py | get_all_accounts / get_account parse the CBACT01C stream. |
| python-flask | app/app.py | account_list() route (GET /). |
| template | app/templates/accounts.html | 9-column account table linking to detail and update. |
| template | app/templates/base.html | Shared CICS/BMS chrome used by every template. |
| data | legacy/aws-mainframe-modernization-carddemo/app/data/ASCII/acctdata.txt | Source data read by CBACT01C. |
account-details| Layer | File | Role |
|---|---|---|
| cobol-batch | app/cobol/CBACT01C.cbl | Reader for the single account record. |
| cobol-batch | app/cobol/CBACT02C.cbl | Card reader emitting CARD01|... lines. |
| cobol-batch | app/cobol/CBACT03C.cbl | Xref reader emitting XREF03|... lines. |
| cobol-batch | app/cobol/CBCUS01C.cbl | Customer reader emitting CUST01|... lines. |
| cobol-copybook | app/cobol/CVACT01Y.cpy | Account layout (300 bytes). |
| cobol-copybook | app/cobol/CVACT02Y.cpy | Card layout (150 bytes). |
| cobol-copybook | app/cobol/CVACT03Y.cpy | Xref layout (50 bytes). |
| cobol-copybook | app/cobol/CVCUS01Y.cpy | Customer layout (500 bytes). |
| python-flask | app/bridge.py | get_account, get_cards_for_account, get_customer_for_account, xref_distinct_cust_ids_for_account, xref_cust_ambiguity_message. |
| python-flask | app/app.py | account_detail() route (GET /account/<acct_id>). |
| template | app/templates/account_detail.html | Account + customer + cards detail screen. |
| template | app/templates/404.html | Friendly "account not found" view. |
| data | legacy/aws-mainframe-modernization-carddemo/app/data/ASCII/acctdata.txt | Account data. |
| data | legacy/aws-mainframe-modernization-carddemo/app/data/ASCII/carddata.txt | Card data. |
| data | legacy/aws-mainframe-modernization-carddemo/app/data/ASCII/cardxref.txt | Xref data. |
| data | legacy/aws-mainframe-modernization-carddemo/app/data/ASCII/custdata.txt | Customer data. |
account-update| Layer | File | Role |
|---|---|---|
| cobol-batch | app/cobol/CACTUPC.cbl | Account update with validation (rc=0/1/2/3). |
| cobol-copybook | app/cobol/CVACT01Y.cpy | Account layout used by CACTUPC. |
| python-flask | app/bridge.py | update_account, update_account_zip, _cobol_machine_err_code, _cobol_validation_message, _CACTUPC_ERR_HINTS_ES. |
| python-flask | app/app.py | account_update() route (GET|POST /account/<acct_id>/update), _account_form_unchanged, _caup_customer_ui_parts, _caup_ssn_from_form, _caup_phone15_from_form, _money_eq_cobol. |
| template | app/templates/account_update.html | CAUP form (account + customer) with SSN / phone segmentation. |
| python-smoke | app/smoke_cactupc.py | Round-trip ZIP update through update_account (rc=0 expected). |
| python-smoke | app/smoke_cactupc_dates.py | Exercises DATE_CAL and DATE_ORDER validation codes. |
| data | legacy/aws-mainframe-modernization-carddemo/app/data/ASCII/acctdata.txt | Rewritten by CACTUPC after each successful update. |
customer-management| Layer | File | Role |
|---|---|---|
| cobol-batch | app/cobol/CCUSTUPC.cbl | Customer update with the full validation set from CUSVALUS.cpy. |
| cobol-batch | app/cobol/CBCUS01C.cbl | Customer file reader used for prefill and lookups. |
| cobol-copybook | app/cobol/CVCUS01Y.cpy | CUSTOMER-RECORD layout. |
| cobol-copybook | app/cobol/CUSVALUS.cpy | US validation tables (NANP area codes, state list, state+ZIP combos). |
| python-flask | app/bridge.py | get_all_customers, get_customer_by_id, update_customer, _CCUSTUPC_ERR_HINTS_ES. |
| python-flask | app/app.py | Customer portion of account_update(), _customer_form_unchanged, SSN / phone helpers. |
| python-flask | app/mocks.py | Legacy mock customer personas (not imported at runtime today). |
| template | app/templates/account_update.html | Customer section of the CAUP form. |
| python-smoke | app/smoke_ccustupc.py | Round-trip customer update with the first 500-byte record. |
| python-script | scripts/fix_custdata_for_ccustupc.py | Offline helper that aligns custdata.txt bytes with stricter CCUSTUPC rules. |
| python-script | scripts/gen_cusvalus_cpy.py | Regenerates CUSVALUS.cpy from the upstream copybook. |
| data | legacy/aws-mainframe-modernization-carddemo/app/data/ASCII/custdata.txt | Customer data rewritten by CCUSTUPC. |
card-crossref| Layer | File | Role |
|---|---|---|
| cobol-batch | app/cobol/CBACT03C.cbl | Xref reader (50-byte records) emitting XREF03|card|cust|acct. |
| cobol-copybook | app/cobol/CVACT03Y.cpy | CARD-XREF-RECORD layout. |
| python-flask | app/bridge.py | get_all_crossref, xref_distinct_cust_ids_for_account. |
| python-flask | app/app.py | cross_reference() route (GET /crossref). |
| template | app/templates/crossref.html | Plain xref table. |
| data | legacy/aws-mainframe-modernization-carddemo/app/data/ASCII/cardxref.txt | Xref data. |
| Layer | File | Role |
|---|---|---|
| container | app/Dockerfile | Python 3.11-slim base, installs GnuCOBOL, compiles all six COBOL programs, installs Flask + Gunicorn, copies Flask sources and templates, default env + Gunicorn CMD + container health check. |
| container | app/docker-compose.yml | Bind-mounts ASCII data files, exposes port 5000, sets BRIDGE_DEBUG_UI=1 for the demo, container health check via /health. |
| config | app/requirements.txt | flask>=3,<4, gunicorn>=21,<22. |
| config | app/.dockerignore | Docker build hygiene. |
| config | .gitignore | Top-level ignore patterns. |
| python-flask | app/bridge.py | COBOL subprocess orchestration, stream parsing, overpunch decoding, error marker protocol, debug log buffer, CobolBridgeError. |
| python-flask | app/app.py | Flask routes, error handlers (404, CobolBridgeError), CICS-style context processor, ibm_money template filter. |
| template | app/templates/bridge_log.html | Debug-only view of recent COBOL subprocess events. |
| docs | CARD-DEMO/docs/system-overview.md | Canonical architecture + modernization contract (Markdown source of truth). |
| docs | CARD-DEMO/docs/site/ | Human-facing HTML doc site published by cd-pipeline-card-demo.yml. |
| docs | CARD-DEMO/modern/frontend/ | React + Vite scaffold. Left neutral so every demo run can regenerate the modernized UI from the template. |