A real-time chat application built with Laravel, Livewire, Alpine.js, and Laravel Reverb.
Before installing the project, ensure you have the following installed on your local machine:
- PHP >= 8.2
- Composer
- Node.js & NPM
- MySQL or any supported database engine
Follow these sequential steps to get the application up and running locally:
git clone https://github.com/CodeWithAtwaa/Chat-app.git
cd Chat-appInstall both backend PHP packages and frontend JavaScript dependencies:
composer install
npm installCopy the example environment file and generate your application encryption key:
cp .env.example .env
php artisan key:generate- Open your
.envfile and configure your database connection details (DB_DATABASE,DB_USERNAME,DB_PASSWORD). - Run the migrations and seeders to create tables and dummy data:
php artisan migrate --seedTo run the entire ecosystem locally, you need to start the following three services concurrently (in separate terminal windows or using a process manager):
Run the local PHP development server:
php artisan serveRun Vite to compile and hot-reload your Tailwind CSS and JavaScript assets:
npm run devThe .env.example Reverb settings work seamlessly for local development. Start the WebSocket server using:
php artisan reverb:start- Backend: Laravel (Eloquent, Broadcasting)
- Frontend: Livewire, Alpine.js, Tailwind CSS
- WebSockets: Laravel Reverb