How 21nayan/chatsphere-frontend works
ChatSphere is a React real-time chat frontend. Users authenticate, enter the chat workspace, select a room or direct conversation, load history, and exchange messages over REST and STOMP/SockJS. The workspace also supports group and contact management, online presence, profiles, pinned chats, and customizable themes. The graph follows documented and indexed component relationships; several feature implementations and routing details are unsampled, so uncertain links are omitted.
Main entry points: ChatPage.jsx Chat workspace · api.js REST client · ChatWindow.jsx Conversation window · App.jsx Application router
Components 21
App and identity
- Application router
src/App.jsx - Sign in and recovery
src/pages/LoginPage.jsx - Registration
src/pages/RegisterPage.jsx - Session context
src/context/AuthContext.jsx
Chat workspace
- Chat workspace
src/pages/ChatPage.jsx - Room and DM navigation
src/components/RoomList.jsx - Conversation window
src/components/ChatWindow.jsx - Messages and composer
src/components/Chat.jsx - Voice messages
src/components/VoiceMessage.jsx - Online presence panel
src/components/OnlineUsers.jsx
People and groups
- Contact management
src/components/AddContactModal.jsx - New direct message
src/components/NewDMModal.jsx - Group creation
src/components/GroupModal.jsx - Group administration
src/components/GroupInfoPanel.jsx
Profile and themes
- Profile settings
src/pages/ProfilePage.jsx - Theme controls
src/components/ThemePanel.jsx - Theme state
src/context/ThemeContext.jsx
Backend services
- REST client
src/services/api.js - STOMP connection
src/services/websocket.js
Other components
- Chat user
- ChatSphere backend
Connections 27
- Chat user → Application router: opens app
README.md - Application router → Sign in and recovery: routes unauthenticated
README.md - Application router → Chat workspace: routes authenticated
README.md - Sign in and recovery → Session context: authenticates
- Registration → Session context: creates session
src/pages/RegisterPage.jsx - Session context → REST client: marks presence
src/context/AuthContext.jsx - Chat workspace → Room and DM navigation: renders
src/pages/ChatPage.jsx - Chat workspace → Conversation window: renders
src/pages/ChatPage.jsx - Chat workspace → Online presence panel: renders
src/pages/ChatPage.jsx - Chat workspace → Contact management: opens
src/pages/ChatPage.jsx - Chat workspace → Group creation: opens
src/pages/ChatPage.jsx - Chat workspace → Group administration: renders
src/pages/ChatPage.jsx - Chat workspace → Profile settings: opens
src/pages/ChatPage.jsx - Chat workspace → Theme controls: opens
src/pages/ChatPage.jsx - Room and DM navigation → New direct message: opens
src/components/RoomList.jsx - Conversation window → Messages and composer: renders
src/components/ChatWindow.jsx - Conversation window → REST client: loads and sends
src/components/ChatWindow.jsx - Conversation window → STOMP connection: sends typing
src/components/ChatWindow.jsx - Messages and composer → Voice messages: supports recording
- Chat workspace → REST client: loads workspace data
src/pages/ChatPage.jsx - Chat workspace → STOMP connection: connects presence
src/pages/ChatPage.jsx - Group administration → REST client: updates membership
src/components/GroupInfoPanel.jsx - Profile settings → REST client: updates profile
src/pages/ProfilePage.jsx - Theme controls → Theme state: sets preferences
src/components/ThemePanel.jsx - Theme state → Chat user: applies appearance
src/context/ThemeContext.jsx - REST client → ChatSphere backend: calls REST endpoints
README.md - STOMP connection → ChatSphere backend: connects and exchanges
src/services/websocket.js