To execute this app, you need to have git and Docker installed on your machine. Make sure to have them installed. Then, execute the following steps:
- Clone this repository by executing command
git clone https://github.com/pierclgr/Bookstore-Challenge.git
- Move in the repository directory, in the folder
frontend
- Create a file
.env
and putREACT_APP_OPENAI_API_KEY=<your-openai-apikey>
into it - Replace
<your-openai-apikey>
with your OpenAI APIKey, generated from OpenAI website, by heading to this link and clicking on "Create new secret key" at the top of the page. Make sure to grant 'all' permissions. This is necessary in order to enable AI functions. - Launch Docker app.
- Move to the repository directory and run
docker-compose up --build
; this will take a while. - When the build finishes, open localhost:3000 on your browser to access the app.
You have the access to three pages:
- The home page contains the list of books in the library; you can filter/order books by many criterias. The list will be empty at the beginning. By clicking on the book, you can also access its infos.
- The Add book page allows you to add a book to the library.
- The Magic suggestion page uses OpenAI's ChatGPT to suggest a book based on a natural language query. Just write whatever you like and you want to read in natural language in the box and the app will suggest the best book for you.