# sousou15/jabber architecture

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

- Interactive diagram: https://gitdiagram.com/sousou15/jabber
- Repository: https://github.com/sousou15/jabber

## Overview

Jabber is a language-oriented chat application. Users enter through the home or login screen, register or authenticate, then select a language room to load its history and exchange live messages; the backend also exposes profile and session endpoints. The backend’s Flask application owns the routes, Socket.IO handlers, and SQLAlchemy models. The supplied excerpts show the frontend-to-backend calls, but no separate frontend profile flow. Several responsibilities share the monolithic backend path.

Main entry points: [`FrontEnd/src/pages/jabber.jsx`](https://github.com/sousou15/jabber/blob/main/FrontEnd/src/pages/jabber.jsx) (Chat interface), [`BackEnd/src/app.py`](https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py) (User and message models), [`FrontEnd/src/App.jsx`](https://github.com/sousou15/jabber/blob/main/FrontEnd/src/App.jsx) (Route application), [`FrontEnd/src/pages/login.jsx`](https://github.com/sousou15/jabber/blob/main/FrontEnd/src/pages/login.jsx) (Login and signup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_app["Route application<br/>[App.jsx]"]
  node_home["Home page<br/>[Home.jsx]"]
end

subgraph group_identity["Identity and profiles"]
  node_login["Login and signup<br/>[login.jsx]"]
  node_backend["Flask application<br/>[app.py]"]
  node_auth_api["Auth and profile API<br/>[app.py]"]
  node_session_api["Session API<br/>[app.py]"]
end

subgraph group_chat["Room messaging"]
  node_chat_ui["Chat interface<br/>[jabber.jsx]"]
  node_send_icon["Send icon<br/>[sendicon.jsx]"]
  node_history_api["Room history API<br/>[app.py]"]
  node_realtime["Realtime room handlers<br/>[app.py]"]
end

subgraph group_data["Persistence"]
  node_models["User and message models<br/>[app.py]"]
  node_mysql[("MySQL database")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_chat_ui
node_login -->|"posts credentials"| node_auth_api
node_chat_ui -->|"checks session"| node_session_api
node_chat_ui -->|"requests logout"| node_session_api
node_chat_ui -->|"fetches history"| node_history_api
node_chat_ui -->|"emits room events"| node_realtime
node_realtime -->|"broadcasts messages"| node_chat_ui
node_chat_ui -->|"renders"| node_send_icon
node_auth_api -->|"queries and updates"| node_models
node_session_api -.->|"reads user session"| node_models
node_history_api -->|"queries messages"| node_models
node_realtime -->|"stores messages"| node_models
node_models -->|"persists records"| node_mysql

click node_app "https://github.com/sousou15/jabber/blob/main/FrontEnd/src/App.jsx"
click node_home "https://github.com/sousou15/jabber/blob/main/FrontEnd/src/pages/Home.jsx"
click node_login "https://github.com/sousou15/jabber/blob/main/FrontEnd/src/pages/login.jsx"
click node_chat_ui "https://github.com/sousou15/jabber/blob/main/FrontEnd/src/pages/jabber.jsx"
click node_send_icon "https://github.com/sousou15/jabber/blob/main/FrontEnd/src/components/sendicon.jsx"
click node_backend "https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py"
click node_auth_api "https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py"
click node_session_api "https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py"
click node_history_api "https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py"
click node_realtime "https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py"
click node_models "https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_home toneBlue
class node_login,node_backend,node_auth_api,node_session_api toneAmber
class node_chat_ui,node_send_icon,node_history_api,node_realtime toneMint
class node_models,node_mysql toneRose
class node_visitor toneIndigo
```

## Components

### Web interface

- [Route application](https://github.com/sousou15/jabber/blob/main/FrontEnd/src/App.jsx): `FrontEnd/src/App.jsx`
- [Home page](https://github.com/sousou15/jabber/blob/main/FrontEnd/src/pages/Home.jsx): `FrontEnd/src/pages/Home.jsx`

### Identity and profiles

- [Login and signup](https://github.com/sousou15/jabber/blob/main/FrontEnd/src/pages/login.jsx): `FrontEnd/src/pages/login.jsx`
- [Flask application](https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py): `BackEnd/src/app.py`
- [Auth and profile API](https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py): `BackEnd/src/app.py`
- [Session API](https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py): `BackEnd/src/app.py`

### Room messaging

- [Chat interface](https://github.com/sousou15/jabber/blob/main/FrontEnd/src/pages/jabber.jsx): `FrontEnd/src/pages/jabber.jsx`
- [Send icon](https://github.com/sousou15/jabber/blob/main/FrontEnd/src/components/sendicon.jsx): `FrontEnd/src/components/sendicon.jsx`
- [Room history API](https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py): `BackEnd/src/app.py`
- [Realtime room handlers](https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py): `BackEnd/src/app.py`

### Persistence

- [User and message models](https://github.com/sousou15/jabber/blob/main/BackEnd/src/app.py): `BackEnd/src/app.py`
- **MySQL database**

### Other components

- **Visitor**

## Connections

- Visitor → Route application: opens
- Route application → Home page: routes to (evidence: `FrontEnd/src/App.jsx`)
- Route application → Login and signup: routes to (evidence: `FrontEnd/src/App.jsx`)
- Route application → Chat interface: routes to (evidence: `FrontEnd/src/App.jsx`)
- Login and signup → Auth and profile API: posts credentials (evidence: `FrontEnd/src/pages/login.jsx`)
- Chat interface → Session API: checks session (evidence: `FrontEnd/src/pages/jabber.jsx`)
- Chat interface → Session API: requests logout (evidence: `FrontEnd/src/pages/jabber.jsx`)
- Chat interface → Room history API: fetches history (evidence: `FrontEnd/src/pages/jabber.jsx`)
- Chat interface → Realtime room handlers: emits room events (evidence: `FrontEnd/src/pages/jabber.jsx`)
- Realtime room handlers → Chat interface: broadcasts messages (evidence: `BackEnd/src/app.py`)
- Chat interface → Send icon: renders (evidence: `FrontEnd/src/pages/jabber.jsx`)
- Auth and profile API → User and message models: queries and updates (evidence: `BackEnd/src/app.py`)
- Session API → User and message models: reads user session (evidence: `BackEnd/src/app.py`)
- Room history API → User and message models: queries messages (evidence: `BackEnd/src/app.py`)
- Realtime room handlers → User and message models: stores messages (evidence: `BackEnd/src/app.py`)
- User and message models → MySQL database: persists records (evidence: `BackEnd/src/app.py`)
