# farhan9684/eduskill-knowledge-hub-brain-booster architecture

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

- Interactive diagram: https://gitdiagram.com/farhan9684/eduskill-knowledge-hub-brain-booster
- Repository: https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster

## Overview

##### Project Type and Purpose
- This is a full-stack, monolithic web application built on Django (MTV pattern)
- Purpose: an educational platform (“Edu-Skill”) providing course content, quizzes, video tutorials, and doubt resolution

##### File Structure
- Top-level Django project (“main”) contains settings, URL routing, ASGI/WSGI entry points
- Four Django apps under the project root:
– app1: core features (models, views, admin)
– reviews: interactive quizzes & feedback submission
– service: doubt resolution/contact form
– main: authentication, site pages, routing
- Static folder: CSS, JS, images, sample papers
- Templates folder: HTML templates used by each app
- SQLite database file (db.sqlite3)

##### README for Additional Insights
- Features: courses, quizzes, video tutorials, doubt submission
- Fully responsive design for desktop/tablet/mobile
- Implies server‐side rendering + static assets

##### Main Components & Responsibilities
a. Client (Browser/Mobile App)
– Requests HTML pages, submits forms (quizzes, reviews, doubts)
– Fetches static assets (CSS, JS, images)
b. Load Balancer / Web Server
c. Django Application Server (Gunicorn / Uvicorn)
– ASGI/WGSI entry point (main/asgi.py or wsgi.py)
– URL router (main/urls.py) dispatches to app1, reviews, service, main views
– Views execute business logic, render templates, or serialize JSON
d. Django MTV Layers
– Models (app1/models.py, reviews/models.py, service/models.py) → ORM
– Templates (templates/*.html) → presentation
– Forms (main/forms.py, reviews/forms.py) → user input validation
e. Database
– SQLite (db.sqlite3)
– Django ORM issues SQL and retrieves/stores data
f. Static Asset Server
– Serves files from static/ directory

##### Relationships & Data Flows
- Browser → (HTTP) → Load Balancer/Web Server → Django ASGI/WSGI
- In Django:
1. URL Router → appropriate App’s View
2. View ↔ Model (ORM) → Database
3. View → Template Engine → HTML
4. HTML + Static Assets → Browser
- For form submissions (quizzes, reviews, doubts): Browser → POST → View → save to DB → redirect/response

##### Architectural Patterns
- Django’s MVC (MTV) pattern
- Modular apps for separation of concerns (courses, reviews, services)
- Monolithic deployment (all apps in a single codebase + single DB)

##### Technologies & Frameworks to Call Out
- Python 3.x, Django framework
- SQLite (development DB)
- HTML5/CSS3/JavaScript for front end
- Django templating engine
- (Optional) Nginx/Gunicorn or Uvicorn for ASGI

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Layers
    Browser["Browser (Client)"]:::frontend
    Nginx["Nginx / Web Server"]:::backend
    Gunicorn["Gunicorn/Uvicorn (WSGI/ASGI)"]:::backend
    ASGI["ASGI Entry Point\nmain/asgi.py"]:::backend
    WSGI["WSGI Entry Point\nmain/wsgi.py"]:::backend
    Router["URL Router\nmain/urls.py"]:::backend
    Settings["Django Settings\nmain/settings.py"]:::backend

    subgraph "Django Application"
        direction TB
        Router
        subgraph "App Modules"
            direction TB
            subgraph "Core App (app1)"
                direction TB
                CoreModels["Models\napp1/models.py"]:::backend
                CoreViews["Views\napp1/views.py"]:::backend
                CoreAdmin["Admin\napp1/admin.py"]:::backend
            end
            subgraph "Reviews App"
                direction TB
                ReviewsModels["Models\nreviews/models.py"]:::backend
                ReviewsViews["Views\nreviews/views.py"]:::backend
                ReviewsForms["Forms\nreviews/forms.py"]:::backend
                ReviewsAdmin["Admin\nreviews/admin.py"]:::backend
            end
            subgraph "Service App"
                direction TB
                ServiceModels["Models\nservice/models.py"]:::backend
                ServiceViews["Views\nservice/views.py"]:::backend
                ServiceAdmin["Admin\nservice/admin.py"]:::backend
            end
            subgraph "Main App"
                direction TB
                MainViews["Views\nmain/views.py"]:::backend
                MainForms["Forms\nmain/forms.py"]:::backend
            end
        end
        ORM["Django ORM"]:::backend
        DB["SQLite Database\ndb.sqlite3"]:::database
    end

    Static["Static Assets\nstatic/"]:::frontend
    Templates["Templates\ntemplates/"]:::frontend

    %% Flows
    Browser -->|"HTTP GET/POST"| Nginx
    Nginx --> Gunicorn
    Gunicorn --> ASGI
    Gunicorn --> WSGI
    ASGI --> Router
    WSGI --> Router
    Router --> CoreViews
    Router --> ReviewsViews
    Router --> ServiceViews
    Router --> MainViews

    CoreViews --> ORM
    ReviewsViews --> ORM
    ServiceViews --> ORM
    MainViews --> ORM

    ORM --> DB
    CoreViews --> Templates
    ReviewsViews --> Templates
    ServiceViews --> Templates
    MainViews --> Templates

    Browser -->|"Fetch Static"| Nginx
    Nginx --> Static
    Static --> Browser

    %% Click Events
    click ASGI "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/main/asgi.py"
    click WSGI "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/main/wsgi.py"
    click Router "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/main/urls.py"
    click Settings "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/main/settings.py"
    click CoreModels "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/app1/models.py"
    click CoreViews "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/app1/views.py"
    click CoreAdmin "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/app1/admin.py"
    click ReviewsModels "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/reviews/models.py"
    click ReviewsViews "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/reviews/views.py"
    click ReviewsForms "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/reviews/forms.py"
    click ReviewsAdmin "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/reviews/admin.py"
    click ServiceModels "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/service/models.py"
    click ServiceViews "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/service/views.py"
    click ServiceAdmin "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/service/admin.py"
    click MainViews "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/main/views.py"
    click MainForms "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/main/forms.py"
    click Templates "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/templates/base.html"
    click Static "https://github.com/farhan9684/eduskill-knowledge-hub-brain-booster/blob/main/static/style.css"

    %% Styles
    classDef frontend fill:#f9f,stroke:#333,stroke-width:1px
    classDef backend fill:#bbf,stroke:#333,stroke-width:1px
    classDef database fill:#bfb,stroke:#333,stroke-width:1px
```
