# meetdod/edulearning architecture

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

- Interactive diagram: https://gitdiagram.com/meetdod/edulearning
- Repository: https://github.com/meetdod/edulearning

## Overview

##### Main Components
- Frontend – Represented by the “frontend” directory. Note that it is a React.js application using Bootstrap for a responsive and modern UI. Include key parts such as components (student, teacher, and general UI components) found under “frontend/src/Components” and its subdirectories.
- Backend – Represented by the “backend” directory. It is a Django-based REST API. Highlight the two main parts: the Django project “lms_api” (which contains global settings, routing, and server configurations) and the “main” app which holds models, serializers, views, URLs, and migrations.
- Authentication & API Layer – Specifically denote the use of JWT Authentication, as mentioned in the README.
- External Services (if any) – Optionally include things like third-party integrations (for example, real-time chat possibly using WebSocket may be part of “One-to-One Chat” functionality).

##### Relationships and Data Flow
- If needed, connect the Authentication module (JWT) with both the Frontend (to handle login/signup) and Backend (to secure routes).
- For the chat feature and any real-time messaging, illustrate bi-directional data flow between the Frontend and Backend.

##### Architectural Patterns and Design Principles
- The Django project follows the conventional structure (project settings, URL routing, apps) which aligns with standard MVC (or MVT, in Django terms) design.
- The RESTful nature of the backend API should be clearly indicated.

##### Relevant Technologies and Frameworks
- Frontend: React.js, Bootstrap, possibly additional libraries (like React Router, state management if applicable).
- Backend: Django REST Framework, alongside Django’s built-in features such as migrations (illustrated by the detailed migrations folder) and admin capabilities.
- Authentication: JWT.
- Database: PostgreSQL as per the README, even though the demo file is “db.sqlite3”.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        A["React.js Application (Frontend)"]:::frontend
        B["UI Components (Student & Teacher Interfaces)"]:::frontend
        C["Messaging Component (Chat)"]:::frontend
    end

    %% Authentication Component
    G["Authentication (JWT)"]:::auth

    %% Backend Layer
    subgraph "Backend Layer"
        D["Django Project (lms_api)"]:::backend
        E["Main Application Logic (Main App)"]:::backend
        F["Chat Module (Migrations)"]:::backend
    end

    %% Database Component
    H["Database (PostgreSQL/SQLite)"]:::db

    %% Connections
    A -->|"HTTP/API"| D
    B -->|"Uses API"| D
    A -->|"Login/Signup"| G
    G -->|"Auth-check"| D
    D -->|"Data Operations"| H
    E -->|"ORM Interaction"| H
    C <==>|"RealTime Chat"| F

    %% Click Events
    click A "https://github.com/meetdod/edulearning/tree/main//frontend"
    click B "https://github.com/meetdod/edulearning/tree/main//frontend/src/Components"
    click C "https://github.com/meetdod/edulearning/blob/main//frontend/src/Components/Message.jsx"
    click D "https://github.com/meetdod/edulearning/tree/main//backend/lms_api"
    click E "https://github.com/meetdod/edulearning/tree/main//backend/main"
    click F "https://github.com/meetdod/edulearning/blob/main//backend/main/migrations/0041_teacherstudentchat.py"
    click H "https://github.com/meetdod/edulearning/blob/main//backend/db.sqlite3"
    click G "https://github.com/meetdod/edulearning/blob/main//backend/lms_api/settings.py"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef backend fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef auth fill:#FFB6C1,stroke:#000,stroke-width:2px;
    classDef db fill:#FFD700,stroke:#000,stroke-width:2px;
```
