# shivaram083/dog-rescue-management architecture

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

- Interactive diagram: https://gitdiagram.com/shivaram083/dog-rescue-management
- Repository: https://github.com/shivaram083/dog-rescue-management

## Overview

This is a small PHP dog-rescue reporting app: people submit rescue reports, while NGO staff and volunteers log in to view reports. Its main stages are report entry, image/file handling and database insertion, then role-specific access and report viewing. The excerpts show shared MySQL access and dashboard queries, but no README or homepage excerpt; homepage navigation and some routes therefore cannot be verified. The NGO dashboard also references an assignment endpoint absent from the tree.

Main entry points: [`db.php`](https://github.com/shivaram083/dog-rescue-management/blob/main/db.php) (MySQL database), [`ngo-login-process.php`](https://github.com/shivaram083/dog-rescue-management/blob/main/ngo-login-process.php) (NGO authentication), [`volunteer-login-check.php`](https://github.com/shivaram083/dog-rescue-management/blob/main/volunteer-login-check.php) (Volunteer authentication), [`dashboard.php`](https://github.com/shivaram083/dog-rescue-management/blob/main/dashboard.php) (NGO dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reporting["Rescue reporting"]
  node_report_form["Report form<br/>[report.php]"]
  node_report_submit["Report submission<br/>[submit-report.php]"]
  node_database[("MySQL database<br/>[db.php]")]
end

subgraph group_access["Role access"]
  node_ngo_login["NGO login form<br/>[login.php]"]
  node_ngo_auth["NGO authentication"]
  node_vol_login["Volunteer login form"]
  node_vol_auth["Volunteer authentication"]
  node_logout["Session logout<br/>[logout.php]"]
end

subgraph group_review["Report review"]
  node_ngo_dashboard["NGO dashboard<br/>[dashboard.php]"]
  node_report_list["All reports<br/>[view-reports.php]"]
  node_vol_dashboard["Volunteer dashboard"]
end

node_visitor(("Reporter"))
node_ngo_user(("NGO staff"))
node_volunteer_user(("Volunteer"))
node_home["Home page<br/>[index.html]"]

node_visitor -.->|"opens form"| node_report_form
node_report_form -->|"posts report"| node_report_submit
node_report_submit -->|"inserts report"| node_database
node_ngo_user -.->|"opens login"| node_ngo_login
node_ngo_login -->|"posts credentials"| node_ngo_auth
node_ngo_auth -->|"checks account"| node_database
node_ngo_auth -->|"redirects on success"| node_ngo_dashboard
node_volunteer_user -.->|"opens login"| node_vol_login
node_vol_login -->|"posts credentials"| node_vol_auth
node_vol_auth -->|"checks account"| node_database
node_vol_auth -->|"redirects on success"| node_vol_dashboard
node_ngo_dashboard -->|"queries reports"| node_database
node_report_list -->|"queries reports"| node_database
node_vol_dashboard -->|"queries reports"| node_database
node_ngo_dashboard -->|"links logout"| node_logout
node_vol_dashboard -->|"links logout"| node_logout
node_logout -->|"redirects home"| node_home

click node_home "https://github.com/shivaram083/dog-rescue-management/blob/main/index.html"
click node_report_form "https://github.com/shivaram083/dog-rescue-management/blob/main/report.php"
click node_report_submit "https://github.com/shivaram083/dog-rescue-management/blob/main/submit-report.php"
click node_database "https://github.com/shivaram083/dog-rescue-management/blob/main/db.php"
click node_ngo_login "https://github.com/shivaram083/dog-rescue-management/blob/main/login.php"
click node_ngo_auth "https://github.com/shivaram083/dog-rescue-management/blob/main/ngo-login-process.php"
click node_vol_login "https://github.com/shivaram083/dog-rescue-management/blob/main/volunteer-login.php"
click node_vol_auth "https://github.com/shivaram083/dog-rescue-management/blob/main/volunteer-login-check.php"
click node_logout "https://github.com/shivaram083/dog-rescue-management/blob/main/logout.php"
click node_ngo_dashboard "https://github.com/shivaram083/dog-rescue-management/blob/main/dashboard.php"
click node_report_list "https://github.com/shivaram083/dog-rescue-management/blob/main/view-reports.php"
click node_vol_dashboard "https://github.com/shivaram083/dog-rescue-management/blob/main/volunteer-dashboard.php"

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_report_form,node_report_submit,node_database toneBlue
class node_ngo_login,node_ngo_auth,node_vol_login,node_vol_auth,node_logout toneAmber
class node_ngo_dashboard,node_report_list,node_vol_dashboard toneMint
class node_visitor,node_ngo_user,node_volunteer_user toneIndigo
class node_home toneTeal
```

## Components

### Rescue reporting

- [Report form](https://github.com/shivaram083/dog-rescue-management/blob/main/report.php): `report.php`
- [Report submission](https://github.com/shivaram083/dog-rescue-management/blob/main/submit-report.php): `submit-report.php`
- [MySQL database](https://github.com/shivaram083/dog-rescue-management/blob/main/db.php): `db.php`

### Role access

- [NGO login form](https://github.com/shivaram083/dog-rescue-management/blob/main/login.php): `login.php`
- [NGO authentication](https://github.com/shivaram083/dog-rescue-management/blob/main/ngo-login-process.php): `ngo-login-process.php`
- [Volunteer login form](https://github.com/shivaram083/dog-rescue-management/blob/main/volunteer-login.php): `volunteer-login.php`
- [Volunteer authentication](https://github.com/shivaram083/dog-rescue-management/blob/main/volunteer-login-check.php): `volunteer-login-check.php`
- [Session logout](https://github.com/shivaram083/dog-rescue-management/blob/main/logout.php): `logout.php`

### Report review

- [NGO dashboard](https://github.com/shivaram083/dog-rescue-management/blob/main/dashboard.php): `dashboard.php`
- [All reports](https://github.com/shivaram083/dog-rescue-management/blob/main/view-reports.php): `view-reports.php`
- [Volunteer dashboard](https://github.com/shivaram083/dog-rescue-management/blob/main/volunteer-dashboard.php): `volunteer-dashboard.php`

### Other components

- **Reporter**
- **NGO staff**
- **Volunteer**
- [Home page](https://github.com/shivaram083/dog-rescue-management/blob/main/index.html): `index.html`

## Connections

- Reporter → Report form: opens form
- Report form → Report submission: posts report (evidence: `report.php`)
- Report submission → MySQL database: inserts report (evidence: `submit-report.php`)
- NGO staff → NGO login form: opens login
- NGO login form → NGO authentication: posts credentials (evidence: `login.php`)
- NGO authentication → MySQL database: checks account (evidence: `ngo-login-process.php`)
- NGO authentication → NGO dashboard: redirects on success (evidence: `ngo-login-process.php`)
- Volunteer → Volunteer login form: opens login
- Volunteer login form → Volunteer authentication: posts credentials (evidence: `volunteer-login.php`)
- Volunteer authentication → MySQL database: checks account (evidence: `volunteer-login-check.php`)
- Volunteer authentication → Volunteer dashboard: redirects on success (evidence: `volunteer-login-check.php`)
- NGO dashboard → MySQL database: queries reports (evidence: `dashboard.php`)
- All reports → MySQL database: queries reports (evidence: `view-reports.php`)
- Volunteer dashboard → MySQL database: queries reports (evidence: `volunteer-dashboard.php`)
- NGO dashboard → Session logout: links logout (evidence: `dashboard.php`)
- Volunteer dashboard → Session logout: links logout (evidence: `volunteer-dashboard.php`)
- Session logout → Home page: redirects home (evidence: `logout.php`)
