The main branch of this repository contains the code developed in the part 1 of this series. It has a chat bot configured to ask the user their from and to locations and a travel date. In the part 2 of this series, you will build the functionality to book a flight based on the choice made by the user and suggest (and book) a recommended hotel in the destination location for the user.
To run this project:
- Clone it locally
- Rename .env.example to .env
- Create an OpenAI account if you don't have one.
- Go to the API keys section on the OpenAI dashboard and generate a new key for your project.
- Create a new Amadeus for Developers account if you don't already have one.
- Go to the My Apps section on the Amadeus for Developers dashboard and create a new app. Once the app is created, copy your API key and secret.
- In the .env file, populate the value of the API key from OpenAI and the API key and secret from Amadeus.
- Run
npm i
to install the project's dependencies. - Run
node index.cjs
in one terminal to start the API server andnpm run dev
in another terminal to start the frontend app.
You can now run the app and develop it while following the part 2 of the series. To take a look at the finished code, switch to the finished
branch. Happy coding!