Skip to content

eugene-lok/journeo-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Journeo


About

This is the backend for Journeo, an advanced LLM-based travel itinerary planner. It leverages OpenAI's GPT models through LangGraph, Google Places API, and Mapbox GL JS to generate personalized, intelligent travel itineraries with precise geolocation details.

Key Features:

  • Intelligent Itinerary Generation: Uses OpenAI's GPT to create personalized travel plans
  • Preference Extraction: Advanced agent-based system to understand and extract user travel preferences
  • Geocoding Services: Integrates Google's Geocoding and Places APIs to get precise location details
  • Route Calculation: Uses Mapbox Directions API to calculate routes between destinations

Complementary frontend can be found in the Journeo Frontend Repository.


Technologies Used

  • Python
  • FastAPI
  • LangGraph
  • OpenAI GPT-4o
  • Google Places API
  • Mapbox Geocoding API

Setup / Installation

Note: This is the backend component of Journeo. You must also set up the Journeo Frontend for a complete application experience.

  1. Prerequisites:

    • Python 3.8+
    • OpenAI Account
    • Google Cloud Platform Account
    • Mapbox Account
  2. Obtain necessary API keys:

  3. Clone the repository:

    git clone https://github.com/eugene-lok/journeo-backend.git
    cd journeo-backend
  4. Create a virtual environment:

    python3 -m venv env
    
    # Activate the environment
    # On Linux/Mac:
    source env/bin/activate
    
    # On Windows:
    \env\Scripts\activate
  5. Install dependencies:

    pip install -r requirements.txt
  6. Set up environment variables:

    • Create a .env file in the root of your project
    • Add the following keys:
    MAPBOX_ACCESS_TOKEN=your_mapbox_access_token
    OPENAI_API_KEY=your_openai_api_key
    GOOGLE_API_KEY=your_google_api_key
  7. Run the FastAPI server:

    uvicorn app.main:app --reload
  8. The API will be accessible on http://localhost:8000

Frontend Repository

For the client-side implementation, visit the Journeo Frontend Repository.

Key Components

Preference Extraction Agent

  • Uses LangGraph to create a state-based workflow for extracting travel preferences
  • Handles complex, multi-turn conversations to gather trip details
  • Ensures comprehensive information collection

Itinerary Generation

  • Leverages OpenAI's GPT-4o for intelligent itinerary creation
  • Generates day-by-day travel plans with precise location details
  • Calculates budget breakdowns and provides comprehensive travel guidance

Geocoding and Route Services

  • Uses Google Places API to get detailed location information
  • Retrieves coordinates, place details, and photos
  • Calculates routes between destinations using Mapbox Directions API

About

An LLM-powered travel planner.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages