# ming0725/netherlink-static architecture

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

- Interactive diagram: https://gitdiagram.com/ming0725/netherlink-static
- Repository: https://github.com/ming0725/netherlink-static

## Overview

NetherLink-static is a Qt social/chat client prototype: its README describes a complete login-to-main-window demonstration, with largely static data rather than a production backend. The principal workflow is login, then navigate chat, friends/groups, posts, and AI conversations. Feature session controllers coordinate UI actions with repositories; the sampled controllers confirm several such calls, but most UI wiring and repository internals were not sampled, so uncertain links are omitted.

Main entry points: [`features/friend/ui/FriendSessionController.cpp`](https://github.com/ming0725/netherlink-static/blob/master/features/friend/ui/FriendSessionController.cpp) (Friend session), [`features/post/ui/PostSessionController.cpp`](https://github.com/ming0725/netherlink-static/blob/master/features/post/ui/PostSessionController.cpp) (Post session), [`features/aichat/ui/AiChatSessionController.cpp`](https://github.com/ming0725/netherlink-static/blob/master/features/aichat/ui/AiChatSessionController.cpp) (AI session), [`app/frame/login/LoginWindow.cpp`](https://github.com/ming0725/netherlink-static/blob/master/app/frame/login/LoginWindow.cpp) (Login and registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_login["Login and registration<br/>[LoginWindow.cpp]"]
  node_account[("Account history")]
  node_main["Main window<br/>[MainWindow.cpp]"]
  node_settings["Settings<br/>[SettingsWindow.cpp]"]
  node_profile[("Current-user profile")]
end

subgraph group_chat["Messaging"]
  node_chatui["Chat interface"]
  node_chatsession["Chat session"]
  node_messages[("Messages")]
  node_groupsdata[("Group data")]
end

subgraph group_social["Social features"]
  node_friendsui["Friends and groups"]
  node_friendssession["Friend session"]
  node_users[("User data<br/>[UserRepository.cpp]")]
  node_friendnotices[("Friend requests")]
  node_groupnotices[("Group requests")]
  node_postui["Post feed and detail"]
  node_postsession["Post session"]
  node_posts[("Post data<br/>[PostRepository.cpp]")]
  node_comments[("Comments and replies")]
end

subgraph group_ai["AI conversations"]
  node_aiui["AI conversation UI"]
  node_aisession["AI session"]
  node_aistore[("AI conversation data")]
  node_aistream["Reply streaming"]
  node_aititle["Title generation"]
end

subgraph group_shared["Shared experience"]
  node_theme["Theme management<br/>[ThemeManager.cpp]"]
  node_audio["UI sound<br/>[AudioService.cpp]"]
  node_image["Image viewing<br/>[ImageViewer.cpp]"]
  node_notifications["Global notifications"]
end

node_person(("User"))

node_person -->|"starts at"| node_login
node_login -->|"loads history"| node_account
node_login -->|"accepts login"| node_main
node_main -->|"opens settings"| node_settings
node_chatsession -->|"reads and writes"| node_messages
node_chatsession -->|"reads and writes"| node_groupsdata
node_friendssession -->|"reads and writes"| node_users
node_friendssession -->|"reads and writes"| node_groupsdata
node_friendssession -->|"removes conversation"| node_messages
node_friendssession -->|"handles requests"| node_friendnotices
node_friendssession -->|"handles requests"| node_groupnotices
node_postsession -->|"loads and updates"| node_posts
node_postsession -->|"updates likes"| node_comments
node_postsession -->|"updates follow state"| node_users
node_aisession -->|"reads and writes"| node_aistore
node_aisession -->|"starts stream"| node_aistream
node_aisession -->|"generates title"| node_aititle
node_settings -->|"configures theme"| node_theme
node_main -->|"preloads sounds"| node_audio

click node_login "https://github.com/ming0725/netherlink-static/blob/master/app/frame/login/LoginWindow.cpp"
click node_account "https://github.com/ming0725/netherlink-static/blob/master/app/frame/login/LoginAccountRepository.cpp"
click node_main "https://github.com/ming0725/netherlink-static/blob/master/app/frame/MainWindow.cpp"
click node_settings "https://github.com/ming0725/netherlink-static/blob/master/app/frame/SettingsWindow.cpp"
click node_profile "https://github.com/ming0725/netherlink-static/blob/master/app/state/CurrentUserProfileRepository.cpp"
click node_chatui "https://github.com/ming0725/netherlink-static/blob/master/features/chat/ui/MessageApplication.cpp"
click node_chatsession "https://github.com/ming0725/netherlink-static/blob/master/features/chat/ui/ChatSessionController.cpp"
click node_messages "https://github.com/ming0725/netherlink-static/blob/master/features/chat/data/MessageRepository.cpp"
click node_groupsdata "https://github.com/ming0725/netherlink-static/blob/master/features/chat/data/GroupRepository.cpp"
click node_friendsui "https://github.com/ming0725/netherlink-static/blob/master/features/friend/ui/FriendApplication.cpp"
click node_friendssession "https://github.com/ming0725/netherlink-static/blob/master/features/friend/ui/FriendSessionController.cpp"
click node_users "https://github.com/ming0725/netherlink-static/blob/master/features/friend/data/UserRepository.cpp"
click node_friendnotices "https://github.com/ming0725/netherlink-static/blob/master/features/friend/data/FriendNotificationRepository.cpp"
click node_groupnotices "https://github.com/ming0725/netherlink-static/blob/master/features/friend/data/GroupNotificationRepository.cpp"
click node_postui "https://github.com/ming0725/netherlink-static/blob/master/features/post/ui/PostApplication.cpp"
click node_postsession "https://github.com/ming0725/netherlink-static/blob/master/features/post/ui/PostSessionController.cpp"
click node_posts "https://github.com/ming0725/netherlink-static/blob/master/features/post/data/PostRepository.cpp"
click node_comments "https://github.com/ming0725/netherlink-static/blob/master/features/post/data/PostCommentRepository.cpp"
click node_aiui "https://github.com/ming0725/netherlink-static/blob/master/features/aichat/ui/AiChatApplication.cpp"
click node_aisession "https://github.com/ming0725/netherlink-static/blob/master/features/aichat/ui/AiChatSessionController.cpp"
click node_aistore "https://github.com/ming0725/netherlink-static/blob/master/features/aichat/data/AiChatRepository.cpp"
click node_aistream "https://github.com/ming0725/netherlink-static/blob/master/features/aichat/data/AiChatStreamClient.cpp"
click node_aititle "https://github.com/ming0725/netherlink-static/blob/master/features/aichat/data/AiChatTitleClient.cpp"
click node_theme "https://github.com/ming0725/netherlink-static/blob/master/shared/theme/ThemeManager.cpp"
click node_audio "https://github.com/ming0725/netherlink-static/blob/master/shared/services/AudioService.cpp"
click node_image "https://github.com/ming0725/netherlink-static/blob/master/shared/ui/ImageViewer.cpp"
click node_notifications "https://github.com/ming0725/netherlink-static/blob/master/shared/ui/GlobalNotification.cpp"

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_login,node_account,node_main,node_settings,node_profile,node_person toneBlue
class node_chatui,node_chatsession,node_messages,node_groupsdata toneAmber
class node_friendsui,node_friendssession,node_users,node_friendnotices,node_groupnotices,node_postui,node_postsession,node_posts,node_comments toneMint
class node_aiui,node_aisession,node_aistore,node_aistream,node_aititle toneRose
class node_theme,node_audio,node_image,node_notifications toneIndigo
```

## Components

### App shell

- [Login and registration](https://github.com/ming0725/netherlink-static/blob/master/app/frame/login/LoginWindow.cpp): `app/frame/login/LoginWindow.cpp`
- [Account history](https://github.com/ming0725/netherlink-static/blob/master/app/frame/login/LoginAccountRepository.cpp): `app/frame/login/LoginAccountRepository.cpp`
- [Main window](https://github.com/ming0725/netherlink-static/blob/master/app/frame/MainWindow.cpp): `app/frame/MainWindow.cpp`
- [Settings](https://github.com/ming0725/netherlink-static/blob/master/app/frame/SettingsWindow.cpp): `app/frame/SettingsWindow.cpp`
- [Current-user profile](https://github.com/ming0725/netherlink-static/blob/master/app/state/CurrentUserProfileRepository.cpp): `app/state/CurrentUserProfileRepository.cpp`

### Messaging

- [Chat interface](https://github.com/ming0725/netherlink-static/blob/master/features/chat/ui/MessageApplication.cpp): `features/chat/ui/MessageApplication.cpp`
- [Chat session](https://github.com/ming0725/netherlink-static/blob/master/features/chat/ui/ChatSessionController.cpp): `features/chat/ui/ChatSessionController.cpp`
- [Messages](https://github.com/ming0725/netherlink-static/blob/master/features/chat/data/MessageRepository.cpp): `features/chat/data/MessageRepository.cpp`
- [Group data](https://github.com/ming0725/netherlink-static/blob/master/features/chat/data/GroupRepository.cpp): `features/chat/data/GroupRepository.cpp`

### Social features

- [Friends and groups](https://github.com/ming0725/netherlink-static/blob/master/features/friend/ui/FriendApplication.cpp): `features/friend/ui/FriendApplication.cpp`
- [Friend session](https://github.com/ming0725/netherlink-static/blob/master/features/friend/ui/FriendSessionController.cpp): `features/friend/ui/FriendSessionController.cpp`
- [User data](https://github.com/ming0725/netherlink-static/blob/master/features/friend/data/UserRepository.cpp): `features/friend/data/UserRepository.cpp`
- [Friend requests](https://github.com/ming0725/netherlink-static/blob/master/features/friend/data/FriendNotificationRepository.cpp): `features/friend/data/FriendNotificationRepository.cpp`
- [Group requests](https://github.com/ming0725/netherlink-static/blob/master/features/friend/data/GroupNotificationRepository.cpp): `features/friend/data/GroupNotificationRepository.cpp`
- [Post feed and detail](https://github.com/ming0725/netherlink-static/blob/master/features/post/ui/PostApplication.cpp): `features/post/ui/PostApplication.cpp`
- [Post session](https://github.com/ming0725/netherlink-static/blob/master/features/post/ui/PostSessionController.cpp): `features/post/ui/PostSessionController.cpp`
- [Post data](https://github.com/ming0725/netherlink-static/blob/master/features/post/data/PostRepository.cpp): `features/post/data/PostRepository.cpp`
- [Comments and replies](https://github.com/ming0725/netherlink-static/blob/master/features/post/data/PostCommentRepository.cpp): `features/post/data/PostCommentRepository.cpp`

### AI conversations

- [AI conversation UI](https://github.com/ming0725/netherlink-static/blob/master/features/aichat/ui/AiChatApplication.cpp): `features/aichat/ui/AiChatApplication.cpp`
- [AI session](https://github.com/ming0725/netherlink-static/blob/master/features/aichat/ui/AiChatSessionController.cpp): `features/aichat/ui/AiChatSessionController.cpp`
- [AI conversation data](https://github.com/ming0725/netherlink-static/blob/master/features/aichat/data/AiChatRepository.cpp): `features/aichat/data/AiChatRepository.cpp`
- [Reply streaming](https://github.com/ming0725/netherlink-static/blob/master/features/aichat/data/AiChatStreamClient.cpp): `features/aichat/data/AiChatStreamClient.cpp`
- [Title generation](https://github.com/ming0725/netherlink-static/blob/master/features/aichat/data/AiChatTitleClient.cpp): `features/aichat/data/AiChatTitleClient.cpp`

### Shared experience

- [Theme management](https://github.com/ming0725/netherlink-static/blob/master/shared/theme/ThemeManager.cpp): `shared/theme/ThemeManager.cpp`
- [UI sound](https://github.com/ming0725/netherlink-static/blob/master/shared/services/AudioService.cpp): `shared/services/AudioService.cpp`
- [Image viewing](https://github.com/ming0725/netherlink-static/blob/master/shared/ui/ImageViewer.cpp): `shared/ui/ImageViewer.cpp`
- [Global notifications](https://github.com/ming0725/netherlink-static/blob/master/shared/ui/GlobalNotification.cpp): `shared/ui/GlobalNotification.cpp`

### Other components

- **User**

## Connections

- User → Login and registration: starts at
- Login and registration → Account history: loads history
- Login and registration → Main window: accepts login
- Main window → Settings: opens settings
- Chat session → Messages: reads and writes
- Chat session → Group data: reads and writes
- Friend session → User data: reads and writes
- Friend session → Group data: reads and writes
- Friend session → Messages: removes conversation
- Friend session → Friend requests: handles requests
- Friend session → Group requests: handles requests
- Post session → Post data: loads and updates
- Post session → Comments and replies: updates likes
- Post session → User data: updates follow state
- AI session → AI conversation data: reads and writes
- AI session → Reply streaming: starts stream
- AI session → Title generation: generates title
- Settings → Theme management: configures theme
- Main window → UI sound: preloads sounds
