# altitude80ai/awscarddemo architecture

> Architecture diagram of the GitHub repository altitude80ai/awscarddemo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/altitude80ai/awscarddemo
- Repository: https://github.com/altitude80ai/awscarddemo

## Overview

##### Project Type and Core Architecture
This is a Mainframe-based Credit Card Management System with both online (CICS-based) and batch processing components. The architecture should be represented as a multi-tier mainframe application system.

##### Main Components

a. User Interface Layer:
- BMS (Basic Mapping Support) screens
- Main entry points (CC00, CM00, CA00 transactions)
- Screens by User and Admin functions

b. Application Layer:
- COBOL Programs (divided into Online and Batch)
- Transaction Processing Components
- Security/Authentication Components

c. Data Layer:
- VSAM Files
- File Organizations (KSDS, etc.)
- Data Relationships

**[Top Level]**
**User Access Layer**
- Online Interface (CICS)
- User Functions
- Admin Functions
- Batch Interface (JCL)

**[Middle Level]**
**Application Processing Layer**
- Online Programs
- Transaction Management
- Account Management
- Card Management
- User Management
- Batch Programs
- Transaction Processing
- Interest Calculation
- Statement Generation
- Common Components
- Security Services

**[Bottom Level]**
**Data Storage Layer**
- Master Files
- Customer (CUSTDATA)
- Account (ACCTDATA)
- Card (CARDDATA)
- Transaction Files
- Daily Transactions
- History
- Reference Data
- Security
- Configuration

##### Key Relationships to Highlight
- Flow from CICS transactions through BMS maps to COBOL programs
- Batch job dependencies
- Demonstrate data access patterns
- Security validation flows

##### Additional Technical Details
- Technology annotations:
- COBOL
- CICS
- VSAM
- JCL
- RACF
- File formats (FB, VSAM KSDS)
- Record lengths where significant

##### Processing Flows
- User transaction flow
- Batch processing sequence
- Statement generation process
- Security validation

##### Integration Points
Planned future integration points:
- DB2 interface
- IMS connections
- FTP/SFTP interfaces
- Message queue integration
- Distributed application interfaces

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User Access Layer"
        UI[User Interface]
        CICS[CICS Interface]:::online
        BATCH[Batch Interface]:::batch
        UI --> CICS
        UI --> BATCH
    end

    subgraph "Online Interface"
        BMS[BMS Screens]:::online
        SIGNON["Sign-on Screen"]:::online
        TRANS["Transaction Screens"]:::online
        USERMGT["User Management"]:::online
        
        BMS --> SIGNON
        BMS --> TRANS
        BMS --> USERMGT
    end

    subgraph "Application Processing Layer"
        ONLINE[Online Programs]:::online
        BATCH_PROG[Batch Programs]:::batch
        COMMON[Common Components]:::common
    end

    subgraph "Online Programs"
        TRANS_MGT["Transaction Management"]:::online
        ACCT_MGT["Account Management"]:::online
        CUST_MGT["Customer Management"]:::online
    end

    subgraph "Batch Programs"
        STMT_GEN["Statement Generation"]:::batch
        INT_CALC["Interest Calculation"]:::batch
    end

    subgraph "Data Storage Layer"
        CUST_DATA["Customer Data"]:::data
        ACCT_DATA["Account Data"]:::data
        CARD_DATA["Card Data"]:::data
        TRANS_DATA["Transaction Data"]:::data
    end

    CICS --> BMS
    BMS --> ONLINE
    BATCH --> BATCH_PROG
    ONLINE --> TRANS_MGT
    ONLINE --> ACCT_MGT
    ONLINE --> CUST_MGT
    BATCH_PROG --> STMT_GEN
    BATCH_PROG --> INT_CALC

    TRANS_MGT --> CUST_DATA
    TRANS_MGT --> ACCT_DATA
    TRANS_MGT --> CARD_DATA
    TRANS_MGT --> TRANS_DATA
    
    ACCT_MGT --> ACCT_DATA
    CUST_MGT --> CUST_DATA
    STMT_GEN --> TRANS_DATA
    INT_CALC --> ACCT_DATA

    %% Click events
    click BMS "https://github.com/altitude80ai/awscarddemo/tree/main/code/bms/"
    click SIGNON "https://github.com/altitude80ai/awscarddemo/blob/main/code/bms/COSGN00.bms"
    click TRANS "https://github.com/altitude80ai/awscarddemo/blob/main/code/bms/COTRN00.bms"
    click USERMGT "https://github.com/altitude80ai/awscarddemo/blob/main/code/bms/COUSR00.bms"
    click TRANS_MGT "https://github.com/altitude80ai/awscarddemo/blob/main/code/cbl/CBTRN01C.cbl"
    click ACCT_MGT "https://github.com/altitude80ai/awscarddemo/blob/main/code/cbl/CBACT01C.cbl"
    click CUST_MGT "https://github.com/altitude80ai/awscarddemo/blob/main/code/cbl/CBCUS01C.cbl"
    click STMT_GEN "https://github.com/altitude80ai/awscarddemo/blob/main/code/cbl/CBSTM03A.CBL"
    click INT_CALC "https://github.com/altitude80ai/awscarddemo/blob/main/code/jcl/INTCALC.jcl"
    click CUST_DATA "https://github.com/altitude80ai/awscarddemo/blob/main/code/data/EBCDIC/AWS.M2.CARDDEMO.CUSTDATA.PS"
    click ACCT_DATA "https://github.com/altitude80ai/awscarddemo/blob/main/code/data/EBCDIC/AWS.M2.CARDDEMO.ACCTDATA.PS"
    click CARD_DATA "https://github.com/altitude80ai/awscarddemo/blob/main/code/data/EBCDIC/AWS.M2.CARDDEMO.CARDDATA.PS"
    click TRANS_DATA "https://github.com/altitude80ai/awscarddemo/blob/main/code/data/EBCDIC/AWS.M2.CARDDEMO.DALYTRAN.PS"
    click COMMON "https://github.com/altitude80ai/awscarddemo/tree/main/code/cpy/"

    %% Styling
    classDef online fill:#3498db
    classDef batch fill:#2ecc71
    classDef data fill:#f1c40f
    classDef common fill:#95a5a6

    %% Legend
    subgraph Legend
        L1[Online Components]:::online
        L2[Batch Components]:::batch
        L3[Data Storage]:::data
        L4[Common Components]:::common
    end
```
