# pranav11p/isolate-together architecture

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

- Interactive diagram: https://gitdiagram.com/pranav11p/isolate-together
- Repository: https://github.com/pranav11p/isolate-together

## Overview

##### Main Components

Frontend Layer:
- User Interface Components (HTML/CSS)
- JavaScript Modules
- Static Assets
- Template Views

Backend Layer:
- Authentication Service
- Chat System
- ML Matching Engine
- URL Router
- Template Engine

Database Layer:
- Storage components for:
- User Profiles
- Chat History
- ML Model Data (PKL files)

##### Component Relationships

**User Interface ←→ Django Views**
**Django Views ←→ ML Engine**
**Django Views ←→ Authentication Service**
**Chat System ←→ Database**
**ML Engine ←→ Profile Storage**

##### Detailed Component Breakdown

Frontend Modules (Group these in the UI section):
- User Authentication (signin/signup)
- Chat Interface
- Games Platform
- Profile Management
- Service Directories
- Tips & Suggestions

Backend Services (Group these in the Django section):
- Authentication Module
- ML Profile Matching System
- Chat Room Manager
- Static File Server
- Template Renderer

##### Data Flow Indicators

- User authentication flow
- Profile matching process
- Real-time chat communication
- Static content delivery
- ML model interactions

##### Additional Elements

Include:
- User session management
- Static file handling
- Template processing flow
- Security layers
- API endpoints

##### The modular structure of the services

Keep the abstraction level high enough to show the overall architecture while including sufficient detail to understand the unique aspects of this COVID-19 patient connection platform.

- Symbols for data flow directions
- Synchronous vs asynchronous operations
- Secure vs public endpoints
- Database relationships
- Real-time components

This will create a comprehensive yet clear visualization of the IsolateTogether system architecture, emphasizing its social connection features and ML-powered matching system.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef database fill:#e67e22,stroke:#d35400,color:white
    classDef ml fill:#9b59b6,stroke:#8e44ad,color:white
    classDef security fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Frontend Layer
    subgraph Frontend
        UI[User Interface Components]
        AuthUI[Authentication UI]:::frontend
        ChatUI[Chat Interface]:::frontend
        GamesUI[Games Platform]:::frontend
        ProfileUI[Profile Management]:::frontend
        TipsUI[Tips & Suggestions]:::frontend
        StaticAssets[Static Assets]:::frontend
        Templates[Template Views]:::frontend
    end

    %% Backend Layer
    subgraph Backend
        DjangoCore[Django Core]:::backend
        AuthService[Authentication Service]:::backend
        ChatSystem[Chat System]:::backend
        URLRouter[URL Router]:::backend
        TemplateEngine[Template Engine]:::backend
        
        subgraph MLSystem
            MLEngine[ML Matching Engine]:::ml
            FeatureProcessor[Feature Processor]:::ml
            ModelStorage[Model Storage]:::ml
        end
    end

    %% Database Layer
    subgraph Storage
        UserDB[(User Profiles)]:::database
        ChatDB[(Chat History)]:::database
        MLData[(ML Model Data)]:::database
    end

    %% Relationships
    UI --> AuthUI & ChatUI & GamesUI & ProfileUI & TipsUI
    AuthUI --> AuthService
    ChatUI --> ChatSystem
    AuthService --> UserDB
    ChatSystem --> ChatDB
    MLEngine --> MLData
    MLEngine --> UserDB
    TemplateEngine --> Templates
    URLRouter --> AuthService & ChatSystem & MLEngine
    DjangoCore --> URLRouter
    StaticAssets --> UI

    %% Click Events
    click AuthService "https://github.com/pranav11p/Isolate-Together/tree/main/IsolateTogether/authentication/"
    click ChatSystem "https://github.com/pranav11p/Isolate-Together/tree/main/IsolateTogether/chatrooms/"
    click MLEngine "https://github.com/pranav11p/Isolate-Together/blob/main/IsolateTogether/authentication/MLModel.py"
    click ModelStorage "https://github.com/pranav11p/Isolate-Together/blob/main/IsolateTogether/authentication/profiles_clustered.pkl"
    click Templates "https://github.com/pranav11p/Isolate-Together/tree/main/IsolateTogether/templates/"
    click StaticAssets "https://github.com/pranav11p/Isolate-Together/tree/main/IsolateTogether/static/"
    click URLRouter "https://github.com/pranav11p/Isolate-Together/blob/main/IsolateTogether/IsolateTogether/urls.py"
    click AuthUI "https://github.com/pranav11p/Isolate-Together/tree/main/IsolateTogether/static/signin/"
    click ChatUI "https://github.com/pranav11p/Isolate-Together/tree/main/IsolateTogether/static/chat/"
    click GamesUI "https://github.com/pranav11p/Isolate-Together/blob/main/IsolateTogether/static/OurServices/games.html"
    click ProfileUI "https://github.com/pranav11p/Isolate-Together/tree/main/IsolateTogether/static/signup/"
    click TipsUI "https://github.com/pranav11p/Isolate-Together/tree/main/IsolateTogether/static/tipsAndSuggestion/"
    click DjangoCore "https://github.com/pranav11p/Isolate-Together/blob/main/IsolateTogether/IsolateTogether/settings.py"

    %% Legend
    subgraph Legend
        L1[Frontend Component]:::frontend
        L2[Backend Service]:::backend
        L3[(Database)]:::database
        L4[ML Component]:::ml
        L5[Security Layer]:::security
    end
```
