{"id":14065059,"url":"https://github.com/wanderindev/u-cafe","last_synced_at":"2025-07-29T19:34:06.625Z","repository":{"id":38635612,"uuid":"228940123","full_name":"wanderindev/u-cafe","owner":"wanderindev","description":"Coffee Shop Full Stack is the third project for the 2019 Udacity Full-stack Developer Nanodegree. The project is associated with the Identity and Access Management course. ","archived":false,"fork":false,"pushed_at":"2023-01-07T12:57:58.000Z","size":1089,"stargazers_count":1,"open_issues_count":30,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-30T21:46:11.184Z","etag":null,"topics":["auth0","flask","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wanderindev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-18T23:47:31.000Z","updated_at":"2023-10-28T17:21:31.000Z","dependencies_parsed_at":"2023-02-07T05:16:36.919Z","dependency_job_id":null,"html_url":"https://github.com/wanderindev/u-cafe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wanderindev%2Fu-cafe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wanderindev%2Fu-cafe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wanderindev%2Fu-cafe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wanderindev%2Fu-cafe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wanderindev","download_url":"https://codeload.github.com/wanderindev/u-cafe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228046042,"owners_count":17861084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth0","flask","sqlalchemy"],"created_at":"2024-08-13T07:04:15.987Z","updated_at":"2024-12-04T04:30:41.608Z","avatar_url":"https://github.com/wanderindev.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eRESTful API for Udacity coffee shop application :coffee:\u003c/h1\u003e\r\n\u003cp\u003e\r\n  \u003cimg src=\"https://img.shields.io/badge/version-1.0-blue.svg?cacheSeconds=2592000\" /\u003e\r\n  \u003ca href=\"https://github.com/wanderindev/u-cafe/blob/master/README.md\"\u003e\r\n    \u003cimg alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\" target=\"_blank\" /\u003e\r\n  \u003c/a\u003e\r\n  \u003ca href=\"https://github.com/wanderindev/u-cafe/graphs/commit-activity\"\u003e\r\n    \u003cimg alt=\"Maintenance\" src=\"https://img.shields.io/badge/Maintained%3F-yes-brightgreen.svg\" target=\"_blank\" /\u003e\r\n  \u003c/a\u003e\r\n  \u003ca href=\"https://github.com/wanderindev/u-cafe/blob/master/LICENSE.md\"\u003e\r\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" target=\"_blank\" /\u003e\r\n  \u003c/a\u003e\r\n  \u003ca href=\"https://twitter.com/JavierFeliuA\"\u003e\r\n    \u003cimg alt=\"Twitter: JavierFeliuA\" src=\"https://img.shields.io/twitter/follow/JavierFeliuA.svg?style=social\" target=\"_blank\" /\u003e\r\n  \u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n\u003eCoffee Shop Full Stack is the third project for the 2019 Udacity Full-stack Developer Nanodegree.  The project is\r\n\u003eassociated with the _Identity and Access Management_ course.  Visit \r\n\u003e[this repository](https://github.com/udacity/FSND/tree/master/projects/03_coffee_shop_full_stack/starter_code) \r\n\u003efor the starter code and project instructions.\r\n\r\n## Project overview\r\nThe project contains a working frontend and the starter code for a backend.\r\n\r\nThe work performed on the frontend was limited to adding values to ```environment.ts``` that allow the frontend to connect\r\nto the backend and to the authentication service.\r\n\r\nIn the backend, I implemented the following methods in ```auth.py```: ```get_token_auth_header```, ```check_permissions```, ```verify_decode_jwt```,\r\nand ```requires_auth```.  In ```api.py```, I implemented 5 endpoints and implemented error handling.  In ```models.py```, I added some functionality\r\nto the Drink model.\r\n\r\n## How to use\r\n\r\n### Clone the repository\r\nOpen a terminal window, clone the repository and cd into the project root:\r\n```sh\r\ngit clone https://github.com/wanderindev/u-cafe.git\r\ncd u-cafe\r\n``` \r\n\r\n### The backend\r\nCreate a virtual environment, and activate it:\r\n```sh\r\npython3 -m venv venv\r\n. venv/bin/activate\r\n```\r\nInstall the project requirements:\r\n```sh\r\npip install -r backend/requirements.txt\r\n```\r\nRun the RESTful API:\r\n```sh\r\ncd backend/src\r\nexport FLASK_APP=run;\r\nflask run --reload\r\n```\r\n### Testing the API with Postman\r\nThe project includes a Postman collection (```u-cafe.postman_collection.json```) and a \r\nPostman environment (```u-cafe.postman_environment.json```) within the backend directory.  To test the API with Postman, follow these steps:\r\n* Open Postman.\r\n* Click on ```Import```.\r\n* Select both json files and click on open.\r\n* Click on ```Runner```.  The Collection Runner will open.\r\n* Select the ```u-cafe``` collection and the ```u-cafe``` environment.\r\n* Scroll all the way down and click the ```Run u-cafe``` button.\r\nThe collection will make 19 requests to the different endpoint with manager,\r\nbarista, and public access.  There is no need to manually enter the tokens for\r\nmanager and barista.  The first two requests in the collection authenticates both\r\nusers and sets the tokens to environment variables.\r\n\r\n### The frontend\r\nLeave the backend running and open a new terminal window.  Go into the frontend\r\ndirectory:\r\n```sh\r\ncd u-cafe/frontend\r\n``` \r\nThe Ionic Command Line Interface is required to serve and build the frontend. \r\nIf needed, follow the instructions for installing the CLI at \r\n[Ionic Framework Docs](https://ionicframework.com/docs/installation/cli)\r\n\r\nOnce the Ionic CLI is set up, install the frontend dependencies:\r\n```sh\r\nnpm install\r\n```\r\n\r\nStart the frontend:\r\n```sh\r\nionic serve\r\n```\r\n\r\nAccess the frontend at http://127.0.0.1:8100.  The credential for the manager is ```manager@wanderin.dev``` password ```Udacity-Cafe```.\r\nThe credential for the barista is ```barista@wanderin.dev``` password ```Udacity-Cafe```.\r\n\r\n## References\r\n[_Auth0 Authentication API_](https://auth0.com/docs/api/info#authentication-api)\r\n\r\n ## Author\r\n\r\n👤 **Javier Feliu**\r\n\r\n* Twitter: [@JavierFeliuA](https://twitter.com/JavierFeliuA)\r\n* Github: [@wanderindev](https://github.com/wanderindev)\r\n\r\n[Starter code](https://github.com/udacity/FSND/blob/master/projects/03_coffee_shop_full_stack/starter_code) \r\nprovided by [Udacity](https://www.udacity.com/).\r\n\r\n## Show your support\r\n\r\nGive a ⭐️ if this project helped you!\r\n\r\n## 📝 License\r\n\r\nCopyright © 2019 [Javier Feliu](https://github.com/wanderindev).\u003cbr /\u003e\r\n\r\nThis project is [MIT](https://github.com/wanderindev/u-cafe/blob/master/LICENSE.md) licensed.\r\n\r\n***\r\n_I based this README on a template generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwanderindev%2Fu-cafe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwanderindev%2Fu-cafe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwanderindev%2Fu-cafe/lists"}