How madjid123/dexchat works
Main Components Identification
a) Frontend Layer:
• User Interface Components (src/components)
• Feature Modules (src/features)
• State Management (Redux - evident from store.ts and slices)
• Authentication System (src/contexts/authentication)
• WebSocket Integration (src/utils/socket.ts)
b) External Services:
• REST API Integration (src/services)
• WebSocket Server (for real-time communication)
┌─────────────────────────────────────────────────────────┐
• Client Application │
• ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
• Auth │ │ Chat │ │ Profile │ │ Discover │ │
• Module │ │ Module │ │ Module │ │ Module │ │
• ┘ └──────────┘ └──────────┘ └──────────┘ │
• ┌──────────────────────┐ ┌─────────────────────────┐ │
• Redux Store │ │ Context Providers │ │
• ┘ └─────────────────────────┘ │
• ┘
┌─────────────────────────────────────────────────────────┐
• ┌──────────┐ ┌──────────┐ ┌──────────────────────┐ │
• Redux │ │ Socket │ │ REST Client │ │
• Store │──│ Client │ │ (Axios Instance) │ │
• ┘ └──────────┘ └──────────────────────┘ │
• ┘
┌─────────────────────┐ ┌─────────────────────┐
• WebSocket Server │ │ REST API │
• ┘ └─────────────────────┘
Important Relationships to Highlight
• Bidirectional communication between Socket Client and WebSocket Server
• Redux state flow to components
• Authentication flow through the system
• API call patterns
Technical Stack Callouts
• React + TypeScript
• Redux Toolkit
• WebSocket
• Axios
• TailwindCSS
• Vite (build tool)