This project is a surprise trip planner that uses AI to help create personalized travel itineraries. It consists of a Python Flask backend and a Next.js frontend.
- Python 3.8 or higher
- Node.js 14 or higher
- npm or yarn
-
Clone the repository:
git clone <repository-url> cd <project-directory>
-
Create a virtual environment:
python -m venv .venv-surprise-trip
-
Activate the virtual environment:
- On Windows:
.venv-surprise-trip\Scripts\activate
- On macOS and Linux:
source .venv-surprise-trip/bin/activate
- On Windows:
-
Install the required Python packages:
pip install -r requirements.txt
-
Copy the
.env.example
file to.env
and fill in the necessary environment variables:cp .env.example .env
Open the
.env
file in a text editor and fill in any required values.
-
Navigate to the frontend directory:
cd travel-planner
-
Install the required npm packages:
npm install
or if you're using yarn:
yarn install
To run the full application, you'll need to start both the backend Flask server and the frontend Next.js development server.
-
Ensure you're in the root directory of the project and your virtual environment is activated.
-
Set the Flask environment variables:
- On Windows:
set FLASK_APP=app.py set FLASK_ENV=development
- On macOS and Linux:
export FLASK_APP=app.py export FLASK_ENV=development
- On Windows:
-
Start the Flask development server:
flask run --port=3001
This will start the Flask server on
http://localhost:3001
.
-
Open a new terminal window (keep the Flask server running in the previous terminal).
-
Navigate to the
travel-planner
directory:cd travel-planner
-
Start the Next.js development server:
npm run dev
or if you're using yarn:
yarn dev
This will start the Next.js server, typically on
http://localhost:3000
.
- The Flask backend API will be available at
http://localhost:3001
- The Next.js frontend will be available at
http://localhost:3000
You can now interact with the frontend in your web browser, which will communicate with the Flask backend to process requests.
- Make changes to the Flask backend in
app.py
and other Python files. - The Flask development server will automatically reload when you save changes.
- Make changes to the Next.js frontend in the
travel-planner
directory. - The Next.js development server will automatically reload when you save changes.
Remember to keep both the Flask and Next.js servers running while developing.
app.py
: Main entry point for the Flask backend applicationmain.py
: Contains core logic for the surprise trip plannermy_crew.py
: Defines the AI crew used for planningconfig/
: Contains configuration files for agents and taskstravel-planner/
: Next.js frontend application
- If you encounter any package-related issues, ensure that your virtual environment is activated and all dependencies are installed correctly.
- Check that the ports 3001 and 3000 are not being used by other applications.
- Ensure that your
.env
file is properly configured with any necessary API keys or settings.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
This project is licensed under the MIT License.