# manar-hamdi/librarymanagement architecture

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

- Interactive diagram: https://gitdiagram.com/manar-hamdi/librarymanagement
- Repository: https://github.com/manar-hamdi/librarymanagement

## Overview

This is a small console-based library management application. A user chooses actions in Main, which delegates catalog, search, borrowing, and return operations to Library; Library updates Book availability and the User’s borrowed-book list. The catalog and user records are in-memory collections, not a persistent database. The README is empty, so the graph reflects only the sampled source; it does not show persistence or external integrations.

Main entry points: [`src/Main.java`](https://github.com/manar-hamdi/librarymanagement/blob/master/src/Main.java) (Menu and input), [`src/Library.java`](https://github.com/manar-hamdi/librarymanagement/blob/master/src/Library.java) (Catalog and circulation), [`src/User.java`](https://github.com/manar-hamdi/librarymanagement/blob/master/src/User.java) (Member record), [`src/Book.java`](https://github.com/manar-hamdi/librarymanagement/blob/master/src/Book.java) (Book availability)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Console interaction"]
  node_main["Menu and input<br/>[Main.java]"]
end

subgraph group_domain["Library domain"]
  node_library["Catalog and circulation<br/>[Library.java]"]
  node_book["Book availability<br/>[Book.java]"]
  node_member["Member record<br/>[User.java]"]
end

node_user(("Library user"))

node_user -->|"chooses actions"| node_main
node_main -->|"requests operations"| node_library
node_main -->|"lists loans"| node_member
node_library -->|"checks and updates"| node_book
node_library -->|"updates loans"| node_member
node_member -->|"lists borrowed titles"| node_book

click node_main "https://github.com/manar-hamdi/librarymanagement/blob/master/src/Main.java"
click node_library "https://github.com/manar-hamdi/librarymanagement/blob/master/src/Library.java"
click node_book "https://github.com/manar-hamdi/librarymanagement/blob/master/src/Book.java"
click node_member "https://github.com/manar-hamdi/librarymanagement/blob/master/src/User.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_user toneBlue
class node_library,node_book,node_member toneAmber
```

## Components

### Console interaction

- [Menu and input](https://github.com/manar-hamdi/librarymanagement/blob/master/src/Main.java): `src/Main.java`

### Library domain

- [Catalog and circulation](https://github.com/manar-hamdi/librarymanagement/blob/master/src/Library.java): `src/Library.java`
- [Book availability](https://github.com/manar-hamdi/librarymanagement/blob/master/src/Book.java): `src/Book.java`
- [Member record](https://github.com/manar-hamdi/librarymanagement/blob/master/src/User.java): `src/User.java`

### Other components

- **Library user**

## Connections

- Library user → Menu and input: chooses actions (evidence: `src/Main.java`)
- Menu and input → Catalog and circulation: requests operations (evidence: `src/Main.java`)
- Menu and input → Member record: lists loans (evidence: `src/Main.java`)
- Catalog and circulation → Book availability: checks and updates (evidence: `src/Library.java`)
- Catalog and circulation → Member record: updates loans (evidence: `src/Library.java`)
- Member record → Book availability: lists borrowed titles (evidence: `src/User.java`)
