# rahulraj22/tedxiitgandhinagar architecture

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

- Interactive diagram: https://gitdiagram.com/rahulraj22/tedxiitgandhinagar
- Repository: https://github.com/rahulraj22/tedxiitgandhinagar

## Overview

##### Project type and purpose
- From the file tree and README, this is a monolithic event-site built with static HTML, CSS, JS plus PHP server-side scripts. It serves as the official TEDxIITGandhinagar website and includes an online registration flow integrated with a payment gateway.

##### File structure
- Top-level artifacts:
- .html and .php pages at root – entry points (index.html, index.php, registeration.html, schedule.html, etc.)
- db.php – database connection logic
- payment_process.php – payment gateway integration
- thank_you.php – post-payment confirmation
- package.json / package-lock.json – suggests use of Node for build or tooling (maybe for bundling assets)

##### Readme insights
- Confirms “official website” with “payment gateway for online registration.”

##### Main components
a. Client browser (web & mobile users)
b. Web server (Apache / PHP runtime) hosting:
- Static asset server (serving CSS, JS, images)
- PHP application layer (db.php, payment_process.php, page templates)
c. Relational database (MySQL or similar) accessed via db.php
d. External payment gateway (third-party API)
e. Hosting environment (000webhostapp.com or your chosen IaaS)

##### Relationships and interactions
1. Client → HTTP GET /index.html (or .php) → Web server serves static/templated page
2. Client fills registration form → HTTP POST → payment_process.php
3. payment_process.php:
- calls db.php to record preliminary registration
- issues API call to payment gateway
- upon callback, updates DB and redirects to thank_you.php
4. Client gets confirmation page
5. All static assets loaded via same server or CDN

##### Architectural patterns & design principles
- Monolith MVC-lite:
- “V” = .html/.php pages
- “C” = payment_process.php, form handlers
- “M” = MySQL abstraction in db.php
- Clear separation of static assets vs. dynamic endpoints
- External integration point: payment API

##### Technologies & frameworks to annotate
- Frontend: HTML5, CSS3, vanilla JS
- Backend: PHP 7+, Apache/Nginx
- Database: MySQL / MariaDB
- Payment Gateway: (e.g., Stripe/PayPal – specify whichever)
- Hosting: 000webhostapp or similar shared host

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client-side
    subgraph "Client (Browser)" 
        direction TB
        Browser["User Browser"]:::client
        subgraph "Pages" 
            direction TB
            IndexHTML["index.html"]:::view
            IndexPHP["index.php"]:::view
            Reg["registeration.html"]:::view
            Sch["schedule.html"]:::view
            Team["team.html"]:::view
            Prev["previous.html"]:::view
        end
    end

    %% Web Server
    subgraph "Web Server (Apache/PHP)" 
        direction TB
        subgraph "Static Asset Server"
            direction TB
            CSS["CSS Files"]:::static
            JS["JS Files"]:::static
            IMG["Images & Icons"]:::static
        end
        subgraph "PHP Application"
            direction TB
            DBconn["db.php"]:::backend
            PayProc["payment_process.php"]:::backend
            Thank["thank_you.php"]:::backend
        end
        PKG["package.json / package-lock.json"]:::tooling
    end

    %% Database
    DB["MySQL / MariaDB"]:::db

    %% External Service
    Gateway["Payment Gateway API"]:::external

    %% Flows
    Browser -->|"GET /index.html"| IndexHTML
    Browser -->|"GET /index.php"| IndexPHP
    Browser -->|"GET /registeration.html"| Reg
    Browser -->|"GET /schedule.html"| Sch
    Browser -->|"GET /team.html"| Team
    Browser -->|"GET /previous.html"| Prev

    IndexHTML -->|"loads"| CSS
    IndexHTML -->|"loads"| JS
    IndexHTML -->|"loads"| IMG

    Reg -->|"loads"| CSS
    Reg -->|"loads"| JS
    Reg -->|"loads"| IMG

    Sch -->|"loads"| CSS
    Sch -->|"loads"| JS
    Sch -->|"loads"| IMG

    Team -->|"loads"| CSS
    Team -->|"loads"| JS
    Team -->|"loads"| IMG

    Prev -->|"loads"| CSS
    Prev -->|"loads"| JS
    Prev -->|"loads"| IMG

    Reg -->|"POST registration"| PayProc
    PayProc -->|"uses"| DBconn
    DBconn -->|"SQL SELECT/INSERT"| DB
    PayProc -->|"API POST"| Gateway
    Gateway -->|"callback"| PayProc
    PayProc -->|"redirect"| Thank
    Thank -->|"renders"| Browser

    PKG -->|"build assets"| CSS
    PKG -->|"build assets"| JS

    %% Click Events
    click CSS "https://github.com/rahulraj22/tedxiitgandhinagar/tree/main/Assests/CSS/"
    click JS "https://github.com/rahulraj22/tedxiitgandhinagar/tree/main/Assests/JS/"
    click IMG "https://github.com/rahulraj22/tedxiitgandhinagar/tree/main/Assests/img/"
    click IndexHTML "https://github.com/rahulraj22/tedxiitgandhinagar/blob/main/index.html"
    click IndexPHP "https://github.com/rahulraj22/tedxiitgandhinagar/blob/main/index.php"
    click Reg "https://github.com/rahulraj22/tedxiitgandhinagar/blob/main/registeration.html"
    click Sch "https://github.com/rahulraj22/tedxiitgandhinagar/blob/main/schedule.html"
    click Team "https://github.com/rahulraj22/tedxiitgandhinagar/blob/main/team.html"
    click Prev "https://github.com/rahulraj22/tedxiitgandhinagar/blob/main/previous.html"
    click DBconn "https://github.com/rahulraj22/tedxiitgandhinagar/blob/main/db.php"
    click PayProc "https://github.com/rahulraj22/tedxiitgandhinagar/blob/main/payment_process.php"
    click Thank "https://github.com/rahulraj22/tedxiitgandhinagar/blob/main/thank_you.php"
    click PKG "https://github.com/rahulraj22/tedxiitgandhinagar/blob/main/package.json"

    %% Styles
    classDef client fill:#add8e6,stroke:#000,stroke-width:1px
    classDef view fill:#e0ffff,stroke:#000,stroke-width:1px
    classDef static fill:#98fb98,stroke:#000,stroke-width:1px
    classDef backend fill:#90ee90,stroke:#000,stroke-width:1px
    classDef db fill:#fafad2,stroke:#000,stroke-width:1px
    classDef external fill:#ffd580,stroke:#000,stroke-width:1px
    classDef tooling fill:#d3d3d3,stroke:#000,stroke-width:1px
    classDef server fill:#90ee90,stroke:#000,stroke-width:2px
    classDef client fill:#add8e6,stroke:#000,stroke-width:2px
```
