With the recent integration of Reverb into the Laravel ecosystem, real-time features have become more accessible without the need for external services. In this project, I aim to explore various scenarios utilizing this capability.
- Live Location Sharing: Enable real-time sharing of locations between drivers and passengers (client-to-client).
- You can find the scenario description here.
- You can find the scenario description here.
- Notification Broadcasting: Trigger events and broadcast notifications to specific clients or presence channels.
- You can find the scenario description here.
- You can find the scenario description here.
- Real-Time Currency Market Updates: Broadcast real-time updates of currency market prices.
- You can find the scenario description here.
- You can find the scenario description here.
- Client-Side Data Persistence: Receive and persist user-provided information on the socket platform in real-time (coming soon).
Follow these steps to set up the project on your local environment:
Before you begin, make sure you have the following prerequisites installed on your system:
-
Clone the project from GitHub:
git clone https://github.com/mohaphez/laravel-reverb.git cd laravel-reverb
-
Copy the
.env.example
file and rename it to.env
:cp .env.example .env
-
Install the project dependencies using Composer:
docker run --rm \ -u "$(id -u):$(id -g)" \ -v "$(pwd):/var/www/html" \ -w /var/www/html \ laravelsail/php82-composer:latest \ composer install --ignore-platform-reqs --no-scripts
-
Start the development environment using Docker Sail:
./vendor/bin/sail up -d
-
Update the project dependencies using Composer (Important):
./vendor/bin/sail composer update
-
Restart Docker Sail:
./vendor/bin/sail down && ./vendor/bin/sail up
-
Generate an application key:
./vendor/bin/sail php artisan key:generate
-
Run migrations the database:
./vendor/bin/sail php artisan migrate
-
Run seed the database:
./vendor/bin/sail php artisan module:seed
-
Run reverb server:
./vendor/bin/sail php artisan reverb:start --debug
-
Install npm dependencies:
./vendor/bin/sail npm install ./vendor/bin/sail npm run mars:install
-
Run vite:
./vendor/bin/sail npm run mars:dev
You can access the panel by opening your web browser and navigating to:
http://localhost/login
- Username: [email protected]
- Password: password
- Username: [email protected]
- Password: password
- Username: [email protected]
- Password: password