This is a simple API that allows you to stream data for the food delivery app. It is built using the Lumen framework.
- PHP >= 8.3
- Composer
- MongoDB
- ext-mongodb
- We need to use cluster mode for the MongoDB. Cause of the MongoDB standalone mode does not support the change stream feature.
$ git clone
$ cd datastream-api-lumen
$ composer install
$ cp .env.example .env
$ php artisan key:generate
$ php artisan db:seed
$ php -S localhost:8080 -t public
- POST /seed - Seed data
- DELETE /seed - Clear data
- POST /orders - Create order
- PATCH /orders/{id}/cancel - Cancel order
- GET /orders - Stream orders
- GET /orders/{id} - Stream order detail
- GET /drivers - Stream drivers
- GET /drivers/{id} - Stream driver detail
- [x]
- GET /nostream/orders - Index orders
- GET /nostream/orders/{id} - Show order
- GET /nostream/drivers - Index drivers
- GET /nostream/drivers/{id} - Show driver
- GET /nostream/customers - Index customers
- GET /nostream/customers/{id} - Show customer
The Lumen framework is open-sourced software licensed under the MIT license.