Skip to content

Subash-Nagaraj-V/transitsave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸšŒ TransitSave โ€” Smart Transit Fare Comparison

A web-based Progressive Web App (PWA) for unified public transit fare comparison and route planning across Chennai and Trichy, Tamil Nadu.

๐ŸŒ Live Demo: transitsave.netlify.app


๐Ÿ“Œ What is TransitSave?

Commuters in Tamil Nadu have to check 3 different apps just to compare fares between MTC Bus, Metro Rail, and Suburban Train. There is no single platform that shows all fares together โ€” and government welfare schemes like the free Pink Bus for women and Student Pass are never shown in any navigation tool.

TransitSave solves all of this in one place.


โœจ Features

Feature Description
๐ŸšŒ Fare Comparison Compare MTC Ordinary, MTC Express, MTC Deluxe, Metro Rail, Suburban Train, Private Bus, TNSTC โ€” side by side
๐Ÿฉท Pink Bus Scheme 100% free MTC Ordinary + TNSTC for women โ€” auto applied
๐ŸŽ“ Student Pass 100% free MTC Ordinary for students โ€” toggle to apply
๐Ÿ“… Monthly Calculator Estimate monthly travel cost by distance + trips/day + working days
๐ŸŒ Tamil & English Full UI language switch without page reload
๐ŸŒ™ Dark / Light Mode Theme toggle for visual comfort
๐Ÿ“ถ Offline PWA Works without internet after first load via service worker
๐Ÿ—บ๏ธ Transit Map Offline CMRL metro network map modal
๐Ÿ” Smart Search Enhanced route search with recent routes history
๐Ÿ™๏ธ City Comparison Compare routes across Chennai and Trichy
โšก Proximity Alert Nearby transit alerts based on location
โ˜๏ธ Weather Comfort Weather comfort pill for travel planning

๐Ÿ—‚๏ธ Routes Covered

  • โœ… 55 Chennai routes โ€” CMRL Blue Line, Green Line, MTC corridors, Suburban Rail
  • โœ… 45 Trichy routes โ€” TNSTC intercity and intracity services
  • โœ… 100 total routes with real distance measurements
  • โœ… Intercity routes โ€” via intercityRoutes.ts
  • โœ… Metro routes โ€” via metroRoutes.ts + metroData.ts

๐Ÿ’ฐ Fare Data (2026 Updated)

Mode Fare Range Women Scheme Student Pass
MTC Ordinary Bus โ‚น5 โ€“ โ‚น24 โœ… 100% Free โœ… 100% Free
MTC Express Bus โ‚น10 โ€“ โ‚น48 โŒ 50% off
MTC Deluxe (SETC) โ‚น15 โ€“ โ‚น60 โŒ โŒ
Chennai Metro (CMRL) โ‚น10 โ€“ โ‚น50 โŒ โŒ
Suburban Train โ‚น5 โ€“ โ‚น35 โŒ Season pass
Private Bus โ‚น10 โ€“ โ‚น60 โŒ โŒ
TNSTC (Trichy) โ‚น5 โ€“ โ‚น30 โœ… 100% Free 50% off

All fare data sourced from official Tamil Nadu Government notifications and CMRL/Southern Railway published tariffs.


๐Ÿ› ๏ธ Tech Stack

Technology Purpose
React.js 18 Component-based frontend
TypeScript Type-safe development
TailwindCSS 3 Responsive utility-first styling
Vite Lightning-fast build tool
vite-plugin-pwa Service worker + PWA manifest generation
React Context API Language + Theme state management
shadcn/ui Accessible UI component library
Netlify CDN Static deployment + continuous delivery

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or bun

Installation

# Clone the repository
git clone https://github.com/Subash-Nagaraj-V/transitsave.git

# Navigate to project folder
cd transitsave/transitsave-main

# Install dependencies
npm install
# or
bun install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

The app will run at http://localhost:8080


๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ ui/                    # shadcn/ui base components
โ”‚   โ”œโ”€โ”€ FareComparison.tsx     # Main fare results + welfare logic
โ”‚   โ”œโ”€โ”€ RouteSearch.tsx        # Route search input
โ”‚   โ”œโ”€โ”€ RouteSelector.tsx      # Origin/destination selector
โ”‚   โ”œโ”€โ”€ SearchEnhanced.tsx     # Enhanced search with filters
โ”‚   โ”œโ”€โ”€ CustomCalculator.tsx   # Monthly cost calculator
โ”‚   โ”œโ”€โ”€ CityComparison.tsx     # Chennai vs Trichy comparison
โ”‚   โ”œโ”€โ”€ TransitMap.tsx         # Transit map component
โ”‚   โ”œโ”€โ”€ TransitMapModal.tsx    # Offline CMRL metro map modal
โ”‚   โ”œโ”€โ”€ ConductorCard.tsx      # Conductor info card
โ”‚   โ”œโ”€โ”€ ProximityAlert.tsx     # Nearby transit alerts
โ”‚   โ”œโ”€โ”€ WeatherComfortPill.tsx # Weather comfort indicator
โ”‚   โ”œโ”€โ”€ Header.tsx             # App header + nav
โ”‚   โ”œโ”€โ”€ HeroSection.tsx        # Landing hero section
โ”‚   โ”œโ”€โ”€ ShareButton.tsx        # Share route feature
โ”‚   โ”œโ”€โ”€ TransitAlerts.tsx      # Live transit alerts
โ”‚   โ””โ”€โ”€ NavLink.tsx            # Navigation link component
โ”‚
โ”œโ”€โ”€ contexts/
โ”‚   โ””โ”€โ”€ LanguageContext.tsx    # Tamil/English translations
โ”‚
โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ routes.ts              # 100 routes + stage-based fare data
โ”‚   โ”œโ”€โ”€ metroData.ts           # CMRL station list + fare matrix
โ”‚   โ”œโ”€โ”€ metroRoutes.ts         # Metro-specific route definitions
โ”‚   โ”œโ”€โ”€ intercityRoutes.ts     # Intercity route data
โ”‚   โ”œโ”€โ”€ transportImages.ts     # Transport mode image mappings
โ”‚   โ””โ”€โ”€ imageQualityGuide.ts   # Image quality configurations
โ”‚
โ”œโ”€โ”€ hooks/
โ”‚   โ”œโ”€โ”€ use-mobile.tsx         # Mobile viewport detection
โ”‚   โ”œโ”€โ”€ use-toast.ts           # Toast notification hook
โ”‚   โ””โ”€โ”€ useRecentRoutes.ts     # Recent routes history hook
โ”‚
โ”œโ”€โ”€ lib/
โ”‚   โ””โ”€โ”€ utils.ts               # Utility functions
โ”‚
โ”œโ”€โ”€ pages/
โ”‚   โ”œโ”€โ”€ Index.tsx              # Main page
โ”‚   โ”œโ”€โ”€ Install.tsx            # PWA install guide page
โ”‚   โ””โ”€โ”€ NotFound.tsx           # 404 page
โ”‚
โ””โ”€โ”€ test/
    โ”œโ”€โ”€ example.test.ts        # Example test cases
    โ””โ”€โ”€ setup.ts               # Test setup configuration

public/
โ”œโ”€โ”€ images/                    # Transit mode images (webp, avif)
โ”‚   โ”œโ”€โ”€ Deluxe Bus (SETC).webp
โ”‚   โ”œโ”€โ”€ Express Bus (Green).webp
โ”‚   โ”œโ”€โ”€ Government Bus (PINK).webp
โ”‚   โ”œโ”€โ”€ Metro Rail.avif
โ”‚   โ”œโ”€โ”€ Private Bus.webp
โ”‚   โ”œโ”€โ”€ SubUrban Train.webp
โ”‚   โ”œโ”€โ”€ metro-map.jpg
โ”‚   โ””โ”€โ”€ transit-map.png
โ”œโ”€โ”€ transport/                 # Transport category icons
โ”œโ”€โ”€ pwa-192x192.png            # PWA icon (192px)
โ””โ”€โ”€ pwa-512x512.png            # PWA icon (512px)

๐Ÿ“ฑ PWA Installation

TransitSave can be installed on your phone like a native app:

  1. Open transitsave.netlify.app in Chrome or Edge
  2. Tap the "Install" button in the browser address bar
  3. Or go to the Install page inside the app
  4. Once installed, the app works fully offline for all 100 routes

๐Ÿ›๏ธ Official Data Sources

Data Source
MTC Ordinary & Express Fares G.O. (Ms.) No. 48, TN Transport Dept, Jan 2018
Women Free Bus Scheme G.O. (Ms.) No. 117, TN Transport Dept, Sep 2021
CMRL Metro Fares CMRL Official Fare Chart, Feb 2021
TNSTC Trichy Fares TNSTC Tiruchirappalli Division Tariff, 2022
Suburban Rail Fares Southern Railway Tariff Circular, 2023

๐Ÿงช Running Tests

# Run test suite
npm run test

# Run tests with coverage
npm run test -- --coverage

๐ŸŒ Deployment

The app is deployed on Netlify with automatic builds triggered on every push to the main branch.

# Build output goes to /dist folder
npm run build

Netlify configuration is auto-detected from vite.config.ts.


๐Ÿ”ฎ Roadmap

  • ๐Ÿ“ Live GPS bus tracking integration
  • ๐ŸŽŸ๏ธ Direct ticket purchasing + QR code generation
  • ๐Ÿ™๏ธ Expand to Coimbatore, Madurai, Salem
  • ๐Ÿ“Š GTFS-Fares v2 integration for automated fare updates
  • ๐Ÿ”” Push notifications for route alerts

๐Ÿ‘จโ€๐Ÿ’ป Author

Subash Nagaraj.V 3rd Year โ€” Artificial Intelligence and Machine Learning Dhanalakshmi Srinivasan University, Tiruchirappalli ๐Ÿ“ง subashnagaraj796@gmail.com ๐Ÿ”— LinkedIn


๐Ÿค Contributing

Pull requests are welcome! For major changes, please open an issue first.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“œ License

MIT License โ€” free to use and modify with attribution.


Made with โค๏ธ for commuters of Tamil Nadu

About

A web-based PWA for unified transit fare comparison and route planning across Chennai and Trichy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages