Skip to content

Balloon-Muscles/nomad.ly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI Concierge for Marriott Codefest

Theme: Booking to Belonging

An AI-powered travel concierge web application that personalizes the travel experience by analyzing user preferences through photo analysis and intelligent booking recommendations.

🎯 Project Overview

This application helps travelers discover their travel personality and get personalized recommendations for flights, hotels, and attractions.

Key Features

  1. **Photo Analysis

    • Upload travel photos
    • AI-powered analysis using Google Gemini Vision API
    • EXIF metadata extraction (location, date, camera info)
    • Travel personality profiling
    • Personalized hotel recommendations
  2. **Auto Booking System

    • Flight search and booking via Amadeus API
    • Hotel recommendations and reservations
    • Attraction discovery

πŸ› οΈ Tech Stack

Frontend

  • Framework: Next.js 14 with TypeScript
  • Styling: Tailwind CSS
  • UI Theme: Marriott-inspired (red/white/gold palette)
  • Features:
    • Drag-and-drop file upload
    • Real-time image preview
    • Responsive design

Backend

  • Framework: Flask (Python)
  • AI Services:
    • Google Gemini API (image analysis)
    • Mistral AI Voxtral (voice - planned)
    • Amadeus APIs (booking - planned)
  • Image Processing: PIL, exifread

πŸ“¦ Installation & Setup

Prerequisites

  • Node.js 18+ and npm
  • Python 3.9+
  • Google Gemini API key

Backend Setup

  1. Navigate to backend folder:
cd backend
  1. Create virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure environment variables:
    • Copy .env.example to .env
    • Add your Google Gemini API key:
GEMINI_API_KEY=your_actual_api_key_here
  1. Run the Flask server:
python app.py

Backend will run on http://localhost:5000

Frontend Setup

  1. Navigate to frontend folder:
cd frontend
  1. Install dependencies:
npm install
  1. Configure environment:

    • .env.local file is already created with default backend URL
    • Modify if your backend runs on a different port
  2. Run the development server:

npm run dev

Frontend will run on http://localhost:3000

πŸš€ Usage

1. Image Analysis Flow

  1. Open http://localhost:3000 in your browser
  2. Click "Discover Your Travel Style" or navigate to /image-analysis
  3. Upload 1-10 travel photos (drag & drop or click to select)
  4. Click "Analyze My Travel Style"
  5. View your personalized travel personality profile with:
    • Travel style (Adventure Seeker, Luxury Traveler, etc.)
    • Personality traits
    • Favorite activities
    • Destination preferences
    • Recommended hotel types

2. Testing the Backend

Test the Gemini API connection:

curl http://localhost:5000/test_gemini

Health check:

curl http://localhost:5000/health

πŸ“ Project Structure

Balloon Muscles/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.py                    # Main Flask application
β”‚   β”œβ”€β”€ requirements.txt          # Python dependencies
β”‚   β”œβ”€β”€ .env                      # Environment variables (API keys)
β”‚   β”œβ”€β”€ .env.example             # Environment template
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ gemini_client.py     # Gemini Vision API integration
β”‚   β”‚   └── exif_extractor.py    # EXIF metadata extraction
β”‚   └── uploads/                 # Temporary image storage
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ page.tsx             # Home page
β”‚   β”‚   β”œβ”€β”€ layout.tsx           # Root layout
β”‚   β”‚   └── image-analysis/
β”‚   β”‚       └── page.tsx         # Image analysis page
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ImageUpload.tsx      # File upload component
β”‚   β”‚   └── AnalysisResults.tsx  # Results display component
β”‚   β”œβ”€β”€ .env.local               # Frontend environment variables
β”‚   β”œβ”€β”€ package.json             # Node dependencies
β”‚   └── tailwind.config.ts       # Tailwind configuration
β”‚
└── README.md                     # This file

🎨 Design Philosophy

The UI is inspired by the Marriott website with:

  • Color Palette:
    • Primary Red: #8B0000 (Marriott signature)
    • Accent Gold: #B8860B
    • Neutral: Gray scale for backgrounds
  • Typography: Clean, modern sans-serif
  • Layout: Spacious, luxury-focused, responsive
  • Animations: Subtle hover effects and transitions

πŸ”‘ API Keys Setup

Google Gemini API

  1. Visit Google AI Studio
  2. Create a new API key
  3. Add to backend/.env: GEMINI_API_KEY=your_key_here

Mistral AI (Future)

  1. Visit Mistral AI Platform
  2. Generate API key
  3. Add to backend/.env: MISTRAL_API_KEY=your_key_here

Amadeus (Future)

  1. Visit Amadeus for Developers
  2. Create an app to get API key and secret
  3. Add to backend/.env:
AMADEUS_API_KEY=your_key_here
AMADEUS_API_SECRET=your_secret_here

πŸ§ͺ API Endpoints

Backend (Flask)

Endpoint Method Description
/health GET Health check
/test_gemini GET Test Gemini API connection
/analyze_images POST Analyze travel photos

POST /analyze_images

Request:

  • Content-Type: multipart/form-data
  • Body: images (multiple files)

Response:

{
  "success": true,
  "images_analyzed": 3,
  "metadata": [...],
  "analysis": {
    "travel_style": ["Adventure Seeker", "Nature Lover"],
    "activities": ["Hiking", "Photography"],
    "destination_types": ["Mountains", "Forests"],
    "personality_traits": ["Adventurous", "Independent"],
    "recommended_hotels": ["Boutique Hotel", "Mountain Resort"],
    "insights": "This traveler loves outdoor adventures...",
    "confidence_score": 0.85
  }
}

🎯 Next Steps (Roadmap)

  • Task 1: Image to Gemini Analysis
  • Task 2: Voice + Sentiment Analysis with Mistral Voxtral
  • Task 3: Amadeus API Integration for Booking
  • Google Drive integration for photo import
  • User authentication and profile saving
  • Booking history and itinerary management

πŸ› Troubleshooting

Backend won't start:

  • Ensure Python virtual environment is activated
  • Check that all dependencies are installed: pip install -r requirements.txt
  • Verify .env file exists with valid API keys

Frontend can't connect to backend:

  • Ensure Flask server is running on port 5000
  • Check NEXT_PUBLIC_API_URL in frontend/.env.local
  • Disable any firewall/CORS blockers

Image analysis fails:

  • Verify Gemini API key is valid
  • Check image format (PNG, JPG, JPEG, GIF, HEIC)
  • Ensure images are under 10MB each
  • Check Flask console for error messages

Linter/TypeScript errors:

  • Run npm run build to check for type errors
  • Install missing types: npm install --save-dev @types/[package-name]

πŸ“ License

Built for educational purposes - Marriott International Codefest at Virginia Tech 2025.

πŸ‘₯ Contributors

Created for the "Booking to Belonging" theme at Marriott Codefest.


Happy Traveling! ✈️🏨

About

Uplift your travel experience

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors