How tinashe2023/sonnet-mobile works
SonnetMobile is a React Native/Expo chat client for joining private rooms and exchanging group or direct messages. The main user journey runs from profile setup and room creation or registration through the chat screen, where users can load and search history, share files, and manage pinned chats and stickers. Chat and login use the HTTP API, and login explicitly registers users over the socket service. The README is empty; chat-screen excerpts are partial, so uncertain realtime and component wiring is omitted.
Main entry points: ChatScreen.js Chat screen · LoginScreen.js Login and rooms · api.js HTTP chat API · App.js App root
Components 16
App and navigation
- App root
App.js - Theme state
src/context/ThemeContext.js - Screen navigation
src/navigation/AppNavigator.js
Joining and identity
- Login and rooms
src/screens/LoginScreen.js - Profile image upload
src/services/api.js
Chat experience
- Chat screen
src/screens/ChatScreen.js - Text messages
src/components/MessageBubble.js - File and voice display
src/components/FileBubble.js - Voice recording
src/components/VoiceRecorder.js - User profile
src/components/UserProfileModal.js
Client services
- HTTP chat API
src/services/api.js - Realtime socket
src/services/socket.js - Server configuration
src/services/config.js
Other components
- Chat user
- Chat backend
- Push notifications
Connections 19
- Chat user → App root: opens
- App root → Theme state: provides theme
- App root → Screen navigation: renders
- Screen navigation → Login and rooms: starts at
- Screen navigation → Chat screen: navigates to
- Chat user → Login and rooms: enters profile
- Login and rooms → HTTP chat API: uploads image; creates room
- Login and rooms → Realtime socket: registers user
- Login and rooms → Chat screen: opens after registration
- Chat screen → HTTP chat API: loads history, search, pins, stickers, uploads
- Chat screen → Text messages: renders messages
- Chat screen → File and voice display: renders files
- Chat screen → Voice recording: records voice
- Chat screen → User profile: shows profile
- HTTP chat API → Server configuration: gets server address
- File and voice display → Server configuration: gets server address
- HTTP chat API → Chat backend: HTTP requests
- Realtime socket → Chat backend: realtime connection
- Login and rooms → Push notifications: requests device token