# belharche/tigminoproject architecture

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

- Interactive diagram: https://gitdiagram.com/belharche/tigminoproject
- Repository: https://github.com/belharche/tigminoproject

## Overview

##### Project type and purpose
- This is a full-stack apartment-renting platform called TIGMINO.
- Frontend: React.js + TypeScript + Tailwind CSS (Vite).
- Backend: Django + Django REST Framework + Django Channels (WebSocket).
- AI Chatbot: TensorFlow model for automated user assistance.
- Real-time messaging: WebSockets via Django Channels.

##### File structure
- Top-level directories:
- client-side – all React/TypeScript/Vite code, assets, components
- server-side – Django project (tigmino) with apps: chat, chatbot_api, property, useraccount
- deep-learning – Jupyter notebook and raw model artifacts used for training chatbot
- server-side/tigmino – ASGI entrypoint, settings, URL routing (REST + WebSocket)
- server-side/apps – each Django app follows MVC: models.py, serializers.py, views.py, urls.py, migrations
- WebSocket config in chat/routing.py and chat/consumers.py
- Static/media storage under server-side/media/uploads for user avatars and property images
- Configuration files: Vite, Tailwind, Django settings, requirements.txt

##### Key README insights
- Two-part architecture: “server-side” and “client-side”
- Four main features: user management, listing management, AI Chatbot, real-time chat
- Technologies enumerated for each layer

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Frontend Layer
    subgraph "Frontend Layer"
        direction TB
        DevServer["Vite Dev Server"]:::frontend
        ReactSPA["React SPA"]:::frontend
        TailwindConfig["Tailwind CSS Config"]:::frontend
    end

    DevServer -->|"serves"| ReactSPA
    ReactSPA -->|"HTTP Requests"| ASGI
    ReactSPA -->|"\nWebSocket\nMessages"| ASGI

    %% Backend Gateway
    subgraph "Backend Layer"
        direction TB
        ASGI["ASGI Application\n(HTTP & WebSocket Gateway)"]:::backendHTTP

        %% HTTP Services
        subgraph "HTTP Services"
            direction TB
            RESTRouting["Django URLs\n(HTTP Routing)"]:::backendHTTP
            UserAccountApp["UserAccount App"]:::backendHTTP
            PropertyApp["Property App"]:::backendHTTP
            ChatbotAPIApp["Chatbot API App"]:::backendHTTP
            ChatHTTP["Chat REST Endpoints"]:::backendHTTP
        end

        %% WebSocket Services
        subgraph "WebSocket Services"
            direction TB
            ChatRouting["Chat Routing"]:::backendWS
            ChatConsumers["Chat Consumers"]:::backendWS
        end

        ASGI -->|"routes HTTP"| RESTRouting
        RESTRouting --> UserAccountApp
        RESTRouting --> PropertyApp
        RESTRouting --> ChatbotAPIApp
        RESTRouting --> ChatHTTP

        ASGI -->|"routes WS"| ChatRouting
        ChatRouting --> ChatConsumers
        ChatConsumers --> Database
    end

    %% ML Service
    subgraph "ML Inference Service"
        direction TB
        ModelArtifacts["TensorFlow Model\n(chat_model.h5)"]:::ml
        ChatbotAPIApp -->|"Inference Call"| ModelArtifacts
        ModelArtifacts --> ChatbotAPIApp
    end

    %% Data Stores
    subgraph "Data Stores"
        direction TB
        Database["SQLite3 Database"]:::datastore
        MediaStore["Media Store\n(/media/uploads)"]:::datastore
    end

    UserAccountApp -->|"CRUD"| Database
    PropertyApp -->|"CRUD"| Database
    ChatHTTP -->|"CRUD"| Database
    UserAccountApp -->|"Uploads/Downloads"| MediaStore
    PropertyApp -->|"Uploads/Downloads"| MediaStore

    %% Click Events
    click ReactSPA "https://github.com/belharche/tigminoproject/tree/master/client-side/src"
    click DevServer "https://github.com/belharche/tigminoproject/blob/master/client-side/vite.config.js"
    click TailwindConfig "https://github.com/belharche/tigminoproject/blob/master/client-side/tailwind.config.js"
    click ASGI "https://github.com/belharche/tigminoproject/blob/master/server-side/tigmino/asgi.py"
    click RESTRouting "https://github.com/belharche/tigminoproject/blob/master/server-side/tigmino/urls.py"
    click UserAccountApp "https://github.com/belharche/tigminoproject/tree/master/server-side/useraccount"
    click server-side/useraccount/models.py "https://github.com/belharche/tigminoproject/blob/master/server-side/useraccount/models.py"
    click server-side/useraccount/serializers.py "https://github.com/belharche/tigminoproject/blob/master/server-side/useraccount/serializers.py"
    click server-side/useraccount/views.py "https://github.com/belharche/tigminoproject/blob/master/server-side/useraccount/views.py"
    click server-side/useraccount/urls.py "https://github.com/belharche/tigminoproject/blob/master/server-side/useraccount/urls.py"
    click PropertyApp "https://github.com/belharche/tigminoproject/tree/master/server-side/property"
    click server-side/property/models.py "https://github.com/belharche/tigminoproject/blob/master/server-side/property/models.py"
    click server-side/property/serializers.py "https://github.com/belharche/tigminoproject/blob/master/server-side/property/serializers.py"
    click server-side/property/views.py "https://github.com/belharche/tigminoproject/blob/master/server-side/property/views.py"
    click server-side/property/urls.py "https://github.com/belharche/tigminoproject/blob/master/server-side/property/urls.py"
    click ChatRouting "https://github.com/belharche/tigminoproject/blob/master/server-side/chat/routing.py"
    click ChatConsumers "https://github.com/belharche/tigminoproject/blob/master/server-side/chat/consumers.py"
    click server-side/chat/serializers.py "https://github.com/belharche/tigminoproject/blob/master/server-side/chat/serializers.py"
    click server-side/chat/views.py "https://github.com/belharche/tigminoproject/blob/master/server-side/chat/views.py"
    click server-side/chat/urls.py "https://github.com/belharche/tigminoproject/blob/master/server-side/chat/urls.py"
    click ChatbotAPIApp "https://github.com/belharche/tigminoproject/tree/master/server-side/chatbot_api"
    click server-side/chatbot_api/views.py "https://github.com/belharche/tigminoproject/blob/master/server-side/chatbot_api/views.py"
    click server-side/chatbot_api/urls.py "https://github.com/belharche/tigminoproject/blob/master/server-side/chatbot_api/urls.py"
    click ModelArtifacts "https://github.com/belharche/tigminoproject/blob/master/server-side/chatbot_api/model_info/chat_model.h5"
    click Database "https://github.com/belharche/tigminoproject/blob/master/server-side/db.sqlite3"
    click MediaStore "https://github.com/belharche/tigminoproject/tree/master/server-side/media/uploads"
    click server-side/tigmino/settings.py "https://github.com/belharche/tigminoproject/blob/master/server-side/tigmino/settings.py"
    click server-side/manage.py "https://github.com/belharche/tigminoproject/blob/master/server-side/manage.py"

    %% Styles
    classDef frontend fill:#D0E8FF,stroke:#0B56A5,color:#000
    classDef backendHTTP fill:#DFF5D8,stroke:#2F8F24,color:#000
    classDef backendWS fill:#FFE5CC,stroke:#E65C00,color:#000
    classDef datastore fill:#EEEEEE,stroke:#888888,color:#000
    classDef ml fill:#F3E5FF,stroke:#9C27B0,color:#000
```
