# coder-shubham02/digital-marketing-agency-web-site architecture

> Architecture diagram of the GitHub repository coder-shubham02/digital-marketing-agency-web-site, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/coder-shubham02/digital-marketing-agency-web-site
- Repository: https://github.com/coder-shubham02/digital-marketing-agency-web-site

## Overview

##### Project type and purpose
- Type: A monolithic, server-rendered PHP website (no separate SPA/frontend framework).
- Purpose: Serve marketing-focused pages (Home, About Us, Services, Contact) using reusable PHP “includes” for header, footer, navigation, and content sections.

##### File structure
- Root PHP pages (index.php, about-us.php, services.php, contact-us.php) act as entry points or “controllers.”
- includes/ folder holds reusable view components (header.php, footer.php, navigation.php, breadcrumb.php, plus sections/ subfolder).
- No database or external API subfolder—this is purely file-system based rendering.

##### README
- Title “Digital-Marketing-Agency-Web-Site” confirms a simple brochure-style website.
- No mention of a build tool, deployment pipeline, or data store.

a. Main components to include
- Client (Browser)
- Load Balancer or Reverse Proxy (optional)
- Web Server (Apache or Nginx) + PHP-FPM (PHP runtime)
- File System (application code + includes + static assets)
- Static Asset Server / CDN (optional)
- External Services (e.g., Google Analytics)

b. Relationships & data flow
1. Browser → HTTP GET → Load Balancer/Proxy → Web Server
2. Web Server invokes PHP runtime → reads .php page (e.g., services.php)
3. PHP script assembles view by including header.php, navigation.php, section_content_block.php, footer.php, etc., from includes/
4. PHP runtime returns generated HTML → Web Server → Browser
5. Browser parses HTML, requests linked CSS/JS/images from assets/
6. Optionally, Browser also loads Google Analytics script (external service call)

c. Architectural patterns & design principles
- Template Composition via PHP includes (promotes reuse, DRY)
- Monolithic deployment (single codebase on one or more web servers)
- Separation of concerns:
– Entry Points (root .php files)
– View Components (includes/)
– Static Assets (assets/, scripts/)

d. Key technologies & libraries
- PHP (server-side rendering)
- HTML/CSS/JavaScript
- jQuery, Owl-Carousel (carousel), custom animation.js & main.js
- CSS modules per page (about-us.css, contact-us.css, etc.)

## Diagram (Mermaid)

```mermaid
graph TD
    %% Client Layer
    Browser["Client (Browser)"]:::client

    %% Network Layer
    LoadBalancer["Load Balancer / Reverse Proxy"]:::server

    %% Server Layer
    WebServer["Web Server (Apache/Nginx)"]:::server
    PHPRuntime["PHP-FPM Runtime"]:::server

    %% Application File System
    subgraph "File System (Application Code)" 
        direction TB
        subgraph "Entry Points (Controllers)"
            direction TB
            HomePage["index.php"] 
            AboutPage["about-us.php"]
            ServicesPage["services.php"]
            ContactPage["contact-us.php"]
        end

        subgraph "View Components (PHP Includes)"
            direction TB
            Header["header.php"]
            Navigation["navigation.php"]
            Breadcrumb["breadcrumb.php"]
            Footer["footer.php"]
            subgraph "Sections"
                direction TB
                SectionBlock["section_content_block.php"]
                AskButton["ask_button.php"]
                ContactForm["contact_form.php"]
                CaseStudies["our_case_studies.php"]
                ServiceOfferings["service_offerings_section.php"]
            end
        end
    end

    %% Static Assets
    subgraph "Static Assets"
        direction TB
        subgraph "Icons"
            IconsDir["assets/icons/"]
        end
        subgraph "Images"
            ImagesDir["assets/images/"]
        end
        subgraph "Stylesheets"
            StyleGlobal["style.css"]
            AboutStyle["about-us.css"]
            ServicesStyle["services.css"]
            ContactStyle["contact-us.css"]
            FooterStyle["footer.css"]
            CarouselStyle["owl-carousel.css"]
        end
        subgraph "Scripts"
            JQuery["jquery.js"]
            CarouselJS["owl-carousel.js"]
            AnimationJS["animation.js"]
            MainJS["main.js"]
        end
    end

    %% Documentation
    README["README.md"]:::fs

    %% External Services
    Analytics["Google Analytics"]:::external

    %% Flows
    Browser -->|"HTTP GET /index.php"| LoadBalancer
    LoadBalancer -->|"Forward Request"| WebServer
    WebServer -->|"Invoke"| PHPRuntime
    PHPRuntime -->|"Read Entry Point"| HomePage
    PHPRuntime -->|"Include header.php"| Header
    PHPRuntime -->|"Include navigation.php"| Navigation
    PHPRuntime -->|"Include breadcrumb.php"| Breadcrumb
    PHPRuntime -->|"Include section_content_block.php"| SectionBlock
    PHPRuntime -->|"Include footer.php"| Footer
    PHPRuntime -->|"Render HTML"| WebServer
    WebServer -->|"HTTP Response"| Browser

    Browser -->|"GET CSS/JS/Images"| IconsDir
    Browser --> IconsDir
    Browser --> ImagesDir
    Browser --> StyleGlobal
    Browser --> AboutStyle
    Browser --> ServicesStyle
    Browser --> ContactStyle
    Browser --> FooterStyle
    Browser --> CarouselStyle
    Browser --> JQuery
    Browser --> CarouselJS
    Browser --> AnimationJS
    Browser --> MainJS

    Browser -->|"Load Analytics Script"| Analytics

    %% Click Events
    click HomePage "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/index.php"
    click AboutPage "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/about-us.php"
    click ServicesPage "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/services.php"
    click ContactPage "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/contact-us.php"
    click Header "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/includes/header.php"
    click Navigation "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/includes/navigation.php"
    click Breadcrumb "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/includes/breadcrumb.php"
    click Footer "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/includes/footer.php"
    click SectionBlock "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/includes/sections/section_content_block.php"
    click AskButton "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/includes/sections/ask_button.php"
    click ContactForm "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/includes/sections/contact_form.php"
    click CaseStudies "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/includes/sections/our_case_studies.php"
    click ServiceOfferings "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/includes/sections/service_offerings_section.php"
    click IconsDir "https://github.com/coder-shubham02/digital-marketing-agency-web-site/tree/main/assets/icons/"
    click ImagesDir "https://github.com/coder-shubham02/digital-marketing-agency-web-site/tree/main/assets/images/"
    click StyleGlobal "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/assets/stylesheets/style.css"
    click AboutStyle "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/assets/stylesheets/about-us.css"
    click ServicesStyle "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/assets/stylesheets/services.css"
    click ContactStyle "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/assets/stylesheets/contact-us.css"
    click FooterStyle "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/assets/stylesheets/footer.css"
    click CarouselStyle "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/assets/stylesheets/owl-carousel.css"
    click JQuery "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/scripts/jquery.js"
    click CarouselJS "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/scripts/owl-carousel.js"
    click AnimationJS "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/scripts/animation.js"
    click MainJS "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/scripts/main.js"
    click README "https://github.com/coder-shubham02/digital-marketing-agency-web-site/blob/main/README.md"

    %% Styles
    classDef client fill:#8fd3f4,stroke:#333,stroke-width:1px
    classDef server fill:#f4d38f,stroke:#333,stroke-width:1px
    classDef fs fill:#d3f48f,stroke:#333,stroke-width:1px
    classDef assets fill:#d38ff4,stroke:#333,stroke-width:1px
    classDef external fill:#f48f8f,stroke:#333,stroke-width:1px
```
