# himanshu-firke/library-management-system architecture

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

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

## Overview

This is a Java console library-management application: users navigate menus to manage books, members, librarians, issue/return loans, search records, view statistics, and request backups. The main path is console input through the application menu into Library business logic, with Book and person-domain models supporting those operations. File persistence is a documented capability and FileHandler implements file operations, but the excerpts do not show Library calling it. Root-level source files duplicate the src implementation; standalone demo programs are represented separately. Some internal wiring and unsampled capabilities are therefore left unconnected.

Main entry points: [`src/Library.java`](https://github.com/himanshu-firke/library-management-system/blob/main/src/Library.java) (Library operations), [`src/Librarian.java`](https://github.com/himanshu-firke/library-management-system/blob/main/src/Librarian.java) (Librarian records), [`src/LibraryManagementApp.java`](https://github.com/himanshu-firke/library-management-system/blob/main/src/LibraryManagementApp.java) (Console menus), [`MemberDemo.java`](https://github.com/himanshu-firke/library-management-system/blob/main/MemberDemo.java) (Member demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Console interaction"]
  node_app["Console menus"]
  node_rootapp["Root app copy"]
end

subgraph group_domain["Library domain"]
  node_library["Library operations<br/>[Library.java]"]
  node_book["Book records<br/>[Book.java]"]
  node_person["Person base<br/>[Person.java]"]
  node_member["Member records<br/>[Member.java]"]
  node_librarian["Librarian records<br/>[Librarian.java]"]
  node_rootlibrary["Root library copy<br/>[Library.java]"]
end

subgraph group_persistence["File persistence"]
  node_files["File operations<br/>[FileHandler.java]"]
  node_data[("CSV data files<br/>[books.txt]")]
  node_rootfiles["Root file copy<br/>[FileHandler.java]"]
end

subgraph group_demos["Standalone demos"]
  node_memberdemo["Member demo<br/>[MemberDemo.java]"]
  node_simpledemo["Simple demo<br/>[SimpleDemo.java]"]
  node_testdemo["Management demo<br/>[TestDemo.java]"]
end

node_patron(("Console user"))

node_patron -->|"uses menus"| node_app
node_app -->|"calls operations"| node_library
node_librarian -->|"delegates operations"| node_library
node_library -->|"issues and returns"| node_book
node_member -->|"extends"| node_person
node_librarian -->|"extends"| node_person
node_memberdemo -->|"uses library"| node_rootlibrary
node_simpledemo -.-> node_memberdemo

click node_app "https://github.com/himanshu-firke/library-management-system/blob/main/src/LibraryManagementApp.java"
click node_library "https://github.com/himanshu-firke/library-management-system/blob/main/src/Library.java"
click node_book "https://github.com/himanshu-firke/library-management-system/blob/main/src/Book.java"
click node_person "https://github.com/himanshu-firke/library-management-system/blob/main/src/Person.java"
click node_member "https://github.com/himanshu-firke/library-management-system/blob/main/src/Member.java"
click node_librarian "https://github.com/himanshu-firke/library-management-system/blob/main/src/Librarian.java"
click node_files "https://github.com/himanshu-firke/library-management-system/blob/main/src/FileHandler.java"
click node_data "https://github.com/himanshu-firke/library-management-system/blob/main/data/books.txt"
click node_rootapp "https://github.com/himanshu-firke/library-management-system/blob/main/LibraryManagementApp.java"
click node_rootlibrary "https://github.com/himanshu-firke/library-management-system/blob/main/Library.java"
click node_rootfiles "https://github.com/himanshu-firke/library-management-system/blob/main/FileHandler.java"
click node_memberdemo "https://github.com/himanshu-firke/library-management-system/blob/main/MemberDemo.java"
click node_simpledemo "https://github.com/himanshu-firke/library-management-system/blob/main/SimpleDemo.java"
click node_testdemo "https://github.com/himanshu-firke/library-management-system/blob/main/TestDemo.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_rootapp,node_patron toneBlue
class node_library,node_book,node_person,node_member,node_librarian,node_rootlibrary toneAmber
class node_files,node_data,node_rootfiles toneMint
class node_memberdemo,node_simpledemo,node_testdemo toneRose
```

## Components

### Console interaction

- [Console menus](https://github.com/himanshu-firke/library-management-system/blob/main/src/LibraryManagementApp.java): `src/LibraryManagementApp.java`
- [Root app copy](https://github.com/himanshu-firke/library-management-system/blob/main/LibraryManagementApp.java): `LibraryManagementApp.java`

### Library domain

- [Library operations](https://github.com/himanshu-firke/library-management-system/blob/main/src/Library.java): `src/Library.java`
- [Book records](https://github.com/himanshu-firke/library-management-system/blob/main/src/Book.java): `src/Book.java`
- [Person base](https://github.com/himanshu-firke/library-management-system/blob/main/src/Person.java): `src/Person.java`
- [Member records](https://github.com/himanshu-firke/library-management-system/blob/main/src/Member.java): `src/Member.java`
- [Librarian records](https://github.com/himanshu-firke/library-management-system/blob/main/src/Librarian.java): `src/Librarian.java`
- [Root library copy](https://github.com/himanshu-firke/library-management-system/blob/main/Library.java): `Library.java`

### File persistence

- [File operations](https://github.com/himanshu-firke/library-management-system/blob/main/src/FileHandler.java): `src/FileHandler.java`
- [CSV data files](https://github.com/himanshu-firke/library-management-system/blob/main/data/books.txt): `data/books.txt`
- [Root file copy](https://github.com/himanshu-firke/library-management-system/blob/main/FileHandler.java): `FileHandler.java`

### Standalone demos

- [Member demo](https://github.com/himanshu-firke/library-management-system/blob/main/MemberDemo.java): `MemberDemo.java`
- [Simple demo](https://github.com/himanshu-firke/library-management-system/blob/main/SimpleDemo.java): `SimpleDemo.java`
- [Management demo](https://github.com/himanshu-firke/library-management-system/blob/main/TestDemo.java): `TestDemo.java`

### Other components

- **Console user**

## Connections

- Console user → Console menus: uses menus (evidence: `README.md`)
- Console menus → Library operations: calls operations (evidence: `src/LibraryManagementApp.java`)
- Librarian records → Library operations: delegates operations (evidence: `src/Librarian.java`)
- Library operations → Book records: issues and returns (evidence: `src/Library.java`)
- Member records → Person base: extends (evidence: `src/Member.java`)
- Librarian records → Person base: extends (evidence: `src/Librarian.java`)
- Member demo → Root library copy: uses library
- Simple demo → Member demo
