How beiginner777/im works
This repository implements a multi-client chat system alongside a web-based flash-sale and order service. The principal chat workflow is login and service discovery, connection to a chat server, then message delivery with acknowledgement and persistence; friend discovery and file transfer are additional branches. The README documents the commerce endpoints, JWT authentication, and order states. Source excerpts are partial, so uncertain internal dispatch links are omitted; duplicate server/ and linux-server/ trees appear to represent parallel server implementations.
Main entry points: mainwindow.cpp Desktop client · SeckillServer/LogicSystem.cpp Commerce logic · AuthServer/LogicSystem.cpp Auth logic · ChatServer1/LogicSystem.cpp Chat logic
Components 20
Clients
- React app
client/React/src/App.tsx - Web API client
client/React/src/api/index.ts - Desktop client
client/desktop/client1/core/mainwindow.cpp - Local chat data
client/desktop/client1/data/sqlitemanager.cpp
Identity and discovery
- AuthServer
server/AuthServer/HttpConnection.cpp - Auth logic
server/AuthServer/LogicSystem.cpp - StatusServer
server/StatusServer/LogicSystem.cpp - Status gRPC client
server/AuthServer/StatusGrpcClient.cpp
Chat and resources
- ChatServer
server/ChatServer1/CSession.cpp - Chat logic
server/ChatServer1/LogicSystem.cpp - Message writer
server/ChatServer1/BatchMessageWriter.cpp - ResourceServer
server/ResourceServer/LogicSystem.cpp - File handling
server/ResourceServer/FileSystem.cpp
Flash sale
- SeckillServer
server/SeckillServer/HttpConnection.cpp - Commerce logic
server/SeckillServer/LogicSystem.cpp - Orders and balance
server/SeckillServer/LogicSystem.cpp
Shared state
- MySQL
- Redis
server/common/RedisManager.cpp - JWT utilities
server/common/JWT.cpp
Other components
- User
Connections 26
- User → React app: uses
- User → Desktop client: uses
- React app → Web API client: requests
- Web API client → AuthServer: auth requests
- AuthServer → Auth logic: dispatches
- Auth logic → MySQL: reads and writes
- Auth logic → JWT utilities: signs tokens
- Auth logic → Status gRPC client: requests discovery
- Status gRPC client → StatusServer: registers or queries
- Desktop client → AuthServer: auth requests
- Desktop client → ChatServer: connects and chats
- ChatServer → Chat logic: dispatches messages
- Chat logic → Message writer: queues persistence
- Message writer → MySQL: batch writes
- Chat logic → MySQL: loads chat data
- Chat logic → Redis: uses cache
- Desktop client → Local chat data: loads and saves local data
- Desktop client → ResourceServer: uploads and downloads
- ResourceServer → File handling: handles files
- ResourceServer → MySQL: reads and writes metadata
- Web API client → SeckillServer: commerce requests
- SeckillServer → Commerce logic: dispatches
- Commerce logic → JWT utilities: validates JWT
- Commerce logic → MySQL: reads and writes orders
- Commerce logic → Redis: uses Redis state
- Commerce logic → Orders and balance: creates and updates