Skip to content

This project part Full Stack Web Developer Nanodegree from Udacity

Notifications You must be signed in to change notification settings

Saleh-Alibrahim/Coffee-Shop-Full-Stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Coffee Shop Full Stack

Full Stack Nano - IAM Final Project

This project part Full Stack Web Developer Nanodegree from Udacity

Installing Dependencies

Developers using this project should already have Python3, pip, node, and npm installed.

Front End

Installing Dependencies

Installing Node and NPM

This project depends on Nodejs and Node Package Manager (NPM). Before continuing, you must download and install Node (the download includes NPM) from https://nodejs.com/en/download.

Installing Ionic Cli

The Ionic Command Line Interface is required to serve and build the frontend. Instructions for installing the CLI is in the Ionic Framework Docs.

Installing project dependencies

This project uses NPM to manage software dependencies. NPM Relies on the package.json file located in the frontend directory of this repository. After cloning, open your terminal and run:

npm install

Running Your Frontend in Dev Mode

Ionic ships with a useful development server which detects changes and transpiles as you work. The application is then accessible through the browser on a localhost port. To run the development server, cd into the frontend directory and run:

ionic serve

tip: Do not use ionic serve in production. Instead, build Ionic into a build artifact for your desired platforms. Checkout the Ionic docs to learn more

Backend

Installing Dependencies

Python 3.7

Follow instructions to install the latest version of python for your platform in the python docs

PIP Dependencies

Once you have your virtual environment setup and running, install dependencies by naviging to the /backend directory and running:

pip install -r requirements.txt

This will install all of the required packages we selected within the requirements.txt file.

Key Dependencies

  • Flask is a lightweight backend microservices framework. Flask is required to handle requests and responses.

  • SQLAlchemy and Flask-SQLAlchemy are libraries to handle the lightweight sqlite database. Since we want you to focus on auth, we handle the heavy lift for you in ./src/database/models.py. We recommend skimming this code first so you know how to interface with the Drink model.

  • jose JavaScript Object Signing and Encryption for JWTs. Useful for encoding, decoding, and verifying JWTS.

Running the server

From within the ./src directory first ensure you are working using your created virtual environment.

Each time you open a new terminal session, run:

To run the server, execute:

python main.py

The server will run in debug mode if you need to disable this you

need to remove app.debug = True

Setup Auth0

  1. Create a new Auth0 Account
  2. Select a unique tenant domain
  3. Create a new, single page web application
  4. Create a new API
    • in API Settings:
      • Enable RBAC
      • Enable Add Permissions in the Access Token
  5. Create new API permissions:
    • get:drinks-detail
    • post:drinks
    • patch:drinks
    • delete:drinks
  6. Create new roles for:
    • Barista
      • can get:drinks-detail
    • Manager
      • can perform all actions
  7. Test your endpoints with Postman.

Authors

Saleh Alibrahim authored the api (main.py) , authorization (auth.py), and this README. All other project files, including the models and frontend, were created by Udacity as a project template for the [Full Stack Web Developer Nanodegree]

About

This project part Full Stack Web Developer Nanodegree from Udacity

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published