Skip to content

christonegicho/Fast-Food-Fast

 
 

Repository files navigation

Fast-Food-Fast

Build Status Coverage Status Maintainability Test Coverage

An online food ordering system which allow users register, login and order food items online

Getting Started

These instructions bellow will guide you in getting a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You will need to have the following softwares installed on your local machine

  • node js & npm

Installing

A step by step series of instruction to install and get a development env running

npm install

To start the server run

npm start

Kudos 👍 now your API server is running at http://localhost:3000/

Features

  • User can place a new order for food.
  • User can get a list of orders.
  • User can fetch a specific order.
  • User can update the order status.

Running the tests

To run mocha test

npm run test

Endpoints

HTTP verbsRoute EndpointsFunctionPayload
POSTapi/v1/auth/signupSignup user
{
  "name": "string",
  "email": "string",
  "phone": "string",
  "password": "string"
}
POSTapi/v1/auth/loginLogin user
{
  "email": "string",
  "password": "string"
}
POSTapi/v1/menuAdd menu item
{
	"name": "string",
	"category": "string",
	"description": "text",
	"price": "number",
	"image": "text"
}
GETapi/v1/menuGet all menu itemsNone
PuTapi/v1/menu/:menuIdUpdates a specific menu item
{
	"name": "string",
	"category": "string",
	"description": "text",
	"price": "number",
	"image": "text"
}
GETapi/v1/menu/:userId/ordersGet all orders of a specific userNone
GETapi/v1/ordersGet all ordersNone
GETapi/v1/orders/:orderIdGet a specific orderNone
POSTapi/v1/ordersPost a user order
{
  "address": "string",
  "foodItems": [
    { "foodId": "string", "quantity": "number" },
    ...
  ]
}
PUTapi/v1/orders/:orderIdUpdate order with the given orderId"status": string

Viewing the UI

To view the UI template, open the UI/index.html or UI/user.html or UI/admin.html from the root directory on your browser

Note: you do not need to start your server when running test, the mocha test run automatically creates an instance of the server on port 3000 and therefore will generate an error when your test tries to create identical server

Credits

Credits@Andela 21 program

About

An online food ordering system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 53.2%
  • HTML 25.8%
  • CSS 21.0%