Skip to content

A backend RESTful API built-in Flask, with an Ionic frontend, that provides a variety of drinks to order from, with the ability to create new drinks, if permitted (Using Auth0/RBAC)

License

Notifications You must be signed in to change notification settings

RayanAlkhelaiwi/Coffeeshop_Fullstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coffeeshop Full Stack - Ionic/Flask

made-with-python made-with-ionic License: MIT

A backend RESTful API built-in Flask, with an Ionic frontend, that provides a variety of drinks to order from, with the ability to create new drinks, if permitted (Using Auth0/RBAC)

Permitted User UI Drink Creation Window
Permitted-User-UI Drink-Creation-Window

The backend code follows PEP-8 style guidelines.

Getting Started

  • Base URL: Currently this backend app can only be run locally. It's hosted by default at 127.0.0.1:5000 which is set as a proxy in the fronend configuration.

  • Authentication: It require an Auth0 authentication and authorization for getting detailed drinks and drinks creation & deletion.

From the backend folder run pip install -r requirements.txt. All required packages are included in the requirements file.

To run the application, run the following commands inside the backend folder:

export FLASK_APP=src/api.py
export FLASK_ENV=development
flask run --reload

Frontend

Inside the fontend folder, run the following commands to start the client:

ionic serve

By default, the frontend will run on localhost:8100.

Error Handling

Errors are returned as JSON obejcts in the following format:

{
  "error": 404, 
  "message": "Not Found", 
  "success": false
}

The Error types the API returns when requests fail are:

HTTP Status Code Response
401 Client Error
404 Not Found
422 Unprocessable Entity
AuthError Authentication Error

About

A backend RESTful API built-in Flask, with an Ionic frontend, that provides a variety of drinks to order from, with the ability to create new drinks, if permitted (Using Auth0/RBAC)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published