How demarillacizere/realtime-chat works
This Laravel/Livewire application supports account access and a real-time text-chat workflow: users enter the chat, choose or create conversations, and send messages that appear in the interface. The documented product also includes registration, login, email verification, profile management, timestamps, and online presence, with MySQL persistence and Pusher-based WebSockets. Chat component internals and presence wiring were not fully sampled, so those relationships are shown only where the source index or README supports them; optional or unverified links are dashed.
Main entry points: Chatbox.php Conversation messaging · MessageSent.php Message broadcast event · web.php Web routes · Conversation.php Conversation model
Components 20
Accounts and access
- Authentication routes
routes/auth.php - Registration
app/Http/Controllers/Auth/RegisteredUserController.php - Login sessions
app/Http/Controllers/Auth/AuthenticatedSessionController.php - Login validation
app/Http/Requests/Auth/LoginRequest.php - Profile management
app/Http/Controllers/ProfileController.php
Chat experience
- Chat page
app/Livewire/Chat/Main.php - Conversation list
app/Livewire/Chat/ChatList.php - Create conversation
app/Livewire/Chat/CreateChat.php - Conversation messaging
app/Livewire/Chat/Chatbox.php - Send message UI
app/Livewire/Chat/SendMessage.php - Online presence
routes/channels.php
Chat domain
- Message broadcast event
app/Events/MessageSent.php - Conversation model
app/Models/Conversation.php - Message model
app/Models/Message.php - User model
app/Models/User.php
Application platform
- Laravel HTTP entry
public/index.php - Web routes
routes/web.php - MySQL database
config/database.php
Other components
- Web user
- Pusher WebSockets
Connections 27
- Web user → Laravel HTTP entry: requests pages
- Laravel HTTP entry → Web routes: dispatches web
- Web routes → Chat page: routes chat
routes/web.php - Web routes → Create conversation: routes creation
routes/web.php - Web routes → Authentication routes: loads auth routes
routes/web.php - Authentication routes → Registration: routes registration
routes/auth.php - Authentication routes → Login sessions: routes login
routes/auth.php - Login sessions → Login validation: authenticates with
app/Http/Controllers/Auth/AuthenticatedSessionController.php - Registration → User model: creates account
app/Http/Controllers/Auth/RegisteredUserController.php - Chat page → Conversation list: renders list
- Chat page → Conversation messaging: renders conversation
- Conversation list → Conversation model: loads conversations
- Create conversation → Conversation model: creates conversation
- Conversation messaging → Message model: uses messages
app/Livewire/Chat/Chatbox.php - Conversation messaging → Conversation model: uses conversation
app/Livewire/Chat/Chatbox.php - Conversation messaging → User model: uses participants
app/Livewire/Chat/Chatbox.php - Conversation messaging → Message broadcast event: dispatches event
app/Livewire/Chat/Chatbox.php - Send message UI → Message model: persists message
- Message broadcast event → Message model: references message
app/Events/MessageSent.php - Message broadcast event → Conversation model: references conversation
app/Events/MessageSent.php - Message broadcast event → User model: references sender
app/Events/MessageSent.php - Conversation messaging → Online presence: shows status
- Message broadcast event → Pusher WebSockets: broadcasts via
- Conversation model → MySQL database: persists data
- Message model → MySQL database: persists data
- User model → MySQL database: persists data
- Web routes → Profile management: routes profile
routes/web.php