Skip to content

Modern hotel data system using SOLID principles with multi-layer architecture for fetching, normalizing, merging and serving data via API.

Notifications You must be signed in to change notification settings

vietdoo/hotel-data-integrations-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hotel Data Integration System

System Architecture

Core Components

  1. Supplier Layer
  1. Data Processing Layer
  1. Storage Layer
  1. API Layer

Data Flow

  1. Data fetching from suppliers
  2. Normalization and cleaning
  3. Updating fully normalized data in database
  4. Merging with bias handling for multiple suppliers
  5. Storage in databases
  6. API access to merged data

Design Principles

1. SOLID Principles

  • Single Responsibility: Each class has one purpose (e.g., Normalizer)
  • Open/Closed: Abstract base classes allow extension (e.g., BaseSupplier)
  • Liskov Substitution: All database implementations follow BaseDB contract
  • Interface Segregation: Targeted interfaces like AttributeNormalizer
  • Dependency Injection: Services accept dependencies in constructors

2. Clean Architecture

  • Clear separation between data, domain logic, and presentation
  • Domain models independent of external concerns
  • Use of interfaces for flexibility

3. Design Patterns

Key Features

  1. Data Quality
  • Robust normalization via HotelCleaner
  • Configurable bias handling for data merging
  • Validation using Pydantic models
  1. Extensibility
  • Easy to add new suppliers
  • Pluggable normalizers and mergers
  • Configurable via configs/config.py
  1. Maintainability
  • Comprehensive logging system
  • Clear error handling with custom exceptions
  • Well-defined interfaces

Usage

python main.py hotel_id1,hotel_id2 destination_id1

About

Modern hotel data system using SOLID principles with multi-layer architecture for fetching, normalizing, merging and serving data via API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published