# haqem/haqemdotcom architecture

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

- Interactive diagram: https://gitdiagram.com/haqem/haqemdotcom
- Repository: https://github.com/haqem/haqemdotcom

## Overview

##### Project type and purpose
- This is a mono-repository of multiple web projects and libraries maintained under “haqemdotcom.”
- It contains:
- Several static‐site front-end mini-apps (bio-link, mobile-apps)
- Two lightweight dynamic utilities (prayer-time in PHP, cgpa-processor in Node)
- Third-party library source trees (Bootstrap, cookieconsent)
- The root README simply advertises a jsDelivr CDN entry for hosting these assets.

##### File structure
- Top‐level directories:
- bio-link – static HTML/CSS/JS mini-site for link landing pages
- bootstrap – full source of the Bootstrap framework (build scripts, Sass, JS source, dist, docs, CI workflows)
- cookieconsent – standalone JS/CSS library
- files/cgpa-processor – Node.js app with controllers & per-university scraper services
- mobile-apps – collection of front-end JS components styled like Bootstrap but isolated for mobile demos
- prayer-time – PHP endpoint and JSON data file for prayer-time lookup
- Bootstrap has its own CI/CD (GitHub Actions workflows) to lint, build, version bump, publish to npm/Gem/nuget and GitHub Pages.
- cgpa-processor is structured like an Express app (app.js, controllers, services) but may be deployed as a simple serverless function or Node server.
- prayer-time is a pair of PHP scripts plus a JSON file (deployed to a PHP-capable web host).
- Shared config files (ESLint, Babel, stylelint, etc.) govern linting across the front-end code.

##### README for additional insights
- This repository’s main role is to provide assets and small utilities, not a monolithic web application.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "GitHub"
        Repo["haqemdotcom Mono-Repo\n(README.md)"]:::repo
    end

    subgraph "CI/CD"
        CI["CI/CD Service\n(GitHub Actions)"]:::ci
    end

    subgraph "Monorepo Modules"
        Assets["Static Shared Assets"]:::assets
        Bio["Bio-link Mini-site"]:::static
        Mobile["Mobile-apps Demos"]:::static
        Cookie["Cookieconsent Library"]:::static

        subgraph "Bootstrap Framework"
            BSrc["Source & Build Config"]:::lib
            BCI["CI Workflows"]:::ci
            BDist["Build Output (dist)"]:::artifact
            BSite["Documentation Site"]:::artifact
        end

        subgraph "CGPA-processor Service"
            App["app.js"]:::dynamic
            Ctrl["controllers/cgpaCtrl.js"]:::dynamic
            Services["services/*.js"]:::dynamic
        end

        subgraph "Prayer-time PHP API"
            Api["api.php"]:::dynamic
            Data["zone.json"]:::dynamic
            Fetcher["zonefetcher.php"]:::dynamic
        end
    end

    subgraph "Hosting & Delivery"
        CDN["jsDelivr CDN"]:::cdn
        Pages["GitHub Pages"]:::cdn
    end

    Users["End Users\n(Web Browsers)"]:::user

    Repo -->|push code| CI
    CI -->|runs on bootstrap/| BCI
    BCI -->|build| BSrc
    BSrc -->|output dist| BDist
    BSrc -->|output site| BSite

    Repo --> Assets
    Repo --> Bio
    Repo --> Mobile
    Repo --> Cookie
    Repo --> App
    Repo --> Api
    Repo --> Data
    Repo --> Fetcher

    Assets -->|served via| CDN
    Bio -->|served via| CDN
    Mobile -->|served via| CDN
    Cookie -->|served via| CDN
    BDist -->|served via| CDN
    BSite -->|served via| Pages

    CDN --> Users
    Pages --> Users

    Users -->|requests| Api
    Api -->|reads| Data
    Api -->|uses| Fetcher
    Api -->|responds| Users

    Users -->|requests| App
    App --> Ctrl
    App --> Services
    App -->|responds| Users

    click Repo "https://github.com/haqem/haqemdotcom/blob/main/README.md"
    click Assets "https://github.com/haqem/haqemdotcom/tree/main/assets/icon"
    click Bio "https://github.com/haqem/haqemdotcom/tree/main/bio-link/springleaf"
    click Mobile "https://github.com/haqem/haqemdotcom/tree/main/mobile-apps"
    click Cookie "https://github.com/haqem/haqemdotcom/tree/main/cookieconsent"
    click BSrc "https://github.com/haqem/haqemdotcom/tree/main/bootstrap/"
    click BCI "https://github.com/haqem/haqemdotcom/tree/main/bootstrap/.github/workflows"
    click BDist "https://github.com/haqem/haqemdotcom/tree/main/bootstrap/dist"
    click BSite "https://github.com/haqem/haqemdotcom/tree/main/bootstrap/site"
    click App "https://github.com/haqem/haqemdotcom/blob/main/files/cgpa-proccessor/app/app.js"
    click Ctrl "https://github.com/haqem/haqemdotcom/blob/main/files/cgpa-proccessor/app/controllers/cgpaCtrl.js"
    click Services "https://github.com/haqem/haqemdotcom/tree/main/files/cgpa-proccessor/app/services"
    click Api "https://github.com/haqem/haqemdotcom/blob/main/prayer-time/api.php"
    click Data "https://github.com/haqem/haqemdotcom/blob/main/prayer-time/zone.json"
    click Fetcher "https://github.com/haqem/haqemdotcom/blob/main/prayer-time/zonefetcher.php"

    classDef repo fill:#f9f,stroke:#333,stroke-width:1px
    classDef ci fill:#ff9,stroke:#333,stroke-width:1px
    classDef assets fill:#9cf,stroke:#333,stroke-width:1px
    classDef static fill:#ccf,stroke:#333,stroke-width:1px
    classDef lib fill:#cfc,stroke:#333,stroke-width:1px
    classDef artifact fill:#fc9,stroke:#333,stroke-width:1px
    classDef dynamic fill:#f99,stroke:#333,stroke-width:1px
    classDef cdn fill:#9f9,stroke:#333,stroke-width:1px
    classDef user fill:#eee,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
```
