Skip to content

mircea-popa02/beereview-be

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beereview backend

How to run

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

Endpoints

Creating an account and login

/login - POST { "username": "admin", "password": "admin" }
/register - POST { "username": "admin", "password": "admin" }
/protected - GET needs bearer token auth header

Fetching beers, breweries

/beers - GET with query params
/beers/categories - GET
/breweries/[optional id] GET with query params or id path parameter

Managing favourites beers inside the account

/favourites needs bearer token auth header

  • GET json arary with beers
  • POST {"beer_id": "28"}
  • DELETE {"beer_id": "28"}

Getting recommendations based on favourites beer styles

**/recommendations"" GET needs bearer token auth header
**/chatbot"" GET needs bearer token auth header

Prerequisites

  • .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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages