# nandoi/bulsu-ecash architecture

> Architecture diagram of the GitHub repository nandoi/bulsu-ecash, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nandoi/bulsu-ecash
- Repository: https://github.com/nandoi/bulsu-ecash

## Overview

BulSU eCash is presented as a centralized campus payment system. The sampled runnable workflow creates a student wallet and account, stores the account, looks it up, and authenticates it by ID and PIN. The tree and source index also identify cards, stores, user roles, wallets, and top-up, cash-out, and purchase transaction components. Those broader payment capabilities are represented, but their runtime behavior is not shown in the excerpts; links based only on indexed references are limited to the named dependencies.

Main entry points: [`src/Main.java`](https://github.com/nandoi/bulsu-ecash/blob/main/src/Main.java) (Demo workflow), [`src/entities/transaction/Transaction.java`](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/transaction/Transaction.java) (Payment transaction), [`src/entities/wallet/StudentWallet.java`](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/wallet/StudentWallet.java) (Student wallet), [`src/entities/transaction/CashOut.java`](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/transaction/CashOut.java) (Cash-out)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Accounts and access"]
  node_main["Demo workflow<br/>[Main.java]"]
  node_auth["Authorization<br/>[Authorization.java]"]
  node_account["Account<br/>[Account.java]"]
  node_account_status["Account status<br/>[AccountStatus.java]"]
end

subgraph group_people["Users and campus"]
  node_user["User<br/>[User.java]"]
  node_student["Student<br/>[Student.java]"]
  node_cashier["Cashier<br/>[Cashier.java]"]
  node_vendor["Vendor<br/>[Vendor.java]"]
  node_store["Store<br/>[Store.java]"]
  node_card["Payment card<br/>[Card.java]"]
  node_card_status["Card status<br/>[CardStatus.java]"]
end

subgraph group_funds["Wallets and transactions"]
  node_wallet["Wallet<br/>[Wallet.java]"]
  node_student_wallet["Student wallet<br/>[StudentWallet.java]"]
  node_store_wallet["Store wallet<br/>[StoreWallet.java]"]
  node_topup["Top-up<br/>[TopUp.java]"]
  node_cashout["Cash-out<br/>[CashOut.java]"]
  node_payment["Payment transaction<br/>[Transaction.java]"]
  node_record["Transaction record"]
  node_transaction_status["Transaction status"]
  node_wallet_status["Wallet status<br/>[WalletStatus.java]"]
end

subgraph group_state["Statuses and storage"]
  node_datastore[("Account store<br/>[DataStore.java]")]
end

node_runner(("Application runner"))

node_runner -->|"starts"| node_main
node_main -->|"creates"| node_student_wallet
node_main -->|"creates"| node_student
node_main -->|"creates"| node_account
node_main -->|"adds and finds"| node_datastore
node_main -->|"requests login"| node_auth
node_auth -->|"finds account"| node_datastore
node_auth -->|"checks credentials"| node_account
node_account -->|"associates"| node_user
node_account -->|"uses"| node_account_status
node_student -->|"extends"| node_user
node_student -->|"holds"| node_student_wallet
node_cashier -->|"extends"| node_user
node_vendor -->|"extends"| node_user
node_vendor -->|"holds"| node_store
node_store -->|"uses"| node_store_wallet
node_card -->|"associates"| node_student
node_card -->|"uses"| node_card_status
node_student_wallet -->|"extends"| node_wallet
node_store_wallet -->|"extends"| node_wallet
node_wallet -->|"uses"| node_wallet_status
node_topup -->|"references"| node_cashier
node_topup -->|"references"| node_student_wallet
node_topup -->|"references"| node_record
node_cashout -->|"references"| node_cashier
node_cashout -->|"references"| node_vendor
node_cashout -->|"references"| node_store_wallet
node_cashout -->|"references"| node_record
node_payment -->|"references"| node_card
node_payment -->|"references"| node_vendor
node_payment -->|"references"| node_student_wallet
node_payment -->|"references"| node_store_wallet
node_payment -->|"references"| node_record
node_record -->|"uses"| node_transaction_status

click node_main "https://github.com/nandoi/bulsu-ecash/blob/main/src/Main.java"
click node_auth "https://github.com/nandoi/bulsu-ecash/blob/main/src/services/Authorization.java"
click node_account "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/Account.java"
click node_account_status "https://github.com/nandoi/bulsu-ecash/blob/main/src/enums/AccountStatus.java"
click node_user "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/user/User.java"
click node_student "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/user/Student.java"
click node_cashier "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/user/Cashier.java"
click node_vendor "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/user/Vendor.java"
click node_store "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/Store.java"
click node_card "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/Card.java"
click node_card_status "https://github.com/nandoi/bulsu-ecash/blob/main/src/enums/CardStatus.java"
click node_wallet "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/wallet/Wallet.java"
click node_student_wallet "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/wallet/StudentWallet.java"
click node_store_wallet "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/wallet/StoreWallet.java"
click node_topup "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/transaction/TopUp.java"
click node_cashout "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/transaction/CashOut.java"
click node_payment "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/transaction/Transaction.java"
click node_record "https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/transaction/TransactionRecord.java"
click node_transaction_status "https://github.com/nandoi/bulsu-ecash/blob/main/src/enums/TransactionStatus.java"
click node_wallet_status "https://github.com/nandoi/bulsu-ecash/blob/main/src/enums/WalletStatus.java"
click node_datastore "https://github.com/nandoi/bulsu-ecash/blob/main/src/datas/DataStore.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_auth,node_account,node_account_status toneBlue
class node_user,node_student,node_cashier,node_vendor,node_store,node_card,node_card_status toneAmber
class node_wallet,node_student_wallet,node_store_wallet,node_topup,node_cashout,node_payment,node_record,node_transaction_status,node_wallet_status toneMint
class node_datastore toneRose
class node_runner toneIndigo
```

## Components

### Accounts and access

- [Demo workflow](https://github.com/nandoi/bulsu-ecash/blob/main/src/Main.java): `src/Main.java`
- [Authorization](https://github.com/nandoi/bulsu-ecash/blob/main/src/services/Authorization.java): `src/services/Authorization.java`
- [Account](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/Account.java): `src/entities/Account.java`
- [Account status](https://github.com/nandoi/bulsu-ecash/blob/main/src/enums/AccountStatus.java): `src/enums/AccountStatus.java`

### Users and campus

- [User](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/user/User.java): `src/entities/user/User.java`
- [Student](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/user/Student.java): `src/entities/user/Student.java`
- [Cashier](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/user/Cashier.java): `src/entities/user/Cashier.java`
- [Vendor](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/user/Vendor.java): `src/entities/user/Vendor.java`
- [Store](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/Store.java): `src/entities/Store.java`
- [Payment card](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/Card.java): `src/entities/Card.java`
- [Card status](https://github.com/nandoi/bulsu-ecash/blob/main/src/enums/CardStatus.java): `src/enums/CardStatus.java`

### Wallets and transactions

- [Wallet](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/wallet/Wallet.java): `src/entities/wallet/Wallet.java`
- [Student wallet](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/wallet/StudentWallet.java): `src/entities/wallet/StudentWallet.java`
- [Store wallet](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/wallet/StoreWallet.java): `src/entities/wallet/StoreWallet.java`
- [Top-up](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/transaction/TopUp.java): `src/entities/transaction/TopUp.java`
- [Cash-out](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/transaction/CashOut.java): `src/entities/transaction/CashOut.java`
- [Payment transaction](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/transaction/Transaction.java): `src/entities/transaction/Transaction.java`
- [Transaction record](https://github.com/nandoi/bulsu-ecash/blob/main/src/entities/transaction/TransactionRecord.java): `src/entities/transaction/TransactionRecord.java`
- [Transaction status](https://github.com/nandoi/bulsu-ecash/blob/main/src/enums/TransactionStatus.java): `src/enums/TransactionStatus.java`
- [Wallet status](https://github.com/nandoi/bulsu-ecash/blob/main/src/enums/WalletStatus.java): `src/enums/WalletStatus.java`

### Statuses and storage

- [Account store](https://github.com/nandoi/bulsu-ecash/blob/main/src/datas/DataStore.java): `src/datas/DataStore.java`

### Other components

- **Application runner**

## Connections

- Application runner → Demo workflow: starts (evidence: `README.md`)
- Demo workflow → Student wallet: creates (evidence: `src/Main.java`)
- Demo workflow → Student: creates (evidence: `src/Main.java`)
- Demo workflow → Account: creates (evidence: `src/Main.java`)
- Demo workflow → Account store: adds and finds (evidence: `src/Main.java`)
- Demo workflow → Authorization: requests login (evidence: `src/Main.java`)
- Authorization → Account store: finds account (evidence: `src/services/Authorization.java`)
- Authorization → Account: checks credentials (evidence: `src/services/Authorization.java`)
- Account → User: associates (evidence: `src/entities/Account.java`)
- Account → Account status: uses (evidence: `src/entities/Account.java`)
- Student → User: extends (evidence: `src/entities/user/Student.java`)
- Student → Student wallet: holds (evidence: `src/entities/user/Student.java`)
- Cashier → User: extends (evidence: `src/entities/user/Cashier.java`)
- Vendor → User: extends (evidence: `src/entities/user/Vendor.java`)
- Vendor → Store: holds (evidence: `src/entities/user/Vendor.java`)
- Store → Store wallet: uses (evidence: `src/entities/Store.java`)
- Payment card → Student: associates (evidence: `src/entities/Card.java`)
- Payment card → Card status: uses (evidence: `src/entities/Card.java`)
- Student wallet → Wallet: extends (evidence: `src/entities/wallet/StudentWallet.java`)
- Store wallet → Wallet: extends (evidence: `src/entities/wallet/StoreWallet.java`)
- Wallet → Wallet status: uses (evidence: `src/entities/wallet/Wallet.java`)
- Top-up → Cashier: references (evidence: `src/entities/transaction/TopUp.java`)
- Top-up → Student wallet: references (evidence: `src/entities/transaction/TopUp.java`)
- Top-up → Transaction record: references (evidence: `src/entities/transaction/TopUp.java`)
- Cash-out → Cashier: references (evidence: `src/entities/transaction/CashOut.java`)
- Cash-out → Vendor: references (evidence: `src/entities/transaction/CashOut.java`)
- Cash-out → Store wallet: references (evidence: `src/entities/transaction/CashOut.java`)
- Cash-out → Transaction record: references (evidence: `src/entities/transaction/CashOut.java`)
- Payment transaction → Payment card: references (evidence: `src/entities/transaction/Transaction.java`)
- Payment transaction → Vendor: references (evidence: `src/entities/transaction/Transaction.java`)
- Payment transaction → Student wallet: references (evidence: `src/entities/transaction/Transaction.java`)
- Payment transaction → Store wallet: references (evidence: `src/entities/transaction/Transaction.java`)
- Payment transaction → Transaction record: references (evidence: `src/entities/transaction/Transaction.java`)
- Transaction record → Transaction status: uses (evidence: `src/entities/transaction/TransactionRecord.java`)
