DataScientest / cooking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cooking API

Cooking API is an open source API to organize lunch orders for multiples peoples in a same place

Specifications

Data

  • order : id, restaurant, menu, day, hour
  • participant : id, name, mail, order_id (reference), order_details

Routes

CRUD (create, read, update, delete)

  • CRUD order
  • CRUD particant

Functionalities

  • As an organisator i want to create a new order
  • As a participant i want to order by adding my name, email and order_details

Table of Contents

  1. General Info
  2. Technologies
  3. Installation
  4. Testing app
  5. Proposition

General Info


this project is my attempt at the open technical test "Cooking app".

Technologies


A list of technologies used within the project:

  • Flask : Version 2.0.1
  • Python : Version 3.8.6
  • Docker

Installation and Running the project


clone the project and inside the project directory launch. To create a docker image execute:

$ docker build . -t cooking

To run the docker image execute:

$ docker run -p 5000:5000 cooking 

and visit with your browser http://localhost:5000 To run unit tests inside the container execute:

$ docker run -it cooking /bin/sh

and then in the new command promt run

$ pip install pytest && pytest

Testing the app


  • Visit with your browser http://localhost:5000
  • Register and then Login
  • The organizer ( Admin ) can access the "command dashboard" after clicking on Command Dashboard where he will see the list of the commands ( restaurant name, menu, date and hour ), he can edit,delete and add a command.
  • The organizer can can access the "participant dashboard" after clicking on Participant Dashboard where he will see the list of the commands (name, mail ), he can edit,delete, and add a participant, he can choose which command the participant will participate from a select list.
  • The Participant can access a screen where he will find the list of the command he can participate in a command when he click on order.

Proposition

  • A table representing restaurants ( id, name,menu) will be better .
  • The Menu for the moment is a Text but we can attach an image instead if it's possible.
  • The Tests that I wrote cover only the authentication functionality and The command CRUD.

About

License:Other


Languages

Language:Python 66.3%Language:HTML 27.9%Language:CSS 5.0%Language:Dockerfile 0.8%