Skip to content

mayur57/namma-shuttle

Repository files navigation

Namma Shuttle

Namma Shuttle is a focused, map‑first planner for BMTC Vayu Vajra (KIA) airport buses in Bengaluru. It helps you quickly find the best airport bus route, nearest stops, and recommended departures around your flight time – all in a dark, map‑heavy UI.

Note

This project uses Generative AI tools sparingly to speed up mechanical work (e.g. refactors, formatting, boilerplate UI, data munging scripts). Core product decisions, domain rules, and data modelling were reviewed and iterated on by a human. You should still treat the transit data as best-effort, community maintained rather than authoritative and are encouraged to inspect the code and raise issues/PRs where something looks off.

Features

  • Route browser

    • All KIA routes with clear KIA-x labels, origin → airport names, fares, typical duration, and frequency.
    • Search across route id, from/to, and stop names.
    • Click a card to highlight that route on the map and dim others.
  • Interactive dark map

    • Dark-themed basemap with:
      • Colored route polylines per KIA route.
      • Stops with emphasis on terminal and nearest stops.
      • Airport marker and your location marker (when granted).
    • Auto-zoom to selected routes or your nearest stops.
  • Nearby tab

    • Uses browser geolocation (when allowed) to:
      • Find closest KIA stops around you.
      • Show which routes serve those stops and rough distance.
    • One-click to jump from a nearby stop’s route into the main Routes tab.
  • Bus trip planner

    • “Plan” tab to:
      • Enter flight takeoff time and type (domestic/international).
      • Choose a KIA route.
      • See recommended bus departures with “recommended/tight/too late/early” labels.
      • Shows check‑in buffer and bus travel time.
  • Onboarding + feedback

    • One-time onboarding dialog explaining the app, author, and data sources.
    • Feedback pill (bottom-right) with quick links to:
      • Report incorrect data via GitHub Issues.
      • Open the source repo for PRs.
  • Branding & DX

    • Custom logo and metadata (OG/Twitter) for nice link previews.
    • Vercel Analytics integrated for privacy-friendly traffic insight.

Tech stack

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • UI: React 18, Tailwind CSS
  • Maps: Leaflet + react-leaflet
  • Tooling: Bun, Prettier, ESLint, @vercel/analytics

Getting started

Prerequisites

  • Node 18+ (or just Bun)
  • Bun installed

Install dependencies

bun install

Run dev server

bun dev
# or
npm run dev

App will be available at http://localhost:3000.

Format code

bun format

Project structure (high level)

  • app/
    • layout.tsx – global layout, metadata, analytics, styles.
    • page.tsx – main UI shell (sidebar, tabs, map, onboarding).
  • components/
    • RouteMapContainer.tsx – Leaflet map, routes, stops, user location.
    • RouteCard.tsx – route list card.
    • RouteStopDetails.tsx – expanded route details (stops, schedule).
    • BusTripPlannerPanel.tsx – flight-aware departure suggestions.
    • NearbyRoutesPanel.tsx – nearest stops UI.
    • OnboardingDialog.tsx – one-time welcome / branding dialog.
    • FeedbackPill.tsx – GitHub + feedback pill + panel.
  • data/
    • TransitDataAdapter.ts – compiled static data for routes/stops, helpers like findNearestStops, getRoutesSorted, suggestDepartures.
    • raw/ – raw BMTC / KIA data, compile scripts.
  • public/
    • logo.png – branding/logo.
    • favicon.ico – app icon.

Data sources & accuracy

  • Core route and stop geometry is adapted from:
  • Fares, durations, and schedules are approximated based on public info and community knowledge.
  • They are not official and can drift over time as BMTC changes routes/timings.

If you see something wrong (fare, times, stops, paths):

Please include:

  • Route id (KIA-…)
  • What seems inaccurate
  • Any source link or photo (stop board, timetable, etc.)

Contributing

Contributions are welcome – especially better data:

  • Bug reports & data corrections

    • File an issue at Issues.
    • Use clear titles: e.g. KIA-9: fare changed to ₹200 or Stop name typo at Hebbal Bridge.
  • Pull requests

    • Fork and clone the repo.
    • Update route metadata / logic in data/TransitDataAdapter.ts or the raw data/compile scripts in data/raw/.
    • Run bun format and bun dev to sanity-check.
    • Open a PR describing:
      • What changed
      • Which routes/stops are impacted
      • How you verified the data
  • Feature ideas

    • Suggestions (e.g. offline mode, notifications, multi-leg planning) are welcome via issues.

Deployment & analytics

  • Built to run on Vercel with:
    • @vercel/analytics for lightweight analytics.
  • No custom backend; all transit data is static and bundled with the app.

License

  • Code is open source under the MIT license (see LICENSE if present).
  • BMTC and OpenStreetMap data is subject to their respective licenses and terms.