thixpin / datastream-api-lumen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DataStream API - Lumen

This is a simple API that allows you to stream data for the food delivery app. It is built using the Lumen framework.

Requirements

  • PHP >= 8.3
  • Composer
  • MongoDB
php-extenstions
  • ext-mongodb
MongoDB
  • We need to use cluster mode for the MongoDB. Cause of the MongoDB standalone mode does not support the change stream feature.

Installation

$ 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

API Endpoints

  • 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

License

The Lumen framework is open-sourced software licensed under the MIT license.

About


Languages

Language:PHP 92.3%Language:JavaScript 3.8%Language:Dockerfile 3.1%Language:Shell 0.8%