# ederh3nr963/chatconnectspring architecture

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

- Interactive diagram: https://gitdiagram.com/ederh3nr963/chatconnectspring
- Repository: https://github.com/ederh3nr963/chatconnectspring

## Overview

ChatConnect is a Spring backend for private and group messaging, with REST and STOMP/WebSocket interfaces, presence, media attachments, and an authentication subsystem. The README documents the principal capabilities and hexagonal layering, but no application Java source was excerpted; therefore, implementation relationships are not asserted. Paths for unsampled capabilities use exact enclosing directories from the tree.

Main entry points: [`src/main/java/com/example/chatConnectSpring/chat/application/services/MessageService.java`](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/services/MessageService.java) (Message workflows), [`src/main/java/com/example/chatConnectSpring/auth/application/services`](https://github.com/ederh3nr963/chatconnectspring/tree/main/src/main/java/com/example/chatConnectSpring/auth/application/services) (Auth workflows), [`src/main/java/com/example/chatConnectSpring/chat/application/services/ChatService.java`](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/services/ChatService.java) (Chat workflows), [`src/main/java/com/example/chatConnectSpring/auth/infrastructure/adapters/in/http/AuthController.java`](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/auth/infrastructure/adapters/in/http/AuthController.java) (Auth endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Authentication"]
  node_auth_api["Auth endpoints"]
  node_auth_services["Auth workflows"]
  node_auth_security["Token security"]
  node_auth_state[("Auth state")]
end

subgraph group_chat["Chat and Messaging"]
  node_chat_api["Chat endpoints"]
  node_message_api["Message endpoints"]
  node_chat_services["Chat workflows<br/>[ChatService.java]"]
  node_participant_service["Membership and roles"]
  node_message_service["Message workflows"]
  node_chat_domain["Chat domain<br/>[Chat.java]"]
  node_message_domain["Message domain<br/>[Message.java]"]
end

subgraph group_adapters["Realtime and Storage"]
  node_ws_api["STOMP endpoints"]
  node_presence["Presence tracking"]
  node_notifications["Live notifications"]
  node_media["Attachment processing"]
  node_chat_store[("Chat persistence")]
  node_message_store[("Message persistence")]
end

node_client(("Client"))
node_redis[("Redis")]
node_object_store[("S3-compatible storage")]
node_mail["Mail service"]

node_client -->|"authenticates"| node_auth_api
node_client -->|"manages chats"| node_chat_api
node_client -->|"sends messages"| node_message_api
node_client -->|"connects via STOMP"| node_ws_api
node_auth_api -.->|"handles auth"| node_auth_services
node_auth_services -.->|"issues tokens"| node_auth_security
node_auth_services -.->|"stores session state"| node_auth_state
node_auth_services -.->|"sends verification"| node_mail
node_chat_api -.->|"manages chats"| node_chat_services
node_chat_services -.->|"manages members"| node_participant_service
node_chat_services -.->|"persists chats"| node_chat_store
node_message_api -.->|"handles messages"| node_message_service
node_ws_api -.->|"handles messages"| node_message_service
node_message_service -.->|"persists messages"| node_message_store
node_message_service -.->|"publishes updates"| node_notifications
node_message_service -.->|"coordinates attachments"| node_media
node_presence -.->|"tracks presence"| node_redis
node_media -.->|"processes uploads"| node_object_store

click node_auth_api "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/auth/infrastructure/adapters/in/http/AuthController.java"
click node_auth_services "https://github.com/ederh3nr963/chatconnectspring/tree/main/src/main/java/com/example/chatConnectSpring/auth/application/services"
click node_auth_security "https://github.com/ederh3nr963/chatconnectspring/tree/main/src/main/java/com/example/chatConnectSpring/auth/infrastructure/security"
click node_auth_state "https://github.com/ederh3nr963/chatconnectspring/tree/main/src/main/java/com/example/chatConnectSpring/auth/infrastructure/adapters/out/persistence"
click node_chat_api "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/http/ChatController.java"
click node_message_api "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/http/MessageController.java"
click node_chat_services "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/services/ChatService.java"
click node_participant_service "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/services/ChatParticipantService.java"
click node_message_service "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/services/MessageService.java"
click node_chat_domain "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/domain/model/chat/Chat.java"
click node_message_domain "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/domain/model/message/Message.java"
click node_ws_api "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/websocket/MessageWebSocketController.java"
click node_presence "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/services/ManagePresenceService.java"
click node_notifications "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/listeners/MessageNotificationEventListener.java"
click node_media "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/messaging/S3MediaEventsListener.java"
click node_chat_store "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/domain/ports/out/ChatRepository.java"
click node_message_store "https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/domain/ports/out/MessageRepository.java"

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_auth_api,node_auth_services,node_auth_security,node_auth_state,node_client toneBlue
class node_chat_api,node_message_api,node_chat_services,node_participant_service,node_message_service,node_chat_domain,node_message_domain,node_redis,node_object_store toneAmber
class node_ws_api,node_presence,node_notifications,node_media,node_chat_store,node_message_store toneMint
class node_mail toneIndigo
```

## Components

### Authentication

- [Auth endpoints](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/auth/infrastructure/adapters/in/http/AuthController.java): `src/main/java/com/example/chatConnectSpring/auth/infrastructure/adapters/in/http/AuthController.java`
- [Auth workflows](https://github.com/ederh3nr963/chatconnectspring/tree/main/src/main/java/com/example/chatConnectSpring/auth/application/services): `src/main/java/com/example/chatConnectSpring/auth/application/services`
- [Token security](https://github.com/ederh3nr963/chatconnectspring/tree/main/src/main/java/com/example/chatConnectSpring/auth/infrastructure/security): `src/main/java/com/example/chatConnectSpring/auth/infrastructure/security`
- [Auth state](https://github.com/ederh3nr963/chatconnectspring/tree/main/src/main/java/com/example/chatConnectSpring/auth/infrastructure/adapters/out/persistence): `src/main/java/com/example/chatConnectSpring/auth/infrastructure/adapters/out/persistence`

### Chat and Messaging

- [Chat endpoints](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/http/ChatController.java): `src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/http/ChatController.java`
- [Message endpoints](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/http/MessageController.java): `src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/http/MessageController.java`
- [Chat workflows](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/services/ChatService.java): `src/main/java/com/example/chatConnectSpring/chat/application/services/ChatService.java`
- [Membership and roles](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/services/ChatParticipantService.java): `src/main/java/com/example/chatConnectSpring/chat/application/services/ChatParticipantService.java`
- [Message workflows](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/services/MessageService.java): `src/main/java/com/example/chatConnectSpring/chat/application/services/MessageService.java`
- [Chat domain](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/domain/model/chat/Chat.java): `src/main/java/com/example/chatConnectSpring/chat/domain/model/chat/Chat.java`
- [Message domain](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/domain/model/message/Message.java): `src/main/java/com/example/chatConnectSpring/chat/domain/model/message/Message.java`

### Realtime and Storage

- [STOMP endpoints](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/websocket/MessageWebSocketController.java): `src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/websocket/MessageWebSocketController.java`
- [Presence tracking](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/services/ManagePresenceService.java): `src/main/java/com/example/chatConnectSpring/chat/application/services/ManagePresenceService.java`
- [Live notifications](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/application/listeners/MessageNotificationEventListener.java): `src/main/java/com/example/chatConnectSpring/chat/application/listeners/MessageNotificationEventListener.java`
- [Attachment processing](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/messaging/S3MediaEventsListener.java): `src/main/java/com/example/chatConnectSpring/chat/infrastructure/adapters/in/messaging/S3MediaEventsListener.java`
- [Chat persistence](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/domain/ports/out/ChatRepository.java): `src/main/java/com/example/chatConnectSpring/chat/domain/ports/out/ChatRepository.java`
- [Message persistence](https://github.com/ederh3nr963/chatconnectspring/blob/main/src/main/java/com/example/chatConnectSpring/chat/domain/ports/out/MessageRepository.java): `src/main/java/com/example/chatConnectSpring/chat/domain/ports/out/MessageRepository.java`

### Other components

- **Client**
- **Redis**
- **S3-compatible storage**
- **Mail service**

## Connections

- Client → Auth endpoints: authenticates (evidence: `README.md`)
- Client → Chat endpoints: manages chats (evidence: `README.md`)
- Client → Message endpoints: sends messages (evidence: `README.md`)
- Client → STOMP endpoints: connects via STOMP (evidence: `README.md`)
- Auth endpoints → Auth workflows: handles auth
- Auth workflows → Token security: issues tokens
- Auth workflows → Auth state: stores session state
- Auth workflows → Mail service: sends verification
- Chat endpoints → Chat workflows: manages chats
- Chat workflows → Membership and roles: manages members
- Chat workflows → Chat persistence: persists chats
- Message endpoints → Message workflows: handles messages
- STOMP endpoints → Message workflows: handles messages
- Message workflows → Message persistence: persists messages
- Message workflows → Live notifications: publishes updates
- Message workflows → Attachment processing: coordinates attachments
- Presence tracking → Redis: tracks presence
- Attachment processing → S3-compatible storage: processes uploads
