Fastchop is a food delivery service app for a restaurant.
Template hosted at https://emmygozi.github.io/Fastchop/UI/
API Hosted on https://fastchop.herokuapp.com/api/v1/
Find relevant Pivotal Tracker stories at [https://www.pivotaltracker.com/projects/2196733)
- git clone Fastchop
- Run
npm install or yarn install
to install packages - Run
npm run createtables or yarn createtables
to setup local database - Run
npm run start or yarn start
to start the server - Navigate to localhost:8000 in browser to access the application
- Postman - API Toolchain
- After installing as shown above
- Navigate to localhost:8000 in Postman to access the application
-
After installing as shown
-
Run
npm test or yarn test
-
It will run test and display coverage data as generated by Istanbul's nyc
You can run npm run start:dev or yarn start:dev
in development to use Nodemon
Nodemon watches for file changes and restarts your code.
- Sign Up
- Sign In
- Create fast-food items
- Modify fast-food items
- Delete fast-food items
- Accept orders
- Reject orders
- Sign Up
- Sign In
- Make orders
- View order history
HTTP VERB | ENDPOINT | FUNCTIONALITY | EXPECTED RESPONSE |
---|---|---|---|
POST / | /api/v1/auth/signup | signup to application request | { "name": "your name", "email": "yourmail@something.com", "password": "yourpassword", "address": "your address here", "phone": "1029283746" } |
POST / | /api/v1/auth/login | login to application request | { "email": "yourmail@something.com", "password": "yourpassword" } |
GET / | /api/v1/orders | Fetch all orders | { "state": "Succesful", "message": "Retrieved all orders", "rows": [ { "id": 11, "dateadded": "2018-09-28T11:22:50.139Z", "name": "Chicken and Chipddddysyyyss", "description": "Chow bellyful", "price": 1500, "quantity": 13 }, { "id": 10, "dateadded": "2018-09-27T11:18:21.470Z", "name": "Chicken and Chipddddysyyyss", "description": "Chow bellyful", "price": 1500, "quantity": 13 }, { "id": 9, "dateadded": "2018-09-26T18:10:45.686Z", "name": "Chicken and Chips", "description": "Chow bellyful", "price": 1500, "quantity": 39 }, { "id": 8, "dateadded": "2018-09-26T18:09:49.076Z", "name": "Chicken and Chips", "description": "Chow bellyful", "price": 1500, "quantity": 39 }, { "id": 7, "dateadded": "2018-09-26T18:08:44.089Z", "name": "Chicken and Chips", "description": "Chow bellyful", "price": 1500, "quantity": 39 } ] } |
GET /:id | /api/v1/users/:id/orders | Fetch a specified order | { "state": "Succesful", "message": "Retrieved your order", user: { "id": 7, "dateadded": "2018-09-26T18:08:44.089Z", "name": "Chicken and Chips", "description": "Chow bellyful", "price": 1500, "quantity": 39 } } |
GET /:id | /api/v1/orders/:id | Fetch a specified order | "state": "Succesful", "message": "Retrieved an order", "rows": [ { "id": 11, "dateadded": "2018-09-28T11:22:50.139Z", "name": "Chicken and Chipddddysyyyss", "description": "Chow bellyful", "price": 1500, "quantity": 13 }, |
POST / | /api/v1/orders | Make an order | { "mealid": 6, "quantity": 3, } |
PUT /:id | /api/v1/orders/:id | Modify an order | { "status": "processing" } |
GET / | /api/v1/menu | Fetch all food item | { "message": "Retrieved all food items", "menu": [ { "id": 1, "name": "Extra large pizza", "description": "Get your meals on the go in the most efficient manner. Our snacks are very tasty", "price": 1500, "imageurl": "http://imagesavedhere1" }, { "id": 2, "name": "Burger and soda", "description": "Get your meals on the go in the most efficient manner. Our snacks are very tasty", "price": 1500, "imageurl": "http://imagesavedhere2" }, { "id": 3, "name": "Fried Chicken", "description": "Get your meals on the go in the most efficient manner. Our snacks are very tasty", "price": 1000, "imageurl": "http://imagesavedhere3" } ] } |
GET /:id | /api/v1/menu/:id | Fetch a specified food item | { "state": "successfull", "message": "Retrieved your menu", "id": 3, "name": "Fried Chicken", "description": "Get your meals on the go in the most efficient manner. Our snacks are very tasty", "price": 1000, "imageurl": "http://imagesavedhere3" } |
POST / | /api/v1/menu | Make an food item | { "state": "successfull", "message": "Retrieved all food items", "id": 7, "name": "Fried Chicken", "description": "Get your meals on the go in the most efficient manner. Our snacks are very tasty", "price": 1000, "imageurl": "http://imagesavedhere3" } |
PUT /:id | /api/v1/menu/:id | Modify an food item | { "state": "successfull", "message": "update menu" "id": 3, "name": "Fried Chicken", "description": "Get your meals on the go in the most efficient manner. Our snacks are very tasty", "price": 1000, "imageurl": "http://imagesavedhere3" } |
DELETE /:id | /api/v1/menu/:id | Delete an food item | { "state": "successfull", "message": "deleted menu", "id": 3, "name": "Fried Chicken", "description": "Get your meals on the go in the most efficient manner. Our snacks are very tasty", "price": 1000, "imageurl": "http://imagesavedhere3" } |
- NodeJS - Runtime Environment
- ExpressJs - Web Application Framework
- Yarn - Dependency Manager
- Npm - Dependency Manager
- ESLint - Linter Tool
- Babel - Compiler for Next Generation JavaScript
- Mocha - JavaScript Test Framework for API Tests
- Chai - TDD/BDD Assertion Library for Node
- Istanbul(nyc) - Code Coverage Generator