# abhay2003vyas/sih architecture

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

- Interactive diagram: https://gitdiagram.com/abhay2003vyas/sih
- Repository: https://github.com/abhay2003vyas/sih

## Overview

##### Project type and purpose
- From the file tree and README, this is a monolithic PHP-based web application (LAMP stack) named “SIH” that appears to implement a user signup/login flow, dynamic surveys (survey.php, survey1–7.php, process_S1–7.php), a scheme module (scheme.php, survey_schemes1–7.php), feedback collection, and an admin interface (Admin_php directory, dashboard.php, das.php).

##### File structure
- Top-level PHP entry points: index.html/2/3 (landing pages), login.php, signup.php, survey.php, feedback.php, contactus.html, unauthorized.php.
- Processing scripts: login_process.php, save_data.php, process_S*/process_p1.php.
- Admin area: Admin_php/, dashboard.php, das.php.
- Configuration: config.php, connection.php (database connection).
- Static assets: css/ (style.css, login.css), js/ (script.js, getUpdatedData.php for AJAX), img/.
- Package.json suggests possible Node tooling (maybe for JS build).
- No separate microservices—this is a single codebase serving both front and back.

##### README for additional insights
- README only contains a title, no architecture notes. All insight must come from file names and directory layout.

##### Detail
- Auth module (login.php, signup.php, login_process.php)
- Survey engine (survey*.php, process_S*.php, save_data.php)
- Scheme module (scheme.php, survey_schemes*.php)
- Feedback/contact (feedback.php, contactus.html)
- Admin console (Admin_php/, dashboard.php, das.php)
- How getUpdatedData.php and script.js collaborate for dynamic data updates
- Config.php/connection.php as the central DB connector for all server components

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    Browser["Web Browser"]:::client
    StaticAssets["Static Assets\n(css/, js/, img/)"]:::static
    Browser -->|"Load CSS/JS/Images"| StaticAssets
    Browser -->|"HTTP GET/POST"| WebServer

    %% AJAX Interaction
    script_js["script.js"]:::static
    Browser -->|"Executes JS"| script_js
    script_js -->|"AJAX JSON"| getUpdatedData["getUpdatedData.php"]:::ajax
    getUpdatedData -->|"SQL Query/Response"| Database

    %% Server Layer
    subgraph "Web Server + PHP Runtime"
        direction TB
        %% Configuration
        Config["config.php / connection.php"]:::app
        %% Authentication Module
        subgraph "Authentication Module"
            direction TB
            signup["signup.php"] 
            login["login.php"]
            login_process["login_process.php"]
            survey_login["survey_login.php"]
            unauthorized["unauthorized.php"]
        end
        %% Survey Engine
        subgraph "Survey Engine"
            direction TB
            survey_main["survey.php"]
            survey1["survey1.php"]
            survey2["survey2.php"]
            survey3["survey3.php"]
            survey4["survey4.php"]
            survey5["survey5.php"]
            survey6["survey6.php"]
            survey7["survey7.php"]
            process1["process_S1.php"]
            process2["process_S2.php"]
            process3["process_S3.php"]
            process4["process_S4.php"]
            process5["process_S5.php"]
            process6["process_S6.php"]
            process7["process_S7.php"]
            process_p1["process_p1.php"]
            save_data["save_data.php"]
        end
        %% Scheme Management
        subgraph "Scheme Management Module"
            direction TB
            scheme["scheme.php"]
            schemes1["survey_schemes1.php"]
            schemes2["survey_schemes2.php"]
            schemes3["survey_schemes3.php"]
            schemes4["survey_schemes4.php"]
            schemes5["survey_schemes5.php"]
            schemes6["survey_schemes6.php"]
            schemes7["survey_schemes7.php"]
        end
        %% Feedback & Contact
        subgraph "Feedback & Contact Module"
            direction TB
            feedback["feedback.php"]
            contactus["contactus.html"]
            rec["rec.html"]
        end
        %% Admin Console
        subgraph "Admin Console"
            direction TB
            AdminDir["Admin_php/"] 
            dashboard["dashboard.php"]
            das["das.php"]
        end

        %% Module -> Config
        signup & login & login_process & survey_login & unauthorized --> Config
        survey_main & survey1 & survey2 & survey3 & survey4 & survey5 & survey6 & survey7 & process1 & process2 & process3 & process4 & process5 & process6 & process7 & process_p1 & save_data --> Config
        scheme & schemes1 & schemes2 & schemes3 & schemes4 & schemes5 & schemes6 & schemes7 --> Config
        feedback & contactus & rec --> Config
        AdminDir & dashboard & das --> Config
    end

    %% Data Layer
    Database["MySQL / MariaDB Database"]:::db

    %% Server -> Database
    Config -->|"Central DB Connector"| Database
    signup & login & login_process & survey_login & unauthorized -->|"Auth Data Queries"| Database
    survey_main & survey1 & survey2 & survey3 & survey4 & survey5 & survey6 & survey7 & process1 & process2 & process3 & process4 & process5 & process6 & process7 & process_p1 & save_data -->|"Survey CRUD"| Database
    scheme & schemes1 & schemes2 & schemes3 & schemes4 & schemes5 & schemes6 & schemes7 -->|"Scheme CRUD"| Database
    feedback -->|"Store Feedback"| Database
    dashboard & das & AdminDir -->|"Admin Queries"| Database

    %% Styles
    classDef client fill:#D6EAF8,stroke:#1B4F72
    classDef static fill:#AED6F1,stroke:#1F618D
    classDef app fill:#A9DFBF,stroke:#196F3D
    classDef db fill:#F9E79F,stroke:#B9770E
    classDef ajax fill:#F5CBA7,stroke:#7D6608

    %% Click Events
    click signup "https://github.com/abhay2003vyas/sih/blob/main/signup.php"
    click login "https://github.com/abhay2003vyas/sih/blob/main/login.php"
    click login_process "https://github.com/abhay2003vyas/sih/blob/main/login_process.php"
    click survey_login "https://github.com/abhay2003vyas/sih/blob/main/survey_login.php"
    click unauthorized "https://github.com/abhay2003vyas/sih/blob/main/unauthorized.php"
    click survey_main "https://github.com/abhay2003vyas/sih/blob/main/survey.php"
    click survey1 "https://github.com/abhay2003vyas/sih/blob/main/survey1.php"
    click survey2 "https://github.com/abhay2003vyas/sih/blob/main/survey2.php"
    click survey3 "https://github.com/abhay2003vyas/sih/blob/main/survey3.php"
    click survey4 "https://github.com/abhay2003vyas/sih/blob/main/survey4.php"
    click survey5 "https://github.com/abhay2003vyas/sih/blob/main/survey5.php"
    click survey6 "https://github.com/abhay2003vyas/sih/blob/main/survey6.php"
    click survey7 "https://github.com/abhay2003vyas/sih/blob/main/survey7.php"
    click process1 "https://github.com/abhay2003vyas/sih/blob/main/process_S1.php"
    click process2 "https://github.com/abhay2003vyas/sih/blob/main/process_S2.php"
    click process3 "https://github.com/abhay2003vyas/sih/blob/main/process_S3.php"
    click process4 "https://github.com/abhay2003vyas/sih/blob/main/process_S4.php"
    click process5 "https://github.com/abhay2003vyas/sih/blob/main/process_S5.php"
    click process6 "https://github.com/abhay2003vyas/sih/blob/main/process_S6.php"
    click process7 "https://github.com/abhay2003vyas/sih/blob/main/process_S7.php"
    click process_p1 "https://github.com/abhay2003vyas/sih/blob/main/process_p1.php"
    click save_data "https://github.com/abhay2003vyas/sih/blob/main/save_data.php"
    click scheme "https://github.com/abhay2003vyas/sih/blob/main/scheme.php"
    click schemes1 "https://github.com/abhay2003vyas/sih/blob/main/survey_schemes1.php"
    click schemes2 "https://github.com/abhay2003vyas/sih/blob/main/survey_schemes2.php"
    click schemes3 "https://github.com/abhay2003vyas/sih/blob/main/survey_schemes3.php"
    click schemes4 "https://github.com/abhay2003vyas/sih/blob/main/survey_schemes4.php"
    click schemes5 "https://github.com/abhay2003vyas/sih/blob/main/survey_schemes5.php"
    click schemes6 "https://github.com/abhay2003vyas/sih/blob/main/survey_schemes6.php"
    click schemes7 "https://github.com/abhay2003vyas/sih/blob/main/survey_schemes7.php"
    click feedback "https://github.com/abhay2003vyas/sih/blob/main/feedback.php"
    click contactus "https://github.com/abhay2003vyas/sih/blob/main/contactus.html"
    click rec "https://github.com/abhay2003vyas/sih/blob/main/rec.html"
    click AdminDir "https://github.com/abhay2003vyas/sih/tree/main/Admin_php/"
    click dashboard "https://github.com/abhay2003vyas/sih/blob/main/dashboard.php"
    click das "https://github.com/abhay2003vyas/sih/blob/main/das.php"
    click getUpdatedData "https://github.com/abhay2003vyas/sih/blob/main/getUpdatedData.php"
    click script_js "https://github.com/abhay2003vyas/sih/blob/main/js/script.js"
```
