How antoninj/luxembook works
Main Components
• CLI Application: This is the primary entry point executed via the command line (represented mainly by src/luxembook.py and src/runner.py).
• Selenium Automation Module: This encapsulates the logic that interacts with the web browser (using Selenium and a downloaded chromedriver).
• External Booking Service: The FFT online booking platform where the booking actions are performed.
• Environment/Configuration: This includes environment variables (username and password) and any runtime settings/configurations. Also note the Docker configuration if containerized deployment is considered.
• Docker Container (optional): Represents the containerization layer when running via Docker (Dockerfile and related environment setups).
Out Component Relationships
• The CLI component launches the application and triggers booking actions.
• It invokes the Selenium Automation module to simulate browser interactions.
• Selenium (via chromedriver) interacts directly with the external booking platform (FFT website).
• Configuration details (environment variables) are passed to the CLI at runtime.
• In Docker deployments, the application is encapsulated along with OS-level dependencies (via Dockerfile).
Architectural Patterns and Design Principles
• Separation of Concerns: The project is well structured into distinct responsibilities (CLI, automation logic).
• External Service Integration: The design clearly abstracts the interaction with the external FFT booking platform.
• Containerization: Using Docker for consistent runtime environments.
• Automation and Configuration: Use of environment variables and configuration files (pyproject.toml, pre-commit-config.yaml) for dependency management and code quality.
Relevant Technologies and Tools
• Python as the programming language.
• Selenium for web browser automation.
• Chromedriver as the WebDriver executable.
• Docker for containerization.
• Poetry (indicated by pyproject.toml) for dependency management.
• GitHub Actions for CI/CD (in .github/workflows).