Skip to content

kennethsarip/VacationGenius

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ‰ VacationGenius - AI Travel Deal Optimizer

Your 24/7 AI travel agent that monitors thousands of hotels, flights, and vacation rentals, learns your preferences, and emails you the perfect deal at exactly the right time to book.

Built for Future of Agents Hackathon Powered by Apify Powered by Redpanda Powered by StackAI

πŸš€ Overview

VacationGenius is the first fully autonomous AI travel agent that solves three critical pain points in travel booking:

  1. Deals disappear before you find them - Hotel prices change 1-3 times per day
  2. No way to optimize the full trip cost - Need perfect combination of hotel + flight + dates
  3. Generic alerts don't match your preferences - Alert fatigue from irrelevant deals

The Solution

A multi-agent system where:

  • Agent 1 continuously scrapes TripAdvisor for real-time prices (Apify)
  • Agent 2 streams all data through a real-time pipeline (Redpanda)
  • Agent 3 analyzes deals and predicts optimal booking times (StackAI)
  • Agent 4 learns your preferences and sends perfectly timed emails (StackAI)

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        VacationGenius System                         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                      β”‚
β”‚  Frontend (Next.js) - Developer 1                                   β”‚
β”‚  β”œβ”€> User dashboard with watchlist management                       β”‚
β”‚  β”œβ”€> Real-time agent activity logs (SSE)                           β”‚
β”‚  β”œβ”€> Learning curve visualization                                   β”‚
β”‚  └─> Deal cards with match scores                                   β”‚
β”‚                                                                      β”‚
β”‚  Backend API (Express) - Developer 2                                β”‚
β”‚  β”œβ”€> REST API for frontend                                         β”‚
β”‚  β”œβ”€> Watchlist CRUD operations                                     β”‚
β”‚  β”œβ”€> User preference management                                     β”‚
β”‚  └─> Agent coordination endpoints                                   β”‚
β”‚                                                                      β”‚
β”‚  Scraping + Deal Analysis Agent (Node.js) - Developer 3            β”‚
β”‚  β”œβ”€> Apify TripAdvisor scraper integration                         β”‚
β”‚  β”œβ”€> Scheduled scraping every 2 hours                              β”‚
β”‚  β”œβ”€> Deal quality scoring (0-100)                                  β”‚
β”‚  β”œβ”€> Price history tracking                                        β”‚
β”‚  └─> Produce to Redpanda 'hotel-prices' & 'deal-analysis'          β”‚
β”‚                                                                      β”‚
β”‚  Personalization + Email Agent (Node.js) - Developer 4             β”‚
β”‚  β”œβ”€> Consume from Redpanda 'deal-analysis'                         β”‚
β”‚  β”œβ”€> Match deals to user preferences                               β”‚
β”‚  β”œβ”€> Learning engine (72% β†’ 94% accuracy)                          β”‚
β”‚  β”œβ”€> StackAI integration for predictions                           β”‚
β”‚  └─> Email sending via Resend API                                  β”‚
β”‚                                                                      β”‚
β”‚  Redpanda (Streaming) - Shared Infrastructure                       β”‚
β”‚  β”œβ”€> Topic 1: 'hotel-prices' (raw scraped data)                    β”‚
β”‚  β”œβ”€> Topic 2: 'deal-analysis' (scored deals)                       β”‚
β”‚  β”œβ”€> Topic 3: 'user-matches' (personalized matches)                β”‚
β”‚  └─> Topic 4: 'email-queue' (outgoing emails)                      β”‚
β”‚                                                                      β”‚
β”‚  Database (PostgreSQL/Supabase) - Shared                           β”‚
β”‚  β”œβ”€> Users & watchlists                                            β”‚
β”‚  β”œβ”€> Price history                                                 β”‚
β”‚  β”œβ”€> User preferences & interactions                               β”‚
β”‚  └─> Learning metrics                                              β”‚
β”‚                                                                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

Frontend (Developer 1)

  • Next.js 14 - React framework with App Router
  • TypeScript - Type safety
  • Tailwind CSS - Styling
  • NextAuth.js - Authentication
  • Recharts - Data visualization
  • Server-Sent Events - Real-time updates

Backend (Developer 2)

  • Express.js - REST API server
  • Prisma - Database ORM
  • PostgreSQL - Primary database
  • JWT - Authentication tokens
  • Zod - Schema validation
  • Winston - Logging

Scraping Agent (Developer 3)

  • Apify - TripAdvisor scraping
  • KafkaJS - Redpanda producer
  • Node-cron - Scheduled tasks
  • Winston - Logging

Personalization Agent (Developer 4)

  • KafkaJS - Redpanda consumer
  • Resend - Email service
  • StackAI - ML predictions
  • Winston - Logging

Infrastructure

  • Redpanda - Kafka-compatible streaming
  • Docker Compose - Local development
  • PostgreSQL - Database

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Docker & Docker Compose
  • Git

1. Clone and Install

git clone <repository-url>
cd vacation-genius
npm run install:all

2. Environment Setup

# Copy environment template
cp env.example .env

# Edit .env with your API keys
# Required: DATABASE_URL, APIFY_API_TOKEN, RESEND_API_KEY

3. Start Infrastructure

# Start PostgreSQL and Redpanda
npm run docker:up

# Wait for services to be healthy
docker-compose ps

4. Database Setup

# Generate Prisma client
npm run db:generate

# Push schema to database
npm run db:push

5. Start Development

# Start all services
npm run dev

# Or start individually:
npm run dev:frontend    # http://localhost:3000
npm run dev:backend     # http://localhost:3001
npm run dev:scraper     # Scraping agent
npm run dev:personalizer # Personalization agent

πŸ“ Project Structure

vacation-genius/
β”œβ”€β”€ frontend/                    # Next.js frontend (Developer 1)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/                # App Router pages
β”‚   β”‚   β”œβ”€β”€ components/         # React components
β”‚   β”‚   └── lib/                # Utilities
β”‚   β”œβ”€β”€ package.json
β”‚   └── tailwind.config.js
β”œβ”€β”€ backend/                     # Express API (Developer 2)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/             # API routes
β”‚   β”‚   β”œβ”€β”€ middleware/          # Auth, validation
β”‚   β”‚   └── services/            # Business logic
β”‚   β”œβ”€β”€ prisma/
β”‚   β”‚   └── schema.prisma       # Database schema
β”‚   └── package.json
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ scraper-analyzer/        # Scraping agent (Developer 3)
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ services/        # Apify, Redpanda
β”‚   β”‚   β”‚   └── index.ts         # Main agent loop
β”‚   β”‚   └── package.json
β”‚   └── personalization-email/   # Personalization agent (Developer 4)
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ services/        # Email, ML
β”‚       β”‚   └── index.ts         # Main agent loop
β”‚       └── package.json
β”œβ”€β”€ docker-compose.yml           # Local infrastructure
β”œβ”€β”€ package.json                 # Root workspace config
└── README.md

πŸ”§ Developer Roles

Developer 1: Frontend (Next.js)

Responsibilities:

  • User dashboard with watchlist management
  • Real-time agent activity logs (SSE)
  • Learning curve visualization
  • Deal cards with match scores
  • Authentication and user management

Key Files:

  • frontend/src/app/page.tsx - Landing page
  • frontend/src/app/dashboard/ - User dashboard
  • frontend/src/components/ - React components

Developer 2: Backend API (Express)

Responsibilities:

  • REST API for frontend
  • Watchlist CRUD operations
  • User preference management
  • Agent coordination endpoints
  • Database schema and migrations

Key Files:

  • backend/src/routes/ - API endpoints
  • backend/prisma/schema.prisma - Database schema
  • backend/src/middleware/ - Authentication

Developer 3: Scraping Agent (Node.js)

Responsibilities:

  • Apify TripAdvisor scraper integration
  • Scheduled scraping every 2 hours
  • Deal quality scoring (0-100)
  • Price history tracking
  • Redpanda producer

Key Files:

  • agents/scraper-analyzer/src/index.ts - Main agent
  • agents/scraper-analyzer/src/services/ - Apify, Redpanda

Developer 4: Personalization Agent (Node.js)

Responsibilities:

  • Redpanda consumer for deal analysis
  • Match deals to user preferences
  • Learning engine (72% β†’ 94% accuracy)
  • StackAI integration for predictions
  • Email sending via Resend

Key Files:

  • agents/personalization-email/src/index.ts - Main agent
  • agents/personalization-email/src/services/ - Email, ML

πŸ”‘ API Keys Required

Apify (Required)

  • Sign up at apify.com
  • Get API token from account settings
  • Add to APIFY_API_TOKEN in .env

Resend (Required)

  • Sign up at resend.com
  • Get API key from dashboard
  • Add to RESEND_API_KEY in .env

StackAI (Optional)

  • Sign up at stack-ai.com
  • Create project and get API key
  • Add to STACKAI_API_KEY in .env

πŸ“Š Data Flow

User Sets Watchlist β†’ Backend API β†’ Database
                          ↓
                    Scraping Agent reads watchlist every 2 hours
                          ↓
                    Apify scrapes TripAdvisor
                          ↓
                    Redpanda 'hotel-prices' topic
                          ↓
                    Deal Analysis (scoring + filtering)
                          ↓
                    Redpanda 'deal-analysis' topic
                          ↓
                    Personalization Agent (matching + learning)
                          ↓
                    Redpanda 'user-matches' topic
                          ↓
                    Email Agent β†’ Send via Resend
                          ↓
                    User receives email & clicks
                          ↓
                    Feedback loop β†’ Update learning

🎯 Success Metrics

  • βœ… Agents run continuously in background (visible dashboard logs)
  • βœ… Real-time price drop detected and email sent in < 60 seconds
  • βœ… User preferences learned from 3+ interactions
  • βœ… All 3 sponsor tools (Apify, Redpanda, StackAI) clearly demonstrated
  • βœ… System handles 100+ hotels per destination without lag
  • βœ… Learning curve visualization shows improvement over time
  • βœ… 3-minute demo runs flawlessly with live streaming data

πŸš€ Deployment

Local Development

npm run dev

Production Build

npm run build
npm start

Docker Production

docker-compose -f docker-compose.prod.yml up -d

🀝 Contributing

  1. Each developer works on their assigned component
  2. Use feature branches for development
  3. Test locally with npm run dev
  4. Submit PR for review
  5. Deploy to staging for integration testing

πŸ“ License

MIT License - Built for the Future of Agents Hackathon

πŸ† Hackathon Goals

  • Autonomy (20%): Agents run continuously, make decisions, send emails without manual intervention
  • Real-World Value (20%): Saves users $500-2000 per trip, reduces research time to zero
  • Tool Integration (20%): Deep integration with Apify, Redpanda, and StackAI
  • Technical Implementation (20%): Real streaming architecture with multi-agent coordination
  • Presentation (20%): Live demo with real-time data processing

Built with ❀️ for the Future of Agents Hackathon

Powered by Apify, Redpanda, and StackAI

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors