Udacity has decided to open a new digitally enabled cafe for students to order drinks, socialize, and study hard. But they need help setting up their menu experience.
You have been called on to demonstrate your newly learned skills to create a full stack drink menu application. The application must:
- Display graphics representing the ratios of ingredients in each drink.
- Allow public users to view drink names and graphics.
- Allow the shop baristas to see the recipe information.
- Allow the shop managers to create new drinks and edit existing drinks.
For this project, I have the url configuration:
AUTH0_DOMAIN = 'yxfs.us.auth0.com' ALGORITHMS = ['RS256'] API_AUDIENCE = 'drinks'
Two dummy account:
(1)Barista User: [email protected] Password: Udacity123*
token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InBTSm12c19JSF94ZlhFeUhXREVmOSJ9.eyJpc3MiOiJodHRwczovL3l4ZnMudXMuYXV0aDAuY29tLyIsInN1YiI6ImF1dGgwfDYxMTk2ZTc5MjAxYzJlMDA2OTg1ODY2ZSIsImF1ZCI6ImRyaW5rcyIsImlhdCI6MTYyOTA1NzE2OCwiZXhwIjoxNjI5MDY0MzY4LCJhenAiOiJKQmI0RXZxb0Q1Nm9nNUdQczJJMWY0MkZ5UG5pUW1IWSIsInNjb3BlIjoiIiwicGVybWlzc2lvbnMiOlsiZ2V0OmRyaW5rcy1kZXRhaWwiXX0.JYXFmahdmBVN0C2j8GT15iIAcrX4Y3MgoFrEXj-u0VM3YaBtHDFUXBWAnAiCdqflWCYmypXyn3MlHRy-8j5dR37W_hTGrpbctzoCwVuIbuVMMCddGiEoLGulslniXKXUKhvjM0H2lLq4N8WvMgNM_QufmNzY59cdBufvyCY1Ks4Z4b4KubvH3Exau0Ba7sMpMplStRLzpz6zlzoprAxbmeLXhY_pHur5MZv99T3mFic-cYdr4qPOrylqaDtaxR1CUL9CdJ1TLejdHzHDElcZbsohozzULdWXHZE4NOdIdhUH-geAXa8fwGc8fbI5GWHAhhL0Tun0AUSpUTuqZ4tESQ
(2) manageer: User: [email protected] Password: Udacity123* token:
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InBTSm12c19JSF94ZlhFeUhXREVmOSJ9.eyJpc3MiOiJodHRwczovL3l4ZnMudXMuYXV0aDAuY29tLyIsInN1YiI6ImF1dGgwfDYxMTk2ZTUzYmYwZGI5MDA2OTdmMjg4ZiIsImF1ZCI6ImRyaW5rcyIsImlhdCI6MTYyOTA1Njk3MCwiZXhwIjoxNjI5MDY0MTcwLCJhenAiOiJKQmI0RXZxb0Q1Nm9nNUdQczJJMWY0MkZ5UG5pUW1IWSIsInNjb3BlIjoiIiwicGVybWlzc2lvbnMiOlsiZGVsZXRlOmRyaW5rcyIsImdldDpkcmlua3MtZGV0YWlsIiwicGF0Y2g6ZHJpbmtzIiwicG9zdDpkcmlua3MiXX0.CJkIU6vlR8W3VuEZs9CSeYiB2tsGzMcil_d9MG2MlcgiDTwoeCR3HmpsmpB3S4423jIjK-w2jISnUho4c9eqdg4tac0YLxvQPnINV9pdRnm9YmaeQLgM0daEOwOeHMJgopTwq2oXkCnfP7a9hPcwxsJQwZ22wRPzPyjBzlIyHsoL7W0KlPSL1guVIJHJ13F_nY7KkTsWHp2KXIT-7Z6vn3pFuMsojNiCJtKtGeRi2EFvMiP43MCFv1PiFQo4u7K17Xd4oTmRKQ_77cC8d4JZCRgxWOL9lg39k7IB1vb-kxhsZITjQEYE1xtqpQg9cDJUzmIMO01Ek5mH50cWIz3Lpw
The ./backend
directory contains a Flask server and SQLAlchemy module. View the README.md within ./backend for more details.
To run this app:
(1)uncommented the line "db_drop_and_create_all()" on line 25 in (/backend/src/api.py)
(2) Terminal cd to "/backend/src" and run
export FLASK_APP=api.py
flask run --reload
(3) commented the line "db_drop_and_create_all()" on line 25 in (/backend/src/api.py) before run any test in postman
The ./frontend
directory contains a complete Ionic frontend to consume the data from the Flask server. You will only need to update the environment variables found within (./frontend/src/environment/environment.ts) to reflect the Auth0 configuration details set up for the backend app.