# jerryme3/library-system-management architecture

> Architecture diagram of the GitHub repository jerryme3/library-system-management, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jerryme3/library-system-management
- Repository: https://github.com/jerryme3/library-system-management

## Overview

This is a Java CLI library-management application. The borrower enters through the console, signs up or signs in, then donates, borrows, returns, searches, or views books and their profile; repository classes persist those operations through JDBC to PostgreSQL. The sampled App excerpt shows orchestration and several repository calls, but omits portions of the workflows, so uncertain wiring is not shown. README-listed features without sampled implementation detail are retained as capabilities of the CLI, not given speculative subsystem links.

Main entry points: [`src/main/java/com/library/system/App.java`](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/App.java) (Account workflows), [`src/main/java/com/library/system/dbconnection/DatabaseConnection.java`](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/dbconnection/DatabaseConnection.java) (JDBC connection), [`src/main/java/com/library/system/repository/BookRepository.java`](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/repository/BookRepository.java) (Book repository), [`src/main/java/com/library/system/repository/BorrowerRepository.java`](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/repository/BorrowerRepository.java) (Borrower repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflows"]
  node_app["Console application<br/>[App.java]"]
  node_accounts["Account workflows<br/>[App.java]"]
  node_book_ops["Book workflows<br/>[App.java]"]
  node_catalog_views["Catalog and search<br/>[App.java]"]
  node_profile_ops["Profile workflows<br/>[App.java]"]
end

subgraph group_domain["Library domain"]
  node_book_model["Book<br/>[Book.java]"]
  node_borrower_model["Borrower<br/>[Borrower.java]"]
  node_transaction_model["Transaction<br/>[Transaction.java]"]
end

subgraph group_persistence["Persistence"]
  node_book_repo["Book repository"]
  node_borrower_repo["Borrower repository"]
  node_transaction_repo["Transaction repository"]
  node_db_connection["JDBC connection"]
end

subgraph group_support["Validation and security"]
  node_input_auth["Input checks"]
  node_email_service["Email validation<br/>[EmailService.java]"]
  node_string_service["Name validation<br/>[StringService.java]"]
  node_password_service["Password handling"]
  node_password_hash["Password hashing"]
  node_id_generator["ID generation<br/>[IDGenerator.java]"]
end

node_borrower(("Borrower"))
node_postgres[("PostgreSQL")]

node_borrower -->|"enters choices"| node_app
node_app -->|"dispatches"| node_accounts
node_app -->|"dispatches"| node_book_ops
node_app -->|"dispatches"| node_catalog_views
node_app -->|"dispatches"| node_profile_ops
node_accounts -->|"reads and writes"| node_borrower_repo
node_accounts -->|"hashes and verifies"| node_password_hash
node_accounts -->|"generates IDs"| node_id_generator
node_accounts -->|"reports email errors"| node_email_service
node_accounts -->|"reports password errors"| node_password_service
node_book_ops -->|"reads and writes"| node_book_repo
node_book_ops -->|"reads and writes"| node_transaction_repo
node_book_ops -->|"generates IDs"| node_id_generator
node_catalog_views -->|"searches and reads"| node_book_repo
node_profile_ops -->|"reads and updates"| node_borrower_repo
node_profile_ops -->|"hashes and verifies"| node_password_hash
node_profile_ops -->|"reports password errors"| node_password_service
node_book_repo -->|"opens connection"| node_db_connection
node_borrower_repo -->|"opens connection"| node_db_connection
node_transaction_repo -->|"opens connection"| node_db_connection
node_db_connection -->|"connects to"| node_postgres
node_string_service -->|"checks characters"| node_input_auth

click node_app "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/App.java"
click node_accounts "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/App.java"
click node_book_ops "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/App.java"
click node_catalog_views "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/App.java"
click node_profile_ops "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/App.java"
click node_book_model "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/models/Book.java"
click node_borrower_model "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/models/Borrower.java"
click node_transaction_model "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/models/Transaction.java"
click node_book_repo "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/repository/BookRepository.java"
click node_borrower_repo "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/repository/BorrowerRepository.java"
click node_transaction_repo "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/repository/TransactionRepository.java"
click node_db_connection "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/dbconnection/DatabaseConnection.java"
click node_input_auth "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/utilities/InputAuthenticator.java"
click node_email_service "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/services/EmailService.java"
click node_string_service "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/services/StringService.java"
click node_password_service "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/services/PasswordService.java"
click node_password_hash "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/utilities/PasswordHashing.java"
click node_id_generator "https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/utilities/IDGenerator.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_app,node_accounts,node_book_ops,node_catalog_views,node_profile_ops toneBlue
class node_book_model,node_borrower_model,node_transaction_model,node_postgres toneAmber
class node_book_repo,node_borrower_repo,node_transaction_repo,node_db_connection toneMint
class node_input_auth,node_email_service,node_string_service,node_password_service,node_password_hash,node_id_generator toneRose
class node_borrower toneIndigo
```

## Components

### CLI workflows

- [Console application](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/App.java): `src/main/java/com/library/system/App.java`
- [Account workflows](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/App.java): `src/main/java/com/library/system/App.java`
- [Book workflows](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/App.java): `src/main/java/com/library/system/App.java`
- [Catalog and search](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/App.java): `src/main/java/com/library/system/App.java`
- [Profile workflows](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/App.java): `src/main/java/com/library/system/App.java`

### Library domain

- [Book](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/models/Book.java): `src/main/java/com/library/system/models/Book.java`
- [Borrower](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/models/Borrower.java): `src/main/java/com/library/system/models/Borrower.java`
- [Transaction](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/models/Transaction.java): `src/main/java/com/library/system/models/Transaction.java`

### Persistence

- [Book repository](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/repository/BookRepository.java): `src/main/java/com/library/system/repository/BookRepository.java`
- [Borrower repository](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/repository/BorrowerRepository.java): `src/main/java/com/library/system/repository/BorrowerRepository.java`
- [Transaction repository](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/repository/TransactionRepository.java): `src/main/java/com/library/system/repository/TransactionRepository.java`
- [JDBC connection](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/dbconnection/DatabaseConnection.java): `src/main/java/com/library/system/dbconnection/DatabaseConnection.java`

### Validation and security

- [Input checks](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/utilities/InputAuthenticator.java): `src/main/java/com/library/system/utilities/InputAuthenticator.java`
- [Email validation](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/services/EmailService.java): `src/main/java/com/library/system/services/EmailService.java`
- [Name validation](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/services/StringService.java): `src/main/java/com/library/system/services/StringService.java`
- [Password handling](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/services/PasswordService.java): `src/main/java/com/library/system/services/PasswordService.java`
- [Password hashing](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/utilities/PasswordHashing.java): `src/main/java/com/library/system/utilities/PasswordHashing.java`
- [ID generation](https://github.com/jerryme3/library-system-management/blob/main/src/main/java/com/library/system/utilities/IDGenerator.java): `src/main/java/com/library/system/utilities/IDGenerator.java`

### Other components

- **Borrower**
- **PostgreSQL**

## Connections

- Borrower → Console application: enters choices
- Console application → Account workflows: dispatches
- Console application → Book workflows: dispatches
- Console application → Catalog and search: dispatches
- Console application → Profile workflows: dispatches
- Account workflows → Borrower repository: reads and writes
- Account workflows → Password hashing: hashes and verifies
- Account workflows → ID generation: generates IDs
- Account workflows → Email validation: reports email errors
- Account workflows → Password handling: reports password errors
- Book workflows → Book repository: reads and writes
- Book workflows → Transaction repository: reads and writes
- Book workflows → ID generation: generates IDs
- Catalog and search → Book repository: searches and reads
- Profile workflows → Borrower repository: reads and updates
- Profile workflows → Password hashing: hashes and verifies
- Profile workflows → Password handling: reports password errors
- Book repository → JDBC connection: opens connection
- Borrower repository → JDBC connection: opens connection
- Transaction repository → JDBC connection: opens connection
- JDBC connection → PostgreSQL: connects to
- Name validation → Input checks: checks characters
