Create a new python environment with python -m venv venv
Make sure the powershell instance can run commands Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Start the environment .\venv\Scripts\activate.ps1
Install the required packages pip install -r requirements.txt
Start the flask backend automatically on http://localhost:5000 with flask run
/login - POST
{
"username": "admin",
"password": "admin"
}
/register - POST
{
"username": "admin",
"password": "admin"
}
/protected - GET
needs bearer token auth header
/beers - GET
with query params
/beers/categories - GET
/breweries/[optional id] GET
with query params or id path parameter
/favourites needs bearer token auth header
GET
json arary with beersPOST
{"beer_id": "28"}DELETE
{"beer_id": "28"}
**/recommendations"" GET
needs bearer token auth header
**/chatbot"" GET
needs bearer token auth header
- .env file containing the line:
OPENAI_API_KEY="<api_key>"
- Python 3.x
- MongoDB Compass needs to be installed on the local machine and the database should be accessed via
mongodb://localhost:27017/beereview