# fauzanariyatmoko/tsdn_mahasiswa_rnd-intel_v1 architecture

> Architecture diagram of the GitHub repository fauzanariyatmoko/tsdn_mahasiswa_rnd-intel_v1, 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/fauzanariyatmoko/tsdn_mahasiswa_rnd-intel_v1
- Repository: https://github.com/fauzanariyatmoko/tsdn_mahasiswa_rnd-intel_v1

## Overview

##### Project Type and Purpose
- This is a machine learning–based full-stack application focused on predicting diabetes risk and generating personalized health recommendations. It combines data processing, model training (using an XGBoost classifier, among other models), and deployment via a web prototype built on Streamlit.
- The system leverages processed data (after feature engineering) and presents predictions in an interactive dashboard accessible by end users.

##### File Structure
- The top-level directories include documentation folders (Dokumen, Presentasi), and the Sources folder which is key to understanding the system.
- Inside Sources, you have:
- Data: Contains raw and processed data files (e.g., a zipped dataset, CSV after feature engineering, and a PDF source).
- Model: Includes the serialized ML model (xgb_model.sav).
- Notebook: Contains Jupyter notebooks and other model files (multiple models like dt_model, knn_model, rf_model, svc_model, xgb_model) showcasing the training and experimentation process.
- WebApps: Contains the Python file (dashboardprediksi.py) that runs the Streamlit app.
- There’s also a requirements.txt for dependency management and a README that outlines the project purpose, model details, and deployment instructions.

##### Main Components
a. Data Acquisition and Preparation:
- External Data Source: Reference to the Mendeley Data repository (as mentioned in README).
- Data Processing & Feature Engineering: The workflow from raw data to engineered features (e.g., handling missing values, merging datasets) as executed in the Notebook scripts.
b. Model Training and Serialization:
- Training Process: Model training experiments documented in the Notebooks for several machine learning algorithms.
- Trained Model: XGBoost model (stored in Sources/Model and Sources/Notebook) which is selected for its performance.
c. Web Application Deployment:
- Streamlit Web Interface: Implemented in Sources/WebApps/dashboardprediksi.py which serves as the interactive layer for users to input data, receive predictions, and view recommendations.
d. Documentation & Supporting Materials:
- Documentation: Presentasi and Dokumen directories include relevant academic and presentation materials that might be referenced for further details.
- Requirements & Environment Setup: Managed via requirements.txt which ensures the system’s dependencies are properly installed.

##### Relationships and Interactions
- Data flows from the raw datasets (Sources/Data) through the feature engineering process, feeding into model training stages (Sources/Notebook).
- The trained model (from Sources/Model) is then integrated into the WebApps component for predictions.
- The Streamlit app acts as the user interface and connects directly to the model and perhaps even to a process to re-trigger or update the predictions.

##### Architectural Patterns & Design Principles
- Separation of concerns: Data management, model training, and presentation (frontend UI) are kept distinct.
- Extensibility: multiple model files indicate experimental branching or potential future model ensemble integrations.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Data Layer
    A("External Data Source (Mendeley)"):::datasrc
    subgraph "Data Layer"
        B("Data Acquisition"):::datasrc
        C("Feature Engineering & Data Processing"):::processing
    end

    %% Modeling Layer
    subgraph "Modeling Layer"
        D("ML Model Training"):::model
        E("Trained Model (XGBoost)"):::model
    end

    %% Presentation Layer
    subgraph "Presentation Layer"
        F("Streamlit Web App"):::web
    end

    %% Documentation & Supporting Materials
    subgraph "Documentation"
        G("Dokumen"):::docs
        H("Presentasi"):::docs
        I("requirements.txt"):::docs
    end

    %% Data Flow Connections
    A -->|"flows_to"| B
    B -->|"processes"| C
    C -->|"triggers"| D
    D -->|"produces"| E
    E -->|"integrated_in"| F
    F -->|"uses"| E

    %% Documentation Connections (indicate support/dependency)
    I -->|"supports"| F
    G -->|"reference"| F
    H -->|"reference"| F

    %% Click Events
    click B "https://github.com/fauzanariyatmoko/tsdn_mahasiswa_rnd-intel_v1/tree/main/Sources/Data"
    click D "https://github.com/fauzanariyatmoko/tsdn_mahasiswa_rnd-intel_v1/tree/main/Sources/Notebook"
    click E "https://github.com/fauzanariyatmoko/tsdn_mahasiswa_rnd-intel_v1/blob/main/Sources/Model/xgb_model.sav"
    click F "https://github.com/fauzanariyatmoko/tsdn_mahasiswa_rnd-intel_v1/blob/main/Sources/WebApps/dashboardprediksi.py"
    click G "https://github.com/fauzanariyatmoko/tsdn_mahasiswa_rnd-intel_v1/tree/main/Dokumen"
    click H "https://github.com/fauzanariyatmoko/tsdn_mahasiswa_rnd-intel_v1/tree/main/Presentasi"
    click I "https://github.com/fauzanariyatmoko/tsdn_mahasiswa_rnd-intel_v1/blob/main/requirements.txt"

    %% Styles
    classDef datasrc fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef processing fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef model fill:#FFFA90,stroke:#000,stroke-width:2px;
    classDef web fill:#FFA07A,stroke:#000,stroke-width:2px;
    classDef docs fill:#E6E6FA,stroke:#000,stroke-width:2px;
```
