# lhaseparth2610/eduliteos architecture

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

- Interactive diagram: https://gitdiagram.com/lhaseparth2610/eduliteos
- Repository: https://github.com/lhaseparth2610/eduliteos

## Overview

##### Project type and purpose
- EduLite OS is a custom, Ubuntu-based Linux distribution optimized for low-end hardware, with a lightweight desktop (LXQt) and a suite of offline educational apps (Python scripts, Kolibri, teacher dashboards, exam mode, chatbot demos).
- It’s not a conventional client-server app but rather a full-stack OS distribution: from kernel and system services up through the desktop environment to individual educational applications.

##### File structure
- Top-level files: LICENSE, README.md, video/, ss/ (screenshots), simulated logs (exam_mode_simulation.log, etc.)
- apps/ – contains all of the custom Python educational applications:
- chatbot.py, 2ndchatbot.py, welcome.py, todo.py, test.py, exam_mode.py, lab_mode.py, reset.py
- model_data/ – serialized QA data (pickles, FAISS index) and CSVs for facts
- general_facts.csv, coding_facts.csv for content feeds
- test_jsons/ – sample test definitions used by exam_mode
- The README also describes system installation paths under /usr/local/share/edu_apps/, /usr/local/bin/, and desktop entries in /usr/share/applications/edu-os/.

##### Extract additional architecture insights from the README
- Base OS: Xubuntu (Linux kernel + system services + apt package manager + systemd + zram tuning)
- Desktop: LXQt
- Offline services: Kolibri integrated as a separate service
- Custom Python apps launched via symlinks and .desktop files
- Performance optimizations and low-RAM tuning (zram, minimal daemons)

a. Main components
- Hardware Layer (Low-end PCs ≤2 GB RAM)
- Kernel & System Services (Linux kernel, systemd, zram module)
- Package Manager & OS Layer (apt, Xubuntu base)
- Desktop Environment (LXQt window manager, panel, file manager)
- Offline Learning Service (Kolibri server process)
- Custom Python Apps (each script under apps/, reading from model_data/, CSVs, test_jsons/)
- Teacher Dashboard & Exam Mode Service (exam_mode.py + test_jsons)
- Data Layer (local pickles, FAISS index, CSVs, logs)
- Launcher & Integration (symlinks in /usr/local/bin, .desktop files in /usr/share/applications)
- User Interface (graphical menus, LXQt shortcuts)

b. Component relationships & data flow
- LXQt → Launcher Symlink (invokes the relevant Python script via PATH)
- Python App → Data Layer (loads pickles, FAISS index, CSVs, JSON tests)
- Python App → Writes logs (exam_mode_simulation.log, lab_mode_simulation.log)
- Apps → (optionally) Kolibri (for content served via local web UI)
- Systemd / services manage Kolibri and any background daemons (zram, tune scripts)

c. Architectural patterns & design principles
- Layered Architecture: Hardware → Kernel → OS → Desktop → Applications
- Single-responsibility apps: each Python script handles a distinct learning mode
- Shared data “library” (model_data) reused by multiple apps (chatbot & QA)
- Symlink + .desktop files act as the “API” / interface between desktop and apps

d. Key technologies & frameworks
- Linux kernel, systemd, zram
- apt package manager
- LXQt
- Python 3 scripts, FAISS, pickle, CSV, JSON
- Kolibri offline server

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Layers
    subgraph "Hardware Layer"
        HW["Hardware (Low-end PCs ≤2 GB RAM)"]:::hardware
    end

    subgraph "System Layer"
        Kernel["Kernel + systemd"]:::system
        ZRAM["zram Module for swap compression"]:::system
        APT["apt Package Manager"]:::system
    end

    subgraph "Desktop Environment"
        LXQt["LXQt Session"]:::desktop
        Panel["Panel & File Manager"]:::desktop
        Launcher["Launcher (.desktop & symlinks)"]:::integration
    end

    subgraph "Offline Services"
        SystemdSvc["systemd Service Manager"]:::system
        Kolibri["Kolibri Server"]:::service
    end

    subgraph "Custom Apps"
        Chatbot["chatbot.py"]:::app
        Chatbot2["2ndchatbot.py"]:::app
        Welcome["welcome.py"]:::app
        Todo["todo.py"]:::app
        TestApp["test.py"]:::app
        ExamMode["exam_mode.py"]:::app
        LabMode["lab_mode.py"]:::app
        Reset["reset.py"]:::app
    end

    subgraph "Data Layer"
        ModelData["model_data/"]:::data
        CSVs["general_facts.csv\ncoding_facts.csv"]:::data
        JSONs["test_jsons/"]:::data
        ExamLog["exam_mode_simulation.log"]:::data
        LabLog["lab_mode_simulation.log"]:::data
    end

    %% Connections
    HW --> Kernel
    Kernel --> ZRAM
    Kernel --> APT
    APT --> LXQt
    LXQt --> Panel
    LXQt --> Launcher

    Launcher --> Chatbot
    Launcher --> Chatbot2
    Launcher --> Welcome
    Launcher --> Todo
    Launcher --> TestApp
    Launcher --> ExamMode
    Launcher --> LabMode
    Launcher --> Reset

    Chatbot --> ModelData
    Chatbot2 --> ModelData
    Chatbot --> CSVs
    Chatbot2 --> CSVs

    Welcome --> CSVs
    Todo --> ModelData
    TestApp --> JSONs

    ExamMode --> JSONs
    ExamMode --> ExamLog
    LabMode --> LabLog

    SystemdSvc --> Kolibri
    Kolibri --> Panel

    %% Click Events
    click Chatbot "https://github.com/lhaseparth2610/eduliteos/blob/dev/apps/chatbot.py"
    click Chatbot2 "https://github.com/lhaseparth2610/eduliteos/blob/dev/apps/2ndchatbot.py"
    click Welcome "https://github.com/lhaseparth2610/eduliteos/blob/dev/apps/welcome.py"
    click Todo "https://github.com/lhaseparth2610/eduliteos/blob/dev/apps/todo.py"
    click TestApp "https://github.com/lhaseparth2610/eduliteos/blob/dev/apps/test.py"
    click ExamMode "https://github.com/lhaseparth2610/eduliteos/blob/dev/apps/exam_mode.py"
    click LabMode "https://github.com/lhaseparth2610/eduliteos/blob/dev/apps/lab_mode.py"
    click Reset "https://github.com/lhaseparth2610/eduliteos/blob/dev/apps/reset.py"
    click ModelData "https://github.com/lhaseparth2610/eduliteos/tree/dev/apps/model_data/"
    click CSVs "https://github.com/lhaseparth2610/eduliteos/blob/dev/apps/general_facts.csv"
    click CSVs "https://github.com/lhaseparth2610/eduliteos/blob/dev/apps/coding_facts.csv"
    click JSONs "https://github.com/lhaseparth2610/eduliteos/tree/dev/test_jsons/"
    click ExamLog "https://github.com/lhaseparth2610/eduliteos/blob/dev/exam_mode_simulation.log"
    click LabLog "https://github.com/lhaseparth2610/eduliteos/blob/dev/lab_mode_simulation.log"

    %% Styles
    classDef hardware fill:#666666,stroke:#333333,color:#ffffff
    classDef system fill:#AED6F1,stroke:#3498DB,color:#1B4F72
    classDef desktop fill:#A9DFBF,stroke:#27AE60,color:#145A32
    classDef integration fill:#F9E79F,stroke:#B7950B,color:#7D6608
    classDef service fill:#F5B7B1,stroke:#CD6155,color:#7B241C
    classDef app fill:#F8C471,stroke:#D35400,color:#6E2C00
    classDef data fill:#F7DC6F,stroke:#B9770E,color:#7D6608
```
