RailTC Logo
Analyzing your journey
Live dataWL movementSmart decision

RailTC Product Guide

RailTCProject Architecture & Explanation

How RailTC predicts PNR confirmation today: trained models on verified journey outcomes, a transparent scoring baseline, and a public accuracy dashboard. This guide supersedes earlier rules-only descriptions.

By DevSaifOps · RailTC Team

3 min read0 sections

About This Document

This document is the architectural overview of RailTC. Updated August 2026: earlier drafts described a rules-only prototype. That framing is outdated. RailTC now runs a hybrid stack: trained models on verified chart outcomes, plus a transparent baseline scorer, with live accuracy published on railtc.in/accuracy.

1. Project Goal

Problem: The Indian Railways PNR confirmation system is complex. Existing apps often provide a simple "Yes/No" or offer false hope without explanation.

Solution (RailTC): We are building a Transparent System that provides users not just with a prediction, but with the logic behind it.

Individual Prediction

Risk is calculated for each passenger individually (e.g., Senior Citizen confirm vs. General waiting).

Transparency

We show the math: Quota penalty, Route bonus, etc.

Accountability

We grade ourselves with a visible Accuracy Score.

2. High-Level Architecture

Imagine a restaurant:

  • Frontend (Waiter): Takes the PNR from the user and delivers the result.
  • Backend (Kitchen): Where the real work happens (Data fetching, Calculation).
  • Database (Store Room): Where old records and predictions are stored.
  • Cron Job (Manager): Checks nightly: "How many predictions were correct today?"
User -> Frontend (React) -> Backend API (FastAPI) -> Prediction Engine -> Result

3. Core Components

A. Frontend (The Face)

  • Technology: React.js / Next.js
  • Function: Takes user PNR, fetches data, and displays it beautifully using components like TicketDisplay.jsx and the RiskMeter (visualizing "Safe/Medium/Risky").

B. Backend (The Brain)

  • Technology: Python (FastAPI)
  • File: backend/main.py
  • Function: The system's control center receiving all frontend requests.

C. The Prediction Engine (Hybrid: Trained Models + Transparent Baseline)

This section supersedes earlier "rules-only" / "heuristics-only" descriptions of RailTC. The product is not a hand-tuned calculator pretending to be AI, and it is not an unaccountable black box either.

RailTC uses a hybrid confirmation engine:

  • Trained models on verified outcomes: Models are fit on large volumes of real PNR journeys whose final chart status (CNF / RAC / WL) was later verified. Features include waitlist context, quota/class patterns, time-to-chart, and route/train history.
  • Transparent baseline scorer: A readable multi-signal baseline (quota, class, days left, route behavior) still exists for explainability and fallback. It is a component of the stack, not the whole product.
  • Live decision path: Production requests score through the trained path when available, with monitoring (including shadow comparisons) so model quality can be checked against outcomes over time.

Key modules: training / inference under backend/training/, live prediction routing in backend/routers/prediction.py, and the transparent baseline in backend/utils/prediction_engine.py.

What users see:

  • A confirmation probability mapped into Safe / Medium / Risky bands.
  • Context that helps interpret risk (status, journey factors), not a guarantee from Indian Railways.
  • Public accountability on /accuracy: overall accuracy uses scored Safe + Risky bands; Medium is treated as not scored to avoid false confidence.

For the plain-language methodology, see /methodology. For machine-readable facts, see /llms.txt.

D. Route Analyzer

File: backend/utils/route_logic.py

Function: Captures route-pattern context (for example business vs leisure style cancellation behavior) used as one of several signals in scoring.

E. Database & Outcome Supervisor

  • Database: Postgres via SQLAlchemy: predictions, check history, and chart outcomes.
  • Verification loop: After chart preparation, final status is captured when available and matched to the original band. Aggregate performance is published on the accuracy dashboard and used to monitor model health.

4. Data Flow (Step-by-Step)

  1. Step 1: User enters PNR on the Frontend.
  2. Step 2: Backend fetches live status from IRCTC.
  3. Step 3: The hybrid engine scores the ticket (trained model path when available, transparent baseline for explainability/fallback).
  4. Step 4: Probability + Safe/Medium/Risky band are returned to the Frontend.
  5. Step 5: Prediction is stored for later verification.
  6. Step 6: After chart preparation, outcomes are verified and feed the public accuracy metrics and model monitoring.

5. Continuous Improvement

RailTC retrains and monitors models on verified journey data (dataset build, train, compare, promote), with operational guards so heavy jobs do not destabilize production. Accuracy is not a one-time marketing claim; it is a live dashboard updated from real chart outcomes.

Authoritative sources for researchers and tools: Methodology, Accuracy, About, and llms.txt.

Continue Reading

RailTC Guide: IRCTC Ticket Booking, PNR Status, Waitlist Prediction & Train Planning

This page focuses on Indian Railway travel guides and booking strategy. RailTC helps passengers understand live PNR status, waitlist movement, booking status changes, train seat information, and smart route/date choices before payment. Use RailTC tools to evaluate confirmation chances with practical context instead of relying only on raw status text.

What is IRCTC and why it matters

IRCTC (Indian Railway Catering and Tourism Corporation) handles core online railway services such as ticketing, catering, and tourism operations. RailTC is an independent travel intelligence platform that helps users interpret railway booking outcomes and make better decisions. Final ticket allotment, chart preparation, and official seat confirmation remain under Indian Railways.

IRCTC booking types and practical usage

How to book smarter with RailTC insights

  1. Choose source, destination, and journey date.
  2. Select train and class based on availability and route quality.
  3. Check waitlist and confirmation probability before making payment.
  4. Use alternate route/date/class suggestions when risk is high.
  5. Track booking status and current status after booking.
  6. Use seat/coach insights for better onboard planning.

Common IRCTC quotas

Frequently used railway booking quotas include:

GN (General Quota)LD (Ladies Quota)TQ (Tatkal Quota)PT (Premium Tatkal Quota)PQ (Pooled Quota)LB (Lower Berth)HP (Physically Handicapped Quota)FT (Foreign Tourist Quota)SS (Senior Citizen / Women)RC (Reservation Against Cancellation)

Major train categories in India

RailTC tools can support planning across multiple train categories:

Vande Bharat ExpressTejas ExpressRajdhani ExpressShatabdi ExpressDuronto ExpressHumsafar ExpressGatimaan ExpressGarib Rath ExpressJan Shatabdi ExpressIntercity ExpressSuperfast ExpressExpress

Enhance your train journey with RailTC tools

IRCTC booking FAQ

How can I check PNR status and ticket confirmation chances on RailTC?

Enter your 10-digit PNR on RailTC to view live booking status, current status, and confirmation probability based on historical railway trend analysis.

What is the difference between booking status and current status?

Booking status is your status at the time of ticket booking, while current status is the latest status after ongoing cancellations, chart updates, and quota movement.

What is Tatkal booking and when does it open?

Tatkal quota is used for urgent travel plans. In general, AC Tatkal opens earlier than non-AC Tatkal on the day before travel. Availability is route- and demand-dependent.

Can I use RailTC for waitlist, RAC, and confirmed ticket analysis?

Yes. RailTC helps you understand WL, RAC, and CNF movement patterns and provides pre-booking insights to reduce booking risk.

Disclaimer: RailTC is an independent informational platform and is not affiliated with, endorsed by, or officially connected to IRCTC or Indian Railways. Always verify final status from official railway channels before travel.