Skip to content

Nkoli/food_vendor

Repository files navigation

Food Vendor CI Coverage Status

FOOD_VENDOR

Food Vendor is a backend based restaurant-like application where vendors can list their meals and/or menus and customers can place an order.

Development

Restaurant API built with Django and Django Rest Framework

Tech

Food Vendor is written in Python3 and Django 3.0.9

Installation

  • Install Python3 on your machine. If it's already preinstalled, upgrade to Python3.

  • Clone the repository $ git clone https://github.com/Nkoli/food_vendor.git

  • Install the required dependencies with $ pip install -r requirements.txt

  • Create a .env file in your root directory using the .env.example file as a guide.

Using Docker

  • Run $ docker-compose up -d --build to build the container the first time. Run $ docker-compose up for subsequent start-ups. To stop the server, run $ docker-compose down.

  • To create a superuser within the docker container, run $ docker-compose exec web python manage.py createsuperuser.

Local Development Environment Usage

  • Start the application $ python manage.py runserver

  • Use Postman to consume the available endpoints.

  • A user can:

  • Create an account.

  • Log into their account.

  • Log out

  • If the user is a vendor, they can:

    • Add their business name to their profile.
    • Create menus
    • Update menu
    • Delete menu
    • Create meals
    • Update meal
    • Delete meal
    • Determine how many times they want a menu to occur every week.
    • Check and update customer order status.
  • If the user is a customer, they can:

    • View all available meals.
    • View all available menus.
    • Place an order for a meal or several meals.
    • Place an order for a menu if they prefe.
    • Check their order status.
    • Cancel an order

Endpoints

Request type Endpoint Action
POST /auth/register Create a user
POST /auth/login/ Log a user in
POST /auth/logout/ Sign a user out
POST /meals/ Create a meal
GET /meals/ Get all meals
GET /meals/:id Get a single meal
PATCH /meals/:id Update a meal
DELETE /meals/:id Delete a meal
POST /menus/ Create a menu
GET /menus/ Get all menus
GET /menus/:id Get a single meal
PATCH /menus/:id Update a menu
DELETE /menus/:id Delete a menu
POST /orders/ Create an order
GET /orders/ Get all orders
GET /orders/:id Get a single order
PATCH /orders/:id Update an order
DELETE /orders/:id Delete an order

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors