Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pateash/appointy-hackathon
Winner eCommerse API For Appointy-hackathon
https://github.com/pateash/appointy-hackathon
api ecommerce hackathon laravel laravel-5
Last synced: 11 days ago
JSON representation
Winner eCommerse API For Appointy-hackathon
- Host: GitHub
- URL: https://github.com/pateash/appointy-hackathon
- Owner: pateash
- Created: 2017-07-28T19:26:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-29T21:46:24.000Z (over 7 years ago)
- Last Synced: 2024-11-21T17:46:14.147Z (2 months ago)
- Topics: api, ecommerce, hackathon, laravel, laravel-5
- Language: PHP
- Homepage:
- Size: 297 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## About API
This API provides Ecommerce 'Order return' Functionality.
- Simple, fast routing and dependency injection with [Laravel](https://laravel.com/docs/routing).
- Based on Rest API Guidelines
- Automatic Migrations for Models## Install and Run
- clone project
- install composer dependencies using `composer install` (of course you need, php and composer
- create `.env` file by copying from `.env.example`
- run `php artisan key:generate` command, this will get APP_KEY in `.env` file
- create database and fill information in `.env' file
- now run migrations for creating table `php artisan migrate`
- you will need to seed your database , use following command steps
- run `php artisan tinker` to enter in to command line tinker
- enter `factory(App\User::class,100)->create()`, this will seed your `User` table with 100 records
- enter `factory(App\Order::class,100)->create()`, this will seed your `Order` table with 100 records
- enter `factory(App\Agent::class,10)->create()`, this will seed your `Agent` table with 10 records
- Now run `php artisan serve`, which will run your app on `localhost:8000`.
- That's It, You can modify and create a pull request, Thanks.>Remember Initially, all agents are free and return Orders are zero.
## API Documentation
#### Welcome Page
>` GET / ` will take you to the Welcome Page. where you will get same documentation.#### User
> Every thing about Users
| API Route | Functionality |
| ------------- |:-------------:|
| GET /users | All Registered Users |
| GET /user/{userId} | User Detail |
| GET /user/{userId}/orders | All Orders By User |#### Order
>Every thing about Simple Orders (not return orders)
as we are assuming some orders has been placed and delivered)
| API Route | Functionality |
| ------------- |:-------------:|
| GET /orders | All Delivered Orders |
| GET /order/{orderId} | Order Details |
| GET /order/{orderId}/agent | Agent who has Delivered Order |
>Here agent is person who has delivered order ( not the one who will be picking it for return)#### Return Orders
>Every thing about Return Orders ( which will be assigned to free or nearest Agent)
| API Route | Functionality |
| ------------- |:-------------:|
| GET /returns | All Return Placed Orders |
| GET /return/{returnId} | Return Order Details |
| GET /return/place/{orderId} | Place Order with for return |
| GET /return/complete/{orderId} | Return has been SuccessFull |
>Here agent is person who has delivered order ( not the one who will be picking it for return)#### Agent
> Every thing about Delivery Agent
| API Route | Functionality |
| ------------- |:-------------:|
| GET /agents | All Registered Agents |
| GET /agent/{agentId} | Agent Detail |
| GET /agent/{agentId}/orders | All Orders Delivered By Agent |
| GET /agents/free | All Free Agents (with no assigned order) |
| GET /agents/busy | All Busy Agents (with assigned order/orders) |## Bugs and Fixes
Every thing anyone create has bugs and some of them can be fixed, If you find one,
please mail me at [[email protected]](mailto:[email protected])## License
This API is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).