Alpaca - Hotel Data Microservice
A comprehensive Go microservice that fetches, consolidates, and analyzes hotel data from multiple sources. Features multi-source data aggregation, review crawling, and LLM-powered recommendation analysis. Architecture Alpaca is a single microservice that: Fetches hotel data from multiple sources (Amadeus, Expedia, Tripadvisor, Google, Booking.com) Consolidates hotel data into a unified schema Crawls reviews from multiple sources (Tripadvisor, Google, Expedia, Booking, hotel websites, etc.) Uses LLM (GPT-4, Claude, Grok) to analyze reviews for Quality and Quiet Generates intelligent recommendations based on review analysis Stores data in SQLite (default) with raw SQL Uses a generalized provider interface for easy API integration Processes data in concurrent batches with rate limiting Project Structure alpaca/ ├── alpaca/ │ ├── main.go # Main entry point - hotel data worker │ ├── generate_cities.go # City data generation utility (reference) │ ├── generated_top_cities.go # Generated top cities data (reference) │ ├── REVIEW_PROCESSING.md # Review processing documentation │ ├── models/ │ │ ├── hotel.go # Original Amadeus hotel models │ │ └── hotel_extended.go # Extended hotel models with recommendations │ ├── services/ │ │ ├── hotel_service.go # Hotel business logic (Amadeus) │ │ ├── hotel_service_extended.go # Extended hotel service (multi-source) │ │ ├── review_crawler.go # Review crawling from multiple sources │ │ ├── llm_service.go # LLM integration (GPT-4, Claude, Grok) │ │ └── recommendation_service.go # Recommendation orchestration │ ├── database/ │ │ └── database.go # SQLite database connection and schema │ └── utils/ │ └── constants.go # Constants and test data ├── go.mod # Go module definition ├── Dockerfile # Docker build configuration └── README.md # This file Features ✅ Simplified Architecture Single Microservice: One focused service for hotel data collection Raw SQL: No ORM overhead, direct SQL control SQLite First: Simple, file-based database (easy to migrate to Postgres/Redshift later) Generalized API Interface: Easy to add new hotel data providers ✅ Multi-Source Hotel Data Collection Amadeus API: Hotel list, search, and ratings data Expedia: Hotel listings and reviews (interface ready) Tripadvisor: Hotel data and reviews (interface ready) Google Places: Hotel data and reviews (interface ready) Booking.com: Hotel data and reviews (interface ready) Consolidated Schema: Unified hotel table with ratings from all sources ...