How oa-ek/c-sharp-net-dealing-whisper works
Whisper is a web-based secure messenger designed for end-to-end encrypted, real-time conversations. The main workflow is client-side key generation and registration, authenticated chat access, message encryption and socket delivery, then server-side authorization, persistence, and delivery to chat participants. The repository also includes device/key management, profiles, media and attachment handling, reactions, admin statistics, and emoji/GIF integrations. Source excerpts verify selected routes and service calls; several feature implementations are identified from the tree and README, so their unverified connections are dashed.
Main entry points: authService.ts Auth service · ChatWindow.tsx Chat interface · ChatSocketService.ts Socket client · agent.ts API agent
Components 26
Client experience
- Auth screens
src/Whisper.Client/src/features/auth/Login.tsx - Auth service
src/Whisper.Client/src/services/authService.ts - Client cryptography
src/Whisper.Client/src/services/cryptoService.ts - Local key store
src/Whisper.Client/src/api/db.ts - Chat interface
src/Whisper.Client/src/features/chats/components/ChatWindow.tsx - Socket client
src/Whisper.Client/src/services/ChatSocketService.ts - Message encryption
src/Whisper.Client/src/services/encryptionService.ts - API agent
src/Whisper.Client/src/api/agent.ts
API and realtime
- Chat endpoints
src/Whisper.Server/Whisper.API/Controllers/ChatsController.cs - Auth endpoints
src/Whisper.Server/Whisper.API/Controllers/AuthController.cs - Chat hub
src/Whisper.Server/Whisper.API/Controllers/WSChatController.cs - User endpoints
src/Whisper.Server/Whisper.API/Controllers/UsersController.cs - Key endpoints
src/Whisper.Server/Whisper.API/Controllers/KeysController.cs - Media endpoints
src/Whisper.Server/Whisper.API/Controllers/MediaController.cs
Application services
- Authentication service
src/Whisper.Server/Whisper.Application/Services/AuthService.cs - Chat service
src/Whisper.Server/Whisper.Application/Services/ChatService.cs - Message service
src/Whisper.Server/Whisper.Application/Services/MessageService.cs - Key management
src/Whisper.Server/Whisper.Application/Services/OneTimePreKeyService.cs - Product features
src/Whisper.Server/Whisper.Application/Services
Persistence and integrations
- Relational data
src/Whisper.Server/Whisper.Persistence/Context/AppDbContext.cs - Message store
src/Whisper.Server/Whisper.Persistence/Repositories/MessageRepository.cs - Object storage
src/Whisper.Server/Whisper.Application/Services/MediaService.cs - Emoji and GIF APIs
src/Whisper.Server/Whisper.Application/Services/EmojiService.cs - GIF integration
src/Whisper.Server/Whisper.Application/Services/KlipyService.cs
Other components
- Messenger user
- External services
Connections 26
- Messenger user → Auth screens: starts session
- Auth screens → Auth service: registers
- Auth service → Client cryptography: generates keys
src/Whisper.Client/src/services/authService.ts - Auth service → API agent: submits registration
src/Whisper.Client/src/services/authService.ts - Auth service → Local key store: stores credentials
src/Whisper.Client/src/services/authService.ts - Messenger user → Chat interface: uses chats
- Chat interface → Message encryption: encrypts messages
- Socket client → Message encryption: uses encryption
src/Whisper.Client/src/services/ChatSocketService.ts - Chat interface → Socket client: sends and receives
- Socket client → Chat hub: connects realtime
- API agent → Auth endpoints: calls auth
- API agent → Chat endpoints: calls chat API
src/Whisper.Client/src/api/agent.ts - Auth endpoints → Authentication service: delegates
src/Whisper.Server/Whisper.API/Controllers/AuthController.cs - Authentication service → Relational data: persists accounts
- Chat endpoints → Chat service: delegates
src/Whisper.Server/Whisper.API/Controllers/ChatsController.cs - Chat hub → Message service: handles messages
src/Whisper.Server/Whisper.API/Controllers/WSChatController.cs - Message service → Message store: stores messages
src/Whisper.Server/Whisper.Application/Services/MessageService.cs - Chat service → Message store: counts unread
src/Whisper.Server/Whisper.Application/Services/ChatService.cs - User endpoints → Product features: serves profiles
src/Whisper.Server/Whisper.API/Controllers/UsersController.cs - Key endpoints → Key management: manages keys
- Key management → Relational data: stores key records
- Media endpoints → Object storage: delegates media
- Object storage → External services: stores files
- Emoji and GIF APIs → External services: queries emoji
- GIF integration → External services: queries GIFs
- Messenger user → Product features: uses extras