# chaudhary-danish/libraraymanagementsystem architecture

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

- Interactive diagram: https://gitdiagram.com/chaudhary-danish/libraraymanagementsystem
- Repository: https://github.com/chaudhary-danish/libraraymanagementsystem

## Overview

This is an ASP.NET Web Forms library-management application for an administrator. The main workflow is login, then dashboard monitoring and catalogue/member maintenance, followed by book issue and return with lending history and copy counts updated together. The database helper handles SQL Server connection selection, schema repair, and common queries. The tree and sampled handlers support these relationships; other page capabilities are included only where their purpose is evident from filenames or shared code, not treated as inspected implementation.

Main entry points: [`LibraryManagementSystemASP/App_Code/Db.cs`](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/App_Code/Db.cs) (SQL access and schema), [`LibraryManagementSystemASP/Login.aspx.cs`](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/Login.aspx.cs) (Sign in), [`LibraryManagementSystemASP/WebForm4.aspx.cs`](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/WebForm4.aspx.cs) (Issue and return), [`LibraryManagementSystemASP/Site.Master.cs`](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/Site.Master.cs) (Session guard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and overview"]
  node_login["Sign in<br/>[Login.aspx.cs]"]
  node_dashboard["Dashboard<br/>[WebForm1.aspx.cs]"]
  node_siteguard["Session guard<br/>[Site.Master.cs]"]
  node_practical["State demo<br/>[WebForm5.aspx.cs]"]
end

subgraph group_records["Library records"]
  node_books["Book catalogue<br/>[WebForm2.aspx.cs]"]
  node_members["Member records<br/>[WebForm3.aspx.cs]"]
end

subgraph group_circulation["Lending workflow"]
  node_circulation["Issue and return<br/>[WebForm4.aspx.cs]"]
end

subgraph group_platform["Data platform"]
  node_dbhelper["SQL access and schema<br/>[Db.cs]"]
  node_database[("LibraryDB<br/>[LibraryDB.sql]")]
end

node_admin(("Administrator"))
node_sqlserver[("SQL Server")]
node_webclient(("Browser"))

node_admin -->|"submits credentials"| node_login
node_login -->|"checks account"| node_dbhelper
node_login -->|"redirects on success"| node_dashboard
node_siteguard -->|"redirects unauthenticated"| node_login
node_siteguard -->|"maintains session"| node_admin
node_dashboard -->|"loads metrics and activity"| node_dbhelper
node_admin -.->|"maintains catalogue"| node_books
node_books -->|"queries and updates books"| node_dbhelper
node_admin -.->|"maintains members"| node_members
node_members -->|"queries and updates members"| node_dbhelper
node_admin -.->|"issues or returns books"| node_circulation
node_circulation -->|"loads selections and history"| node_dbhelper
node_circulation -->|"transacts stock and issues"| node_sqlserver
node_dbhelper -->|"opens connections and runs SQL"| node_sqlserver
node_dbhelper -->|"prepares schema"| node_database
node_admin -.->|"views state demonstration"| node_practical
node_webclient -.->|"uses web interface"| node_login

click node_login "https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/Login.aspx.cs"
click node_dashboard "https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/WebForm1.aspx.cs"
click node_siteguard "https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/Site.Master.cs"
click node_practical "https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/WebForm5.aspx.cs"
click node_books "https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/WebForm2.aspx.cs"
click node_members "https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/WebForm3.aspx.cs"
click node_circulation "https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/WebForm4.aspx.cs"
click node_dbhelper "https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/App_Code/Db.cs"
click node_database "https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/Database/LibraryDB.sql"

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_dashboard,node_siteguard,node_practical,node_webclient toneBlue
class node_books,node_members,node_sqlserver toneAmber
class node_circulation toneMint
class node_dbhelper,node_database toneRose
class node_admin toneIndigo
```

## Components

### Access and overview

- [Sign in](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/Login.aspx.cs): `LibraryManagementSystemASP/Login.aspx.cs`
- [Dashboard](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/WebForm1.aspx.cs): `LibraryManagementSystemASP/WebForm1.aspx.cs`
- [Session guard](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/Site.Master.cs): `LibraryManagementSystemASP/Site.Master.cs`
- [State demo](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/WebForm5.aspx.cs): `LibraryManagementSystemASP/WebForm5.aspx.cs`

### Library records

- [Book catalogue](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/WebForm2.aspx.cs): `LibraryManagementSystemASP/WebForm2.aspx.cs`
- [Member records](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/WebForm3.aspx.cs): `LibraryManagementSystemASP/WebForm3.aspx.cs`

### Lending workflow

- [Issue and return](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/WebForm4.aspx.cs): `LibraryManagementSystemASP/WebForm4.aspx.cs`

### Data platform

- [SQL access and schema](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/App_Code/Db.cs): `LibraryManagementSystemASP/App_Code/Db.cs`
- [LibraryDB](https://github.com/chaudhary-danish/libraraymanagementsystem/blob/main/LibraryManagementSystemASP/Database/LibraryDB.sql): `LibraryManagementSystemASP/Database/LibraryDB.sql`

### Other components

- **Administrator**
- **SQL Server**
- **Browser**

## Connections

- Administrator → Sign in: submits credentials (evidence: `LibraryManagementSystemASP/Login.aspx.cs`)
- Sign in → SQL access and schema: checks account (evidence: `LibraryManagementSystemASP/Login.aspx.cs`)
- Sign in → Dashboard: redirects on success (evidence: `LibraryManagementSystemASP/Login.aspx.cs`)
- Session guard → Sign in: redirects unauthenticated (evidence: `LibraryManagementSystemASP/Site.Master.cs`)
- Session guard → Administrator: maintains session (evidence: `LibraryManagementSystemASP/Site.Master.cs`)
- Dashboard → SQL access and schema: loads metrics and activity (evidence: `LibraryManagementSystemASP/WebForm1.aspx.cs`)
- Administrator → Book catalogue: maintains catalogue
- Book catalogue → SQL access and schema: queries and updates books (evidence: `LibraryManagementSystemASP/WebForm2.aspx.cs`)
- Administrator → Member records: maintains members
- Member records → SQL access and schema: queries and updates members (evidence: `LibraryManagementSystemASP/WebForm3.aspx.cs`)
- Administrator → Issue and return: issues or returns books
- Issue and return → SQL access and schema: loads selections and history (evidence: `LibraryManagementSystemASP/WebForm4.aspx.cs`)
- Issue and return → SQL Server: transacts stock and issues (evidence: `LibraryManagementSystemASP/WebForm4.aspx.cs`)
- SQL access and schema → SQL Server: opens connections and runs SQL (evidence: `LibraryManagementSystemASP/App_Code/Db.cs`)
- SQL access and schema → LibraryDB: prepares schema (evidence: `LibraryManagementSystemASP/App_Code/Db.cs`)
- Administrator → State demo: views state demonstration
- Browser → Sign in: uses web interface
