# vonjjustin/adnu-erc-simulation architecture

> Architecture diagram of the GitHub repository vonjjustin/adnu-erc-simulation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vonjjustin/adnu-erc-simulation
- Repository: https://github.com/vonjjustin/adnu-erc-simulation

## Overview

This is a Java simulation of an electronic resources center. The visible workflow is a terminal dashboard showing computer availability and offering menu choices; the principal modeled domain behavior is a computer session that tracks occupancy, time limits, actions, and completion. Renewal and seat-transfer actions delegate to that session. The menu advertises document services, penalties, resource management, and reports, but their routing and implementations are not shown in the excerpts, so those branches are represented without inferred call links.

Main entry points: [`src/sessions/ComputerSession.java`](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/sessions/ComputerSession.java) (Computer session), [`src/app/Dashboard.java`](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/app/Dashboard.java) (Dashboard and menu), [`src/sessions/SessionRenewal.java`](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/sessions/SessionRenewal.java) (Session renewal), [`src/sessions/SeatTransfer.java`](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/sessions/SeatTransfer.java) (Seat transfer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Terminal interface"]
  node_main["Application entry<br/>[Main.java]"]
  node_dashboard["Dashboard and menu<br/>[Dashboard.java]"]
  node_layout["Computer layout"]
end

subgraph group_resources["ERC resources"]
  node_student["Student<br/>[Student.java]"]
  node_computer["Computer<br/>[Computer.java]"]
  node_ercresource["ERC resource<br/>[ERCResource.java]"]
  node_printer["Printer<br/>[Printer.java]"]
end

subgraph group_sessions["Computer sessions"]
  node_computer_session["Computer session"]
  node_session_action["Session action<br/>[SessionAction.java]"]
  node_session_renewal["Session renewal"]
  node_seat_transfer["Seat transfer<br/>[SeatTransfer.java]"]
end

subgraph group_services["Document services"]
  node_document_service["Document service"]
  node_printing_service["Printing service"]
  node_photocopy_service["Photocopy service"]
  node_scanning_service["Scanning service"]
end

subgraph group_transactions["Transactions"]
  node_transaction["Transaction<br/>[Transaction.java]"]
  node_charge["Charge<br/>[Charge.java]"]
  node_paper_purchase["Paper purchase<br/>[PaperPurchase.java]"]
  node_penalty["Penalty<br/>[Penalty.java]"]
end

node_operator(("ERC operator"))

node_dashboard -->|"renders"| node_layout
node_computer_session -->|"executes"| node_session_action
node_session_renewal -->|"renews"| node_computer_session
node_seat_transfer -->|"transfers seat"| node_computer_session

click node_main "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/app/Main.java"
click node_dashboard "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/app/Dashboard.java"
click node_layout "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/app/ComputerLayout"
click node_student "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/resources/Student.java"
click node_computer "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/resources/Computer.java"
click node_ercresource "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/resources/ERCResource.java"
click node_printer "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/resources/Printer.java"
click node_computer_session "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/sessions/ComputerSession.java"
click node_session_action "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/sessions/SessionAction.java"
click node_session_renewal "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/sessions/SessionRenewal.java"
click node_seat_transfer "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/sessions/SeatTransfer.java"
click node_document_service "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/services/DocumentService.java"
click node_printing_service "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/services/PrintingService.java"
click node_photocopy_service "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/services/PhotocopyService.java"
click node_scanning_service "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/services/ScanningService.java"
click node_transaction "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/transactions/Transaction.java"
click node_charge "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/transactions/Charge.java"
click node_paper_purchase "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/transactions/PaperPurchase.java"
click node_penalty "https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/transactions/Penalty.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_dashboard,node_layout toneBlue
class node_student,node_computer,node_ercresource,node_printer toneAmber
class node_computer_session,node_session_action,node_session_renewal,node_seat_transfer toneMint
class node_document_service,node_printing_service,node_photocopy_service,node_scanning_service toneRose
class node_transaction,node_charge,node_paper_purchase,node_penalty,node_operator toneIndigo
```

## Components

### Terminal interface

- [Application entry](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/app/Main.java): `src/app/Main.java`
- [Dashboard and menu](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/app/Dashboard.java): `src/app/Dashboard.java`
- [Computer layout](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/app/ComputerLayout): `src/app/ComputerLayout`

### ERC resources

- [Student](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/resources/Student.java): `src/resources/Student.java`
- [Computer](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/resources/Computer.java): `src/resources/Computer.java`
- [ERC resource](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/resources/ERCResource.java): `src/resources/ERCResource.java`
- [Printer](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/resources/Printer.java): `src/resources/Printer.java`

### Computer sessions

- [Computer session](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/sessions/ComputerSession.java): `src/sessions/ComputerSession.java`
- [Session action](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/sessions/SessionAction.java): `src/sessions/SessionAction.java`
- [Session renewal](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/sessions/SessionRenewal.java): `src/sessions/SessionRenewal.java`
- [Seat transfer](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/sessions/SeatTransfer.java): `src/sessions/SeatTransfer.java`

### Document services

- [Document service](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/services/DocumentService.java): `src/services/DocumentService.java`
- [Printing service](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/services/PrintingService.java): `src/services/PrintingService.java`
- [Photocopy service](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/services/PhotocopyService.java): `src/services/PhotocopyService.java`
- [Scanning service](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/services/ScanningService.java): `src/services/ScanningService.java`

### Transactions

- [Transaction](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/transactions/Transaction.java): `src/transactions/Transaction.java`
- [Charge](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/transactions/Charge.java): `src/transactions/Charge.java`
- [Paper purchase](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/transactions/PaperPurchase.java): `src/transactions/PaperPurchase.java`
- [Penalty](https://github.com/vonjjustin/adnu-erc-simulation/blob/main/src/transactions/Penalty.java): `src/transactions/Penalty.java`

### Other components

- **ERC operator**

## Connections

- Dashboard and menu → Computer layout: renders (evidence: `src/app/Dashboard.java`)
- Computer session → Session action: executes (evidence: `src/sessions/ComputerSession.java`)
- Session renewal → Computer session: renews (evidence: `src/sessions/SessionRenewal.java`)
- Seat transfer → Computer session: transfers seat (evidence: `src/sessions/SeatTransfer.java`)
