# vaithiswaran024/osclab architecture

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

- Interactive diagram: https://gitdiagram.com/vaithiswaran024/osclab
- Repository: https://github.com/vaithiswaran024/osclab

## Overview

This repository is a collection of independent small web and scripting exercises, not one integrated application. The workflows include an image slideshow, utility billing, feedback submission and viewing, session-based login, file read/write, a form-response server, and employee records management. The diagram separates these exercises by domain; edges reflect only relationships visible in the supplied excerpts. Some HTML and logout files were not sampled, so their internal behavior is not inferred.

Main entry points: [`program4/index.php`](https://github.com/vaithiswaran024/osclab/blob/main/program4/index.php) (Login Handler), [`program7/server.js`](https://github.com/vaithiswaran024/osclab/blob/main/program7/server.js) (Employee App Server), [`program3/index.php`](https://github.com/vaithiswaran024/osclab/blob/main/program3/index.php) (Feedback Submission), [`program3/view.php`](https://github.com/vaithiswaran024/osclab/blob/main/program3/view.php) (Feedback Listing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web_demos["Web and File Demos"]
  node_slideshow["Image Slideshow<br/>[app.js]"]
  node_slideshow_page["Slideshow Page<br/>[index.html]"]
  node_billing["Unit Bill Calculator<br/>[bill.php]"]
  node_file_demo["File Read Write<br/>[app.js]"]
  node_sample_file["Sample Text File<br/>[sample.txt]"]
end

subgraph group_feedback["Feedback System"]
  node_feedback_form["Feedback Submission<br/>[index.php]"]
  node_feedback_view["Feedback Listing<br/>[view.php]"]
  node_feedback_db_config["Feedback DB Connection<br/>[db.php]"]
  node_feedback_store[("Feedback Database")]
end

subgraph group_login["Session Login"]
  node_login_form["Login Handler<br/>[index.php]"]
  node_dashboard["Session Dashboard<br/>[dashboard.php]"]
  node_logout["Logout Handler<br/>[logout.php]"]
  node_login_db_config["Login DB Connection<br/>[db.php]"]
  node_login_store[("Login Database")]
end

subgraph group_student_form["Student Form Server"]
  node_student_server["Form Response Server<br/>[backend.js]"]
  node_student_page["Student Form Page<br/>[index.html]"]
end

subgraph group_employees["Employee Records"]
  node_employee_server["Employee App Server<br/>[server.js]"]
  node_employee_page["Employee Form Page"]
  node_employee_store[("Employee Database")]
end

node_browser(("User Browser"))
node_mongodb[("MongoDB Service")]

node_browser -->|"views"| node_slideshow
node_slideshow -.->|"updates image"| node_slideshow_page
node_browser -->|"submits units"| node_billing
node_browser -.->|"runs script"| node_file_demo
node_file_demo -->|"writes then reads"| node_sample_file
node_browser -->|"submits feedback"| node_feedback_form
node_feedback_form -->|"includes connection"| node_feedback_db_config
node_feedback_form -->|"inserts feedback"| node_feedback_store
node_browser -->|"requests listing"| node_feedback_view
node_feedback_view -->|"includes connection"| node_feedback_db_config
node_feedback_view -->|"queries feedback"| node_feedback_store
node_browser -->|"submits credentials"| node_login_form
node_login_form -->|"includes connection"| node_login_db_config
node_login_form -->|"checks credentials"| node_login_store
node_login_form -->|"redirects on success"| node_dashboard
node_dashboard -->|"redirects if unauthenticated"| node_login_form
node_dashboard -->|"links to logout"| node_logout
node_browser -->|"requests form response"| node_student_server
node_student_server -->|"serves page"| node_student_page
node_browser -->|"submits and views records"| node_employee_server
node_employee_server -->|"serves page"| node_employee_page
node_employee_server -->|"creates, finds, deletes"| node_employee_store
node_employee_server -->|"connects to"| node_mongodb

click node_slideshow "https://github.com/vaithiswaran024/osclab/blob/main/program1/app.js"
click node_slideshow_page "https://github.com/vaithiswaran024/osclab/blob/main/program1/index.html"
click node_billing "https://github.com/vaithiswaran024/osclab/blob/main/program2/bill.php"
click node_file_demo "https://github.com/vaithiswaran024/osclab/blob/main/program5/app.js"
click node_sample_file "https://github.com/vaithiswaran024/osclab/blob/main/program5/sample.txt"
click node_feedback_form "https://github.com/vaithiswaran024/osclab/blob/main/program3/index.php"
click node_feedback_view "https://github.com/vaithiswaran024/osclab/blob/main/program3/view.php"
click node_feedback_db_config "https://github.com/vaithiswaran024/osclab/blob/main/program3/db.php"
click node_login_form "https://github.com/vaithiswaran024/osclab/blob/main/program4/index.php"
click node_dashboard "https://github.com/vaithiswaran024/osclab/blob/main/program4/dashboard.php"
click node_logout "https://github.com/vaithiswaran024/osclab/blob/main/program4/logout.php"
click node_login_db_config "https://github.com/vaithiswaran024/osclab/blob/main/program4/db.php"
click node_student_server "https://github.com/vaithiswaran024/osclab/blob/main/program6/server/backend.js"
click node_student_page "https://github.com/vaithiswaran024/osclab/blob/main/program6/server/index.html"
click node_employee_server "https://github.com/vaithiswaran024/osclab/blob/main/program7/server.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_slideshow,node_slideshow_page,node_billing,node_file_demo,node_sample_file,node_browser toneBlue
class node_feedback_form,node_feedback_view,node_feedback_db_config,node_feedback_store,node_mongodb toneAmber
class node_login_form,node_dashboard,node_logout,node_login_db_config,node_login_store toneMint
class node_student_server,node_student_page toneRose
class node_employee_server,node_employee_page,node_employee_store toneIndigo
```

## Components

### Web and File Demos

- [Image Slideshow](https://github.com/vaithiswaran024/osclab/blob/main/program1/app.js): `program1/app.js`
- [Slideshow Page](https://github.com/vaithiswaran024/osclab/blob/main/program1/index.html): `program1/index.html`
- [Unit Bill Calculator](https://github.com/vaithiswaran024/osclab/blob/main/program2/bill.php): `program2/bill.php`
- [File Read Write](https://github.com/vaithiswaran024/osclab/blob/main/program5/app.js): `program5/app.js`
- [Sample Text File](https://github.com/vaithiswaran024/osclab/blob/main/program5/sample.txt): `program5/sample.txt`

### Feedback System

- [Feedback Submission](https://github.com/vaithiswaran024/osclab/blob/main/program3/index.php): `program3/index.php`
- [Feedback Listing](https://github.com/vaithiswaran024/osclab/blob/main/program3/view.php): `program3/view.php`
- [Feedback DB Connection](https://github.com/vaithiswaran024/osclab/blob/main/program3/db.php): `program3/db.php`
- **Feedback Database**

### Session Login

- [Login Handler](https://github.com/vaithiswaran024/osclab/blob/main/program4/index.php): `program4/index.php`
- [Session Dashboard](https://github.com/vaithiswaran024/osclab/blob/main/program4/dashboard.php): `program4/dashboard.php`
- [Logout Handler](https://github.com/vaithiswaran024/osclab/blob/main/program4/logout.php): `program4/logout.php`
- [Login DB Connection](https://github.com/vaithiswaran024/osclab/blob/main/program4/db.php): `program4/db.php`
- **Login Database**

### Student Form Server

- [Form Response Server](https://github.com/vaithiswaran024/osclab/blob/main/program6/server/backend.js): `program6/server/backend.js`
- [Student Form Page](https://github.com/vaithiswaran024/osclab/blob/main/program6/server/index.html): `program6/server/index.html`

### Employee Records

- [Employee App Server](https://github.com/vaithiswaran024/osclab/blob/main/program7/server.js): `program7/server.js`
- **Employee Form Page**
- **Employee Database**

### Other components

- **User Browser**
- **MongoDB Service**

## Connections

- User Browser → Image Slideshow: views
- Image Slideshow → Slideshow Page: updates image
- User Browser → Unit Bill Calculator: submits units (evidence: `program2/bill.php`)
- User Browser → File Read Write: runs script
- File Read Write → Sample Text File: writes then reads (evidence: `program5/app.js`)
- User Browser → Feedback Submission: submits feedback (evidence: `program3/index.php`)
- Feedback Submission → Feedback DB Connection: includes connection (evidence: `program3/index.php`)
- Feedback Submission → Feedback Database: inserts feedback (evidence: `program3/index.php`)
- User Browser → Feedback Listing: requests listing
- Feedback Listing → Feedback DB Connection: includes connection (evidence: `program3/view.php`)
- Feedback Listing → Feedback Database: queries feedback (evidence: `program3/view.php`)
- User Browser → Login Handler: submits credentials (evidence: `program4/index.php`)
- Login Handler → Login DB Connection: includes connection (evidence: `program4/index.php`)
- Login Handler → Login Database: checks credentials (evidence: `program4/index.php`)
- Login Handler → Session Dashboard: redirects on success (evidence: `program4/index.php`)
- Session Dashboard → Login Handler: redirects if unauthenticated (evidence: `program4/dashboard.php`)
- Session Dashboard → Logout Handler: links to logout (evidence: `program4/dashboard.php`)
- User Browser → Form Response Server: requests form response (evidence: `program6/server/backend.js`)
- Form Response Server → Student Form Page: serves page (evidence: `program6/server/backend.js`)
- User Browser → Employee App Server: submits and views records (evidence: `program7/server.js`)
- Employee App Server → Employee Form Page: serves page (evidence: `program7/server.js`)
- Employee App Server → Employee Database: creates, finds, deletes (evidence: `program7/server.js`)
- Employee App Server → MongoDB Service: connects to (evidence: `program7/server.js`)
