How prajinkyapimpalghare/irctc-automation-tatkal-and-general-ticket-booking- works
Project type and purpose
• This is a small, monolithic desktop automation tool written in Python.
• Its sole purpose is to automate IRCTC Tatkal or General ticket booking via a GUI and Selenium.
File structure
• Top-level files:
• README.md – project description and instructions
• irctc_automation.py – the entire application code
• No separate frontend/backend folders, databases, or microservices—everything lives in one script.
README for architectural hints
• Uses a GUI form (likely Tkinter or similar) for user input.
• Uses Selenium + Chrome WebDriver to drive an external web application (IRCTC website).
• Interacts directly with the IRCTC website over HTTP via the browser automation layer.
• User provides input at runtime; the script executes at a scheduled time (11 AM or 10 AM).
Main components and interactions
a. Components:
1. GUI Layer (User input form)
2. Automation Engine (Booking logic coded in Python)
3. Selenium Library (Python bindings)
4. Chrome WebDriver (chromedriver executable)
5. External IRCTC Website (target system)
6. OS Scheduler/Manual Trigger (launches script at the appropriate time)
b. Relationships:
• User → GUI Layer: inputs credentials, stations, date, passenger details
• GUI Layer → Automation Engine: passes the filled-in values
• Automation Engine → Selenium Library: calls methods to locate page elements, fill forms, and click buttons
• Selenium Library → Chrome WebDriver: communicates via the WebDriver protocol
• Chrome WebDriver → IRCTC Website: drives a real Chrome browser to perform HTTP requests and render pages
• IRCTC Website → WebDriver → Selenium → Automation Engine: returns page state (e.g., next form, CAPTCHA prompt, booking confirmation)
• OS Scheduler/Manual Trigger → starts the Python process at the designated time
c. Architectural patterns/design principles:
• Single-process, event-driven desktop application
• Layered separation (UI layer vs. automation logic vs. browser driver vs. external system)
d. Technologies and frameworks:
• Python 3
• GUI library (e.g., Tkinter)
• Selenium Python bindings
• Chrome WebDriver (chromedriver)
• External HTTP/Web application (IRCTC website)