How hectorg2211/heythere-messaging-app works
Heythere is a React messaging app: a user signs in with Google, browses rooms, opens one, and sends messages; room data comes from a REST API, while Pusher updates messages and room previews in real time. The app uses shared React state for the authenticated user. The README documents an Express/Mongoose backend and MongoDB, but those server components are external to this repository; their internal behavior is not shown in the sampled source.
Main entry points: App.js App router · Sidebar.js Room sidebar · Login.js Google sign-in · Chat.js Room chat
Components 13
App and authentication
- App router
src/App.js - Google sign-in
src/components/Login.js - Firebase auth
src/firebase.js
Room browsing
- Room sidebar
src/components/Sidebar.js - Room preview
src/components/UserChat.js - API client
src/axios.js
Chat and updates
- Room chat
src/components/Chat.js - Pusher events
Shared user state
- State provider
src/StateProvider.js - User reducer
src/reducer.js
Other components
- User
- Messaging REST API
- MongoDB
Connections 19
- User → App router: opens app
- App router → Google sign-in: shows signed out
src/App.js - App router → Room sidebar: shows rooms
src/App.js - App router → Room chat: routes room
src/App.js - User → Google sign-in: starts sign-in
src/components/Login.js - Google sign-in → Firebase auth: authenticates
src/components/Login.js - Firebase auth → Google sign-in: reports auth state
src/components/Login.js - Google sign-in → State provider: dispatches user
src/components/Login.js - App router → State provider: reads user
src/App.js - State provider → User reducer: reduces actions
src/index.js - Room sidebar → Firebase auth: signs out
src/components/Sidebar.js - Room sidebar → API client: requests rooms
src/components/Sidebar.js - Room sidebar → Room preview: renders previews
src/components/Sidebar.js - Room sidebar → Pusher events: subscribes updates
src/components/Sidebar.js - Room chat → State provider: reads user
src/components/Chat.js - Room chat → API client: loads and sends
src/components/Chat.js - Room chat → Pusher events: subscribes messages
src/components/Chat.js - API client → Messaging REST API: sends HTTP requests
src/axios.js - Messaging REST API → MongoDB: uses persistence
README.md