An A.I integrated web application for booking flights and finding travel plans
This guide provides instructions on how to set up and run the various services for this project.
- Node.js and npm
- Python and pip
- Homebrew (for macOS users installing Stripe CLI)
- Access to the environment variables document (see Environment Variables section).
- Clone the GitHub repository
These steps are necessary for testing Stripe webhook integrations locally.
-
Install Stripe CLI:
- macOS (using Homebrew):
brew install stripe/stripe-cli/stripe
- For other operating systems, refer to the official Stripe CLI installation guide.
- macOS (using Homebrew):
-
Login to Stripe:
stripe login
Follow the instructions and use the link provided by the CLI to authenticate in your browser. When you login to stripe, accept the invitation we sent you (if you are not Aj. Kundjanasith you don't have to accept the invitation)
-
Listen for Webhooks:
- Open a dedicated terminal window.
- Run the following command. This will listen for events from your Stripe account and forward them to your local booking service (assuming it runs on port 3001).
stripe listen --forward-to localhost:3001/api/webhook
- Keep this terminal window open while you need webhook forwarding.
Each backend service requires specific environment variables to function correctly (e.g., API keys, database credentials).
-
Retrieve the environment variables from the following document: FlyEase Environment Variables
-
Configure the variables for each service. The standard practice is to create a
.env
file in the root directory of each service (backend/booking/
,backend/flight/
, etc.) and populate it with the corresponding variables from the document in the formatVARIABLE_NAME=value
.
You need to run each of the following services simultaneously. The typical way to do this is to open a new, separate terminal window for each service.
-
Start the Booking Service (Node.js):
- In a new terminal:
(This service likely runs on
cd backend/booking npm install npm run dev
localhost:3001
and receives Stripe webhooks)
- In a new terminal:
-
Start the Flight Service (Node.js):
- In a new terminal:
cd backend/flight npm install npm run dev
- In a new terminal:
-
Start the Chatbot Service (Python/FastAPI):
- In a new terminal:
(Note: Adapt commands if using Poetry:
cd backend/chatbot pip install -r requirement.txt python -m app.service
poetry install
,poetry run python -m app.service
)
- In a new terminal:
-
Start the Recommendation Service (Python):
- In a new terminal:
cd backend/recommend pip install -r requirements.txt python recommendation_service.py
- In a new terminal:
-
Start the Aircraft Service (Node.js):
- In a new terminal:
cd backend/aircraft npm install npm run dev
- In a new terminal:
-
Start the Travel Plan Service (Node.js):
- In a new terminal:
cd backend/travel-plan npm install node server.js
- In a new terminal:
Once all necessary services (steps 1-6 above) are running in their own terminals, and the Stripe listener (from Section 1, step 3) is active in its terminal (if needed), the backend system should be operational. Remember to set up the .env
files correctly for each service as described in Section 2.