# jonathanbbispo/tcc architecture

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

- Interactive diagram: https://gitdiagram.com/jonathanbbispo/tcc
- Repository: https://github.com/jonathanbbispo/tcc

## Overview

CommuniHub centralizes Telegram and Signal conversations: users register or sign in, connect channels, synchronize chats, then review and manage messages in one interface. The React app routes account and conversation screens through a shared API client to the FastAPI backend, which persists users, accounts, and conversations. The repository also contains a Go Signal API/client implementation, but the supplied evidence does not establish how it is wired to the backend; that integration is shown as unverified. Backend internals beyond the excerpts are represented only where documented or indexed.

Main entry points: [`frontend/src/App.tsx`](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/App.tsx) (Application shell), [`frontend/src/api.ts`](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/api.ts) (HTTP API client), [`backend/app.py`](https://github.com/jonathanbbispo/tcc/blob/main/backend/app.py) (REST endpoints), [`frontend/src/screens/EditarPerfil.tsx`](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/EditarPerfil.tsx) (Profile and channels)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Application shell<br/>[App.tsx]"]
  node_account_ui["Account screens<br/>[Cadastro.tsx]"]
  node_login_ui["Login screen<br/>[Login.tsx]"]
  node_recovery_ui["Credential recovery<br/>[EsqueciSenha.tsx]"]
  node_reset_ui["Password reset<br/>[RedefinirSenha.tsx]"]
  node_profile_ui["Profile screen<br/>[Perfil.tsx]"]
  node_edit_ui["Profile and channels<br/>[EditarPerfil.tsx]"]
  node_telegram_connect["Telegram connection"]
  node_signal_connect["Signal connection<br/>[ConectarSignal.tsx]"]
  node_conversation_ui["Conversation workspace<br/>[Conversa.tsx]"]
  node_message_bubble["Message rendering<br/>[BolhaMensagem.tsx]"]
  node_api_client["HTTP API client<br/>[api.ts]"]
  node_social_config["Channel metadata<br/>[redesSociais.ts]"]
end

subgraph group_backend["Backend services"]
  node_backend_api["REST endpoints<br/>[app.py]"]
  node_db_models["Domain records<br/>[models_db.py]"]
  node_payload_models["Request payloads<br/>[models_payload.py]"]
  node_database[("Application database")]
end

subgraph group_signal["Signal API"]
  node_signal_main["Signal API process<br/>[main.go]"]
  node_signal_api["Signal API handlers<br/>[api.go]"]
  node_signal_client["Signal client<br/>[client.go]"]
  node_signal_datastructs["Signal data types<br/>[datastructs.go]"]
  node_signal_plugins["Plugin loading<br/>[plugin_loader.go]"]
end

node_user(("Platform user"))
node_telegram_service["Telegram service"]
node_signal_service["Signal service"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_account_ui
node_app -->|"routes to"| node_login_ui
node_app -->|"routes to"| node_recovery_ui
node_app -->|"routes to"| node_reset_ui
node_app -->|"routes to"| node_profile_ui
node_app -->|"routes to"| node_edit_ui
node_app -->|"routes to"| node_conversation_ui
node_app -->|"synchronizes chats"| node_api_client
node_account_ui -->|"registers via"| node_api_client
node_login_ui -->|"authenticates via"| node_api_client
node_recovery_ui -->|"requests recovery"| node_api_client
node_reset_ui -->|"resets password"| node_api_client
node_edit_ui -->|"updates profile"| node_api_client
node_edit_ui -->|"renders"| node_telegram_connect
node_edit_ui -->|"renders"| node_signal_connect
node_telegram_connect -->|"links account"| node_api_client
node_signal_connect -->|"requests QR"| node_api_client
node_conversation_ui -->|"loads and edits"| node_api_client
node_conversation_ui -->|"renders messages"| node_message_bubble
node_conversation_ui -->|"interprets channels"| node_social_config
node_api_client -->|"HTTP requests"| node_backend_api
node_backend_api -->|"uses records"| node_db_models
node_backend_api -->|"validates payloads"| node_payload_models
node_backend_api -.->|"reads and writes"| node_database
node_backend_api -->|"sends messages"| node_telegram_service
node_backend_api -.->|"dispatches Signal"| node_signal_service
node_signal_main -.->|"starts handlers"| node_signal_api
node_signal_api -.->|"uses client"| node_signal_client
node_signal_api -.->|"uses types"| node_signal_datastructs
node_signal_main -.->|"loads plugins"| node_signal_plugins
node_signal_service -.->|"may use"| node_signal_main

click node_app "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/App.tsx"
click node_account_ui "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/Cadastro.tsx"
click node_login_ui "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/Login.tsx"
click node_recovery_ui "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/EsqueciSenha.tsx"
click node_reset_ui "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/RedefinirSenha.tsx"
click node_profile_ui "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/Perfil.tsx"
click node_edit_ui "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/EditarPerfil.tsx"
click node_telegram_connect "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/components/ConectarTelegram.tsx"
click node_signal_connect "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/components/ConectarSignal.tsx"
click node_conversation_ui "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/Conversa.tsx"
click node_message_bubble "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/components/BolhaMensagem.tsx"
click node_api_client "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/api.ts"
click node_social_config "https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/redesSociais.ts"
click node_backend_api "https://github.com/jonathanbbispo/tcc/blob/main/backend/app.py"
click node_db_models "https://github.com/jonathanbbispo/tcc/blob/main/backend/models_db.py"
click node_payload_models "https://github.com/jonathanbbispo/tcc/blob/main/backend/models_payload.py"
click node_signal_main "https://github.com/jonathanbbispo/tcc/blob/main/signal-api/src/main.go"
click node_signal_api "https://github.com/jonathanbbispo/tcc/blob/main/signal-api/src/api/api.go"
click node_signal_client "https://github.com/jonathanbbispo/tcc/blob/main/signal-api/src/client/client.go"
click node_signal_datastructs "https://github.com/jonathanbbispo/tcc/blob/main/signal-api/src/datastructs/datastructs.go"
click node_signal_plugins "https://github.com/jonathanbbispo/tcc/blob/main/signal-api/src/plugin_loader.go"

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_account_ui,node_login_ui,node_recovery_ui,node_reset_ui,node_profile_ui,node_edit_ui,node_telegram_connect,node_signal_connect,node_conversation_ui,node_message_bubble,node_api_client,node_social_config,node_user toneBlue
class node_backend_api,node_db_models,node_payload_models,node_database toneAmber
class node_signal_main,node_signal_api,node_signal_client,node_signal_datastructs,node_signal_plugins toneMint
class node_telegram_service,node_signal_service toneIndigo
```

## Components

### Web application

- [Application shell](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Account screens](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/Cadastro.tsx): `frontend/src/screens/Cadastro.tsx`
- [Login screen](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/Login.tsx): `frontend/src/screens/Login.tsx`
- [Credential recovery](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/EsqueciSenha.tsx): `frontend/src/screens/EsqueciSenha.tsx`
- [Password reset](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/RedefinirSenha.tsx): `frontend/src/screens/RedefinirSenha.tsx`
- [Profile screen](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/Perfil.tsx): `frontend/src/screens/Perfil.tsx`
- [Profile and channels](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/EditarPerfil.tsx): `frontend/src/screens/EditarPerfil.tsx`
- [Telegram connection](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/components/ConectarTelegram.tsx): `frontend/src/components/ConectarTelegram.tsx`
- [Signal connection](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/components/ConectarSignal.tsx): `frontend/src/components/ConectarSignal.tsx`
- [Conversation workspace](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/screens/Conversa.tsx): `frontend/src/screens/Conversa.tsx`
- [Message rendering](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/components/BolhaMensagem.tsx): `frontend/src/components/BolhaMensagem.tsx`
- [HTTP API client](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/api.ts): `frontend/src/api.ts`
- [Channel metadata](https://github.com/jonathanbbispo/tcc/blob/main/frontend/src/redesSociais.ts): `frontend/src/redesSociais.ts`

### Backend services

- [REST endpoints](https://github.com/jonathanbbispo/tcc/blob/main/backend/app.py): `backend/app.py`
- [Domain records](https://github.com/jonathanbbispo/tcc/blob/main/backend/models_db.py): `backend/models_db.py`
- [Request payloads](https://github.com/jonathanbbispo/tcc/blob/main/backend/models_payload.py): `backend/models_payload.py`
- **Application database**

### Signal API

- [Signal API process](https://github.com/jonathanbbispo/tcc/blob/main/signal-api/src/main.go): `signal-api/src/main.go`
- [Signal API handlers](https://github.com/jonathanbbispo/tcc/blob/main/signal-api/src/api/api.go): `signal-api/src/api/api.go`
- [Signal client](https://github.com/jonathanbbispo/tcc/blob/main/signal-api/src/client/client.go): `signal-api/src/client/client.go`
- [Signal data types](https://github.com/jonathanbbispo/tcc/blob/main/signal-api/src/datastructs/datastructs.go): `signal-api/src/datastructs/datastructs.go`
- [Plugin loading](https://github.com/jonathanbbispo/tcc/blob/main/signal-api/src/plugin_loader.go): `signal-api/src/plugin_loader.go`

### Other components

- **Platform user**
- **Telegram service**
- **Signal service**

## Connections

- Platform user → Application shell: uses
- Application shell → Account screens: routes to (evidence: `frontend/src/App.tsx`)
- Application shell → Login screen: routes to (evidence: `frontend/src/App.tsx`)
- Application shell → Credential recovery: routes to (evidence: `frontend/src/App.tsx`)
- Application shell → Password reset: routes to (evidence: `frontend/src/App.tsx`)
- Application shell → Profile screen: routes to (evidence: `frontend/src/App.tsx`)
- Application shell → Profile and channels: routes to (evidence: `frontend/src/App.tsx`)
- Application shell → Conversation workspace: routes to (evidence: `frontend/src/App.tsx`)
- Application shell → HTTP API client: synchronizes chats (evidence: `frontend/src/App.tsx`)
- Account screens → HTTP API client: registers via (evidence: `frontend/src/screens/Cadastro.tsx`)
- Login screen → HTTP API client: authenticates via (evidence: `frontend/src/screens/Login.tsx`)
- Credential recovery → HTTP API client: requests recovery (evidence: `frontend/src/screens/EsqueciSenha.tsx`)
- Password reset → HTTP API client: resets password (evidence: `frontend/src/screens/RedefinirSenha.tsx`)
- Profile and channels → HTTP API client: updates profile (evidence: `frontend/src/screens/EditarPerfil.tsx`)
- Profile and channels → Telegram connection: renders (evidence: `frontend/src/screens/EditarPerfil.tsx`)
- Profile and channels → Signal connection: renders (evidence: `frontend/src/screens/EditarPerfil.tsx`)
- Telegram connection → HTTP API client: links account (evidence: `frontend/src/components/ConectarTelegram.tsx`)
- Signal connection → HTTP API client: requests QR (evidence: `frontend/src/components/ConectarSignal.tsx`)
- Conversation workspace → HTTP API client: loads and edits (evidence: `frontend/src/screens/Conversa.tsx`)
- Conversation workspace → Message rendering: renders messages (evidence: `frontend/src/screens/Conversa.tsx`)
- Conversation workspace → Channel metadata: interprets channels (evidence: `frontend/src/screens/Conversa.tsx`)
- HTTP API client → REST endpoints: HTTP requests
- REST endpoints → Domain records: uses records (evidence: `backend/app.py`)
- REST endpoints → Request payloads: validates payloads (evidence: `backend/app.py`)
- REST endpoints → Application database: reads and writes
- REST endpoints → Telegram service: sends messages (evidence: `backend/app.py`)
- REST endpoints → Signal service: dispatches Signal
- Signal API process → Signal API handlers: starts handlers
- Signal API handlers → Signal client: uses client
- Signal API handlers → Signal data types: uses types
- Signal API process → Plugin loading: loads plugins
- Signal service → Signal API process: may use
