# rajsahniai/cpr_library_management_system_v3 architecture

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

- Interactive diagram: https://gitdiagram.com/rajsahniai/cpr_library_management_system_v3
- Repository: https://github.com/rajsahniai/cpr_library_management_system_v3

## Overview

CPR Pune’s browser-based library management system takes staff from login to a dashboard and workflows for catalogue, members, circulation, transactions, reports, and settings. The principal flow is routed through the main application, which operates on shared in-memory data; book entry additionally offers OCR and online catalogue matching. The README documents all major capabilities, but excerpts only partially show their implementation and do not show login wiring, settings behavior, or several CRUD actions. Edges therefore reflect only explicit routing, shared-data use, and documented scanner integrations.

Main entry points: [`js/main.js`](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js) (Dashboard), [`js/data.js`](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/data.js) (Library data), [`login.html`](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/login.html) (Login), [`index.html`](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/index.html) (Main application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_login["Login<br/>[login.html]"]
  node_appentry["Main application<br/>[index.html]"]
end

subgraph group_library["Library Operations"]
  node_dashboard["Dashboard<br/>[main.js]"]
  node_catalogue["Book catalogue<br/>[main.js]"]
  node_members["Member records<br/>[main.js]"]
  node_circulation["Issue and return<br/>[main.js]"]
  node_transactions["Transaction log<br/>[main.js]"]
  node_reports["Reports<br/>[main.js]"]
  node_settings["Loan settings<br/>[main.js]"]
end

subgraph group_scanner["Book Scanner"]
  node_scanner["AI book scanner<br/>[main.js]"]
  node_ocr["Tesseract OCR"]
  node_googlebooks["Google Books"]
  node_openlibrary["Open Library"]
end

subgraph group_state["In-Memory State"]
  node_data[("Library data<br/>[data.js]")]
end

node_staff(("Library staff"))

node_staff -->|"signs in"| node_login
node_login -->|"redirects"| node_appentry
node_appentry -->|"opens"| node_dashboard
node_dashboard -->|"routes to"| node_catalogue
node_dashboard -->|"routes to"| node_members
node_dashboard -->|"routes to"| node_circulation
node_dashboard -->|"routes to"| node_transactions
node_dashboard -->|"routes to"| node_reports
node_catalogue -->|"opens entry"| node_scanner
node_scanner -->|"loads on demand"| node_ocr
node_scanner -->|"searches"| node_googlebooks
node_scanner -->|"searches"| node_openlibrary
node_catalogue -->|"reads catalogue"| node_data
node_members -->|"reads members"| node_data
node_circulation -->|"uses loan records"| node_data
node_transactions -->|"filters records"| node_data
node_reports -->|"aggregates records"| node_data
node_settings -.->|"stores settings"| node_data

click node_login "https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/login.html"
click node_dashboard "https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js"
click node_catalogue "https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js"
click node_members "https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js"
click node_circulation "https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js"
click node_transactions "https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js"
click node_reports "https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js"
click node_settings "https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js"
click node_scanner "https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js"
click node_data "https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/data.js"
click node_appentry "https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/index.html"

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_login,node_appentry toneBlue
class node_dashboard,node_catalogue,node_members,node_circulation,node_transactions,node_reports,node_settings toneAmber
class node_scanner,node_ocr,node_googlebooks,node_openlibrary toneMint
class node_data toneRose
class node_staff toneIndigo
```

## Components

### Application

- [Login](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/login.html): `login.html`
- [Main application](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/index.html): `index.html`

### Library Operations

- [Dashboard](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js): `js/main.js`
- [Book catalogue](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js): `js/main.js`
- [Member records](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js): `js/main.js`
- [Issue and return](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js): `js/main.js`
- [Transaction log](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js): `js/main.js`
- [Reports](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js): `js/main.js`
- [Loan settings](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js): `js/main.js`

### Book Scanner

- [AI book scanner](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/main.js): `js/main.js`
- **Tesseract OCR**
- **Google Books**
- **Open Library**

### In-Memory State

- [Library data](https://github.com/rajsahniai/cpr_library_management_system_v3/blob/main/js/data.js): `js/data.js`

### Other components

- **Library staff**

## Connections

- Library staff → Login: signs in (evidence: `README.txt`)
- Login → Main application: redirects (evidence: `README.txt`)
- Main application → Dashboard: opens (evidence: `README.txt`)
- Dashboard → Book catalogue: routes to (evidence: `js/main.js`)
- Dashboard → Member records: routes to (evidence: `js/main.js`)
- Dashboard → Issue and return: routes to (evidence: `js/main.js`)
- Dashboard → Transaction log: routes to (evidence: `js/main.js`)
- Dashboard → Reports: routes to (evidence: `js/main.js`)
- Book catalogue → AI book scanner: opens entry (evidence: `js/main.js`)
- AI book scanner → Tesseract OCR: loads on demand (evidence: `js/main.js`)
- AI book scanner → Google Books: searches (evidence: `README.txt`)
- AI book scanner → Open Library: searches (evidence: `README.txt`)
- Book catalogue → Library data: reads catalogue (evidence: `js/main.js`)
- Member records → Library data: reads members (evidence: `js/main.js`)
- Issue and return → Library data: uses loan records (evidence: `js/main.js`)
- Transaction log → Library data: filters records (evidence: `js/main.js`)
- Reports → Library data: aggregates records (evidence: `js/main.js`)
- Loan settings → Library data: stores settings
