# c-bhaskar123/smart_library_project architecture

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

- Interactive diagram: https://gitdiagram.com/c-bhaskar123/smart_library_project
- Repository: https://github.com/c-bhaskar123/smart_library_project

## Overview

This is a small browser-based library prototype with a hard-coded login, a book-catalog search, and browser-local session details. The principal flow is login submission, credential checking, local storage, then navigation to the catalog; catalog code supports searching books and logging out. Source excerpts show the behavior, but not how the HTML pages load their scripts or define their elements, so those wiring relationships are omitted.

Main entry points: [`Smart_Library_Login_Prototype/login.js`](https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/login.js) (Credential check), [`Smart_Library_Login_Prototype/script.js`](https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/script.js) (Search and logout), [`Smart_Library_Login_Prototype/login.html`](https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/login.html) (Login page), [`Smart_Library_Login_Prototype/index.html`](https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/index.html) (Catalog page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Login"]
  node_login_page["Login page<br/>[login.html]"]
  node_login_handler["Credential check<br/>[login.js]"]
end

subgraph group_catalog["Library Catalog"]
  node_catalog_page["Catalog page<br/>[index.html]"]
  node_catalog_behavior["Search and logout<br/>[script.js]"]
end

subgraph group_state["Browser State"]
  node_local_storage[("Local storage")]
end

node_visitor(("Library visitor"))

node_visitor -->|"submits credentials"| node_login_handler
node_login_handler -->|"stores login"| node_local_storage
node_login_handler -->|"redirects after login"| node_catalog_page
node_visitor -->|"searches or logs out"| node_catalog_behavior
node_catalog_behavior -->|"reads and clears session"| node_local_storage
node_catalog_behavior -->|"redirects on logout"| node_login_page

click node_login_page "https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/login.html"
click node_login_handler "https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/login.js"
click node_catalog_page "https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/index.html"
click node_catalog_behavior "https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/script.js"

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_page,node_login_handler toneBlue
class node_catalog_page,node_catalog_behavior toneAmber
class node_local_storage toneMint
class node_visitor toneIndigo
```

## Components

### Login

- [Login page](https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/login.html): `Smart_Library_Login_Prototype/login.html`
- [Credential check](https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/login.js): `Smart_Library_Login_Prototype/login.js`

### Library Catalog

- [Catalog page](https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/index.html): `Smart_Library_Login_Prototype/index.html`
- [Search and logout](https://github.com/c-bhaskar123/smart_library_project/blob/main/Smart_Library_Login_Prototype/script.js): `Smart_Library_Login_Prototype/script.js`

### Browser State

- **Local storage**

### Other components

- **Library visitor**

## Connections

- Library visitor → Credential check: submits credentials (evidence: `Smart_Library_Login_Prototype/login.js`)
- Credential check → Local storage: stores login (evidence: `Smart_Library_Login_Prototype/login.js`)
- Credential check → Catalog page: redirects after login (evidence: `Smart_Library_Login_Prototype/login.js`)
- Library visitor → Search and logout: searches or logs out (evidence: `Smart_Library_Login_Prototype/script.js`)
- Search and logout → Local storage: reads and clears session (evidence: `Smart_Library_Login_Prototype/script.js`)
- Search and logout → Login page: redirects on logout (evidence: `Smart_Library_Login_Prototype/script.js`)
