# 31133498/ilmeen architecture

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

- Interactive diagram: https://gitdiagram.com/31133498/ilmeen
- Repository: https://github.com/31133498/ilmeen

## Overview

##### Project type and purpose
- This is a full-stack web project with two main halves:
- A React/Vite-powered static landing page (written in TypeScript, under src/ + public/)
- A Django REST API backend (under backend/, with core/ and users/ apps)
- The landing page is deployed to Vercel as a static site, while the backend runs as a separate server talking to a relational database.

##### File structure
- Top-level directories:
- backend/ → Django project and apps (core, users), manage.py, settings, URLs, migrations
- public/ → static assets (images, optional recitation.mp3), served directly
- src/ → React/Vite app (App.tsx, components, styling)
- scripts/ → helper for downloading remote assets
- Configuration files: package.json, tsconfig.json, vercel.json, backend/requirements.txt
- Patterns:
- Django’s MVC-style (models, serializers, views, URLs)
- React component hierarchy under src/components
- Static-asset pipeline via Vite → dist/ → Vercel

##### Main system components
- End-user’s Browser
- Vercel Static Hosting (serves the compiled React app from dist/)
- React Frontend (UI, audio toggle, responsive sections: Hero, Problem/Solution, CTA, etc.)
- Public Assets (images in public/assets or remote Unsplash URLs; optional recitation.mp3)
- Django Backend Server
- ASGI/WSGI entrypoints (asgi.py, wsgi.py)
- core app (models, serializers, views, URLs)
- users app (authentication, signals, serializers, views)
- Relational Database (PostgreSQL/MySQL/SQLite configured in settings.py)
- External CDN (Unsplash for remote images)
- Build & Deployment Tools (npm/Vite, pip, PowerShell script, Vercel)

##### Relationships and data flows
- Browser → Vercel: HTTP GET index.html + JS/CSS bundles → React app boots
- React app → public/assets or Unsplash: loads images and audio
- React app (optionally) → Django API endpoints at /api/core/ and /api/users/ (via fetch/Axios)
- Django → Database: read/write core and user data
- scripts/download-assets.ps1 → populates public/assets before build
- npm run build → dist/ → deployed by Vercel
- pip install & manage.py migrate → backend database schema

##### Architectural patterns & design principles
- Separation of concerns:
- Frontend SPA vs. backend REST API
- Static asset hosting vs. dynamic data service
- Component-based design in React (reusable UI sections)
- Django’s MVC (models, serializers, views, URL routing)
- Infrastructure as code: vercel.json for static site routing/build config
- Mobile-first responsive layout in CSS (App.css, style.css)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Client"
        Browser["End-user Browser"]:::external
    end

    subgraph "Static Hosting"
        Vercel["Vercel CDN"]:::static
    end

    subgraph "Frontend Layer"
        ReactApp["React App (SPA)"]:::frontend
        subgraph "React Source"
            Main["src/main.tsx"]:::frontend
            AppTS["src/main.ts"]:::frontend
            AppComp["src/App.tsx"]:::frontend
            AppCSS["src/App.css"]:::frontend
            StyleCSS["src/style.css"]:::frontend
        end
        subgraph "Components"
            AudioToggle["src/AudioToggle.tsx"]:::frontend
            Showcase["src/Showcase.tsx"]:::frontend
            AppPreview["src/components/AppPreview.tsx"]:::frontend
            HowItHelps["src/components/HowItHelps.tsx"]:::frontend
            ImpactVision["src/components/ImpactVision.tsx"]:::frontend
            WhoWeServe["src/components/WhoWeServe.tsx"]:::frontend
            WhyIlmeen["src/components/WhyIlmeen.tsx"]:::frontend
        end
        HTML["index.html"]:::static
    end

    PublicAssets["public/assets/"]:::static
    Unsplash["Unsplash CDN"]:::external

    subgraph "Build & Deployment"
        DownloadScript["scripts/download-assets.ps1"]:::pipeline
        PackageJSON["package.json"]:::pipeline
        PackageLock["package-lock.json"]:::pipeline
        TSConfig["tsconfig.json"]:::pipeline
        VercelConfig["vercel.json"]:::pipeline
    end

    subgraph "Backend Server"
        ManagePy["backend/manage.py"]:::backend
        ASGI["backend/backend/asgi.py"]:::backend
        WSGI["backend/backend/wsgi.py"]:::backend
        Settings["backend/backend/settings.py"]:::backend
        URLs["backend/backend/urls.py"]:::backend
        Requirements["backend/requirements.txt"]:::backend

        subgraph "Core App"
            CoreModels["backend/core/models.py"]:::backend
            CoreSerializers["backend/core/serializers.py"]:::backend
            CoreViews["backend/core/views.py"]:::backend
            CoreURLs["backend/core/urls.py"]:::backend
            CoreMigrations["backend/core/migrations/"]:::backend
        end

        subgraph "Users App"
            UsersModels["backend/users/models.py"]:::backend
            UsersSerializers["backend/users/serializers.py"]:::backend
            UsersViews["backend/users/views.py"]:::backend
            UsersURLs["backend/users/urls.py"]:::backend
            UsersSignals["backend/users/signals.py"]:::backend
            UsersMigrations["backend/users/migrations/"]:::backend
        end
    end

    DB["Relational Database"]:::db

    %% Runtime Flows
    Browser -->|GET index.html| Vercel
    Vercel -->|serves index.html + JS/CSS| Browser
    Browser -->|requests bundles| Vercel
    ReactApp -->|loads| PublicAssets
    ReactApp -->|loads| Unsplash
    ReactApp -->|"REST API call"| CoreURLs
    ReactApp -->|"REST API call"| UsersURLs
    CoreURLs --> CoreViews
    CoreViews --> CoreSerializers
    CoreSerializers --> CoreModels
    CoreModels --> DB
    UsersURLs --> UsersViews
    UsersViews --> UsersSerializers
    UsersSerializers --> UsersModels
    UsersModels --> DB

    %% Build Pipelines
    DownloadScript --> PublicAssets
    PackageJSON --> ReactApp
    TSConfig --> ReactApp
    VercelConfig --> Vercel
    Requirements -->|pip install| ManagePy
    ManagePy -->|migrate| DB

    %% Build & Deploy connections
    ReactApp -->|npm run build → dist| Vercel

    %% Backend wiring
    ManagePy --> ASGI
    ASGI --> URLs
    URLs --> CoreURLs
    URLs --> UsersURLs

    %% Click Events
    click Main "https://github.com/31133498/ilmeen/blob/main/src/main.tsx"
    click AppTS "https://github.com/31133498/ilmeen/blob/main/src/main.ts"
    click AppComp "https://github.com/31133498/ilmeen/blob/main/src/App.tsx"
    click AppCSS "https://github.com/31133498/ilmeen/blob/main/src/App.css"
    click StyleCSS "https://github.com/31133498/ilmeen/blob/main/src/style.css"
    click AudioToggle "https://github.com/31133498/ilmeen/blob/main/src/AudioToggle.tsx"
    click Showcase "https://github.com/31133498/ilmeen/blob/main/src/Showcase.tsx"
    click AppPreview "https://github.com/31133498/ilmeen/blob/main/src/components/AppPreview.tsx"
    click HowItHelps "https://github.com/31133498/ilmeen/blob/main/src/components/HowItHelps.tsx"
    click ImpactVision "https://github.com/31133498/ilmeen/blob/main/src/components/ImpactVision.tsx"
    click WhoWeServe "https://github.com/31133498/ilmeen/blob/main/src/components/WhoWeServe.tsx"
    click WhyIlmeen "https://github.com/31133498/ilmeen/blob/main/src/components/WhyIlmeen.tsx"
    click HTML "https://github.com/31133498/ilmeen/blob/main/index.html"
    click PublicAssets "https://github.com/31133498/ilmeen/tree/main/public/assets/"
    click DownloadScript "https://github.com/31133498/ilmeen/blob/main/scripts/download-assets.ps1"
    click PackageJSON "https://github.com/31133498/ilmeen/blob/main/package.json"
    click PackageLock "https://github.com/31133498/ilmeen/blob/main/package-lock.json"
    click TSConfig "https://github.com/31133498/ilmeen/blob/main/tsconfig.json"
    click VercelConfig "https://github.com/31133498/ilmeen/blob/main/vercel.json"
    click ManagePy "https://github.com/31133498/ilmeen/blob/main/backend/manage.py"
    click ASGI "https://github.com/31133498/ilmeen/blob/main/backend/backend/asgi.py"
    click WSGI "https://github.com/31133498/ilmeen/blob/main/backend/backend/wsgi.py"
    click Settings "https://github.com/31133498/ilmeen/blob/main/backend/backend/settings.py"
    click URLs "https://github.com/31133498/ilmeen/blob/main/backend/backend/urls.py"
    click Requirements "https://github.com/31133498/ilmeen/blob/main/backend/requirements.txt"
    click CoreModels "https://github.com/31133498/ilmeen/blob/main/backend/core/models.py"
    click CoreSerializers "https://github.com/31133498/ilmeen/blob/main/backend/core/serializers.py"
    click CoreViews "https://github.com/31133498/ilmeen/blob/main/backend/core/views.py"
    click CoreURLs "https://github.com/31133498/ilmeen/blob/main/backend/core/urls.py"
    click CoreMigrations "https://github.com/31133498/ilmeen/tree/main/backend/core/migrations/"
    click UsersModels "https://github.com/31133498/ilmeen/blob/main/backend/users/models.py"
    click UsersSerializers "https://github.com/31133498/ilmeen/blob/main/backend/users/serializers.py"
    click UsersViews "https://github.com/31133498/ilmeen/blob/main/backend/users/views.py"
    click UsersURLs "https://github.com/31133498/ilmeen/blob/main/backend/users/urls.py"
    click UsersSignals "https://github.com/31133498/ilmeen/blob/main/backend/users/signals.py"
    click UsersMigrations "https://github.com/31133498/ilmeen/tree/main/backend/users/migrations/"

    %% Styles
    classDef frontend fill:#B3D4FC,stroke:#0366D6,color:#0366D6
    classDef backend fill:#D6EFD6,stroke:#228B22,color:#228B22
    classDef static fill:#F0E68C,stroke:#DAA520,color:#DAA520
    classDef external fill:#DDDDDD,stroke:#888888,color:#888888
    classDef pipeline fill:#F5D0A9,stroke:#E67E22,color:#E67E22
    classDef db fill:#FFE4E1,stroke:#DC143C,color:#DC143C
```
