How saadpy111/chatapplication works
This is a one-to-one chat application: users register or sign in, find another user, open a conversation, then exchange messages and use search, reactions, presence, typing, and read/delivery receipts. The Angular client reaches authenticated HTTP endpoints and a SignalR hub; backend services apply domain rules and persist chat state through EF Core to SQL Server. The graph reflects the shown source and README; some client component wiring and unsampled controller or hub operations are documented but not verified at call level.
Main entry points: ApplicationDbContext.cs SQL Server state · ChatHub.cs SignalR hub · ConversationService.cs Conversation and messages · app.routes.ts Route guard
Components 19
Angular client
- Login and register
ChatClient/src/app/features/auth/pages/login/login.ts - Client auth
ChatClient/src/app/core/services/auth.service.ts - Route guard
ChatClient/src/app/app.routes.ts - Chat interface
ChatClient/src/app/features/chat/pages/chat/chat.component.ts - Live chat client
ChatClient/src/app/features/chat/services/chatService.ts - Conversation API client
ChatClient/src/app/features/chat/services/conversations-api.service.ts - User search client
ChatClient/src/app/features/users/data-access/users-api.service.ts
API endpoints
- Auth endpoints
ChatApi/Controllers/AuthController.cs - User search endpoint
ChatApi/Controllers/UsersController.cs - Conversation endpoints
ChatApi/Controllers/ConversationsController.cs - SignalR hub
ChatApi/Hubs/ChatHub.cs
Domain services
- Authentication
ChatApi/Services/Auth/AuthService.cs - User search
ChatApi/Services/Users/UserSearchService.cs - Conversation and messages
ChatApi/Services/Conversations/ConversationService.cs - Presence tracking
ChatApi/Services/Presence/PresenceService.cs - Message reactions
ChatApi/Services/Reactions/ReactionService.cs
Persistence
- SQL Server state
ChatApi/Data/ApplicationDbContext.cs - Chat and user entities
ChatApi/Models/Message.cs
Other components
- Chat user
Connections 25
- Chat user → Login and register: signs in
- Login and register → Client auth: requests auth
- Client auth → Auth endpoints: calls API
- Auth endpoints → Authentication: delegates auth
ChatApi/Controllers/AuthController.cs - Authentication → SQL Server state: manages identity
ChatApi/Services/Auth/AuthService.cs - Chat user → Route guard: opens chat
- Route guard → Chat interface: routes to
ChatClient/src/app/app.routes.ts - Route guard → Login and register: routes to
ChatClient/src/app/app.routes.ts - Chat interface → Live chat client: uses live chat
- Chat interface → Conversation API client: loads conversations
- Live chat client → SignalR hub: SignalR interactions
- Conversation API client → Conversation endpoints: calls API
- User search client → User search endpoint: calls API
- User search endpoint → User search: delegates search
ChatApi/Controllers/UsersController.cs - Conversation endpoints → Conversation and messages: delegates operations
ChatApi/Controllers/ConversationsController.cs - Conversation endpoints → SignalR hub: broadcasts edits
ChatApi/Controllers/ConversationsController.cs - SignalR hub → Conversation and messages: handles chat actions
ChatApi/Hubs/ChatHub.cs - SignalR hub → Presence tracking: tracks connections
ChatApi/Hubs/ChatHub.cs - SignalR hub → Message reactions: handles reactions
ChatApi/Hubs/ChatHub.cs - Conversation and messages → Presence tracking: reads snapshots
ChatApi/Services/Conversations/ConversationService.cs - Conversation and messages → SQL Server state: reads and writes
ChatApi/Services/Conversations/ConversationService.cs - User search → SQL Server state: queries users
- Presence tracking → SQL Server state: persists last seen
ChatApi/Services/Presence/PresenceService.cs - Message reactions → SQL Server state: reads and writes
ChatApi/Services/Reactions/ReactionService.cs - SQL Server state → Chat and user entities: maps entities
ChatApi/Data/ApplicationDbContext.cs