A modern real-time chat application built with Laravel, providing seamless communication between users with real-time messaging capabilities.
- Real-time messaging between users
- User authentication and authorization
- Responsive web interface
- Message history and persistence
- Online/offline user status
- Notification system
- Clean and intuitive UI
Before you begin, ensure you have the following installed:
- PHP 8.2 or higher
- Composer
- Bun
- PostgreSQL database
- Git
- Clone the repository:
git clone https://github.com/redhat127/chat-app-laravel.git
cd chat-app-laravel- Install PHP dependencies:
composer install- Install JavaScript dependencies:
bun install- Create environment configuration file:
cp .env.example .env- Generate application key:
php artisan key:generate- Create a symbolic link to the storage directory:
php artisan storage:link- Update your
.envfile with database credentials:
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=chat_app_laravel_db
DB_USERNAME=postgres
DB_PASSWORD=- Configure broadcasting for real-time features:
php artisan install:broadcastingWhen prompted, choose Reverb as your broadcasting driver. This will automatically configure the necessary environment variables for real-time messaging.
- Run database migrations and seed the database:
php artisan migrate --seed- Compile assets for development:
bun run dev- Start the development server:
php artisan serve- Start the Reverb broadcasting server (in a separate terminal):
php artisan reverb:start --debug- Start the queue listener (in another separate terminal):
php artisan queue:listenThe application will be available at http://localhost:8000
The application is structured as follows:
- Backend: Laravel framework handles API endpoints, database operations, and business logic
- Frontend: React with Inertia.js for server-driven single-page application experience
- Database: PostgreSQL stores user information, messages, and conversations
- Broadcasting: Real-time events powered by Laravel Reverb
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions, please open an issue on the GitHub repository.
Happy chatting! 💬