A modern, real-time messenger built with Laravel (API + WebSockets via Reverb) and React (SPA).
It features Breeze authentication, user & group management, rich attachments, voice notes, emoji support, and smooth media previews.
- 🔌 Realtime messaging with Laravel Reverb (WebSockets)
- 👥 User & group CRUD (create / read / update / delete)
- 🖼️ Upload images, videos, and generic files
- 🎙️ Send voice messages
- 🙂 Emoji picker in the composer
- 👀 Preview images & videos before sending
▶️ Inline media player (image & video viewer)- 🔐 Authentication with Laravel Breeze + Sanctum
- 📱 Responsive React UI
- PHP 8.2+, Laravel 10/11
- Laravel Reverb – real-time WebSocket broadcasting
- Laravel Breeze (Auth) + Sanctum
- MySQL
- Public disk storage for media uploads
- React 18 + Vite
- JavaScript
- Tailwind CSS
| Type | Content |
|---|---|
| 💬 Text / Emoji | { content: string } |
| 🎙️ Voice Note | Multipart form with audio file (e.g. audio/webm) |
| 🖼️ Image / Video / File | Multipart form with file and optional caption |
- Recorded on the client via MediaRecorder API
- Uploaded as
audio/webmoraudio/mpeg - Server-side validation for MIME type and duration
- Stored alongside other attachments
- Rendered using a native HTML
<audio>player
- Preview images and videos before upload
- Use Object URLs for local preview
- Replace preview with final server URL after upload
- For video:
<video controls> - For images: lightbox or gallery-style preview
Special thanks to the creators of these amazing tools and frameworks:
- Laravel, Breeze, Sanctum, Reverb
- React, Vite, Tailwind CSS
This project is released under the MIT License — free for personal or commercial use.
Follow the steps below to get the project running locally:
# Clone the repository
git clone https://github.com/sajadghanbari/Laravel.git
# Navigate into the project directory
cd Laravel
# Install dependencies
composer install
npm install && npm run dev
# Copy environment file
cp .env.example .env
# Configure your database in the .env file, then migrate:
php artisan migrate --seed
# Start the local server
php artisan serve
php artisan reverb:start --debug

