{"id":50979882,"url":"https://github.com/jay6430/live-bus-tracker","last_synced_at":"2026-06-19T13:01:37.296Z","repository":{"id":358627504,"uuid":"1240637464","full_name":"jay6430/live-bus-tracker","owner":"jay6430","description":"Real-time bus tracking dashboard for Navsari, Gujarat, India — live GPS markers with directional arrows, polyline trails, and fleet metrics. Pure HTML/CSS/JS, no build step.","archived":false,"fork":false,"pushed_at":"2026-05-18T07:58:08.000Z","size":1660,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-18T09:48:25.687Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jay6430.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-16T11:32:49.000Z","updated_at":"2026-05-18T07:58:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jay6430/live-bus-tracker","commit_stats":null,"previous_names":["jay6430/live-bus-tracker"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jay6430/live-bus-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay6430%2Flive-bus-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay6430%2Flive-bus-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay6430%2Flive-bus-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay6430%2Flive-bus-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jay6430","download_url":"https://codeload.github.com/jay6430/live-bus-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay6430%2Flive-bus-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34532260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-19T13:01:32.078Z","updated_at":"2026-06-19T13:01:37.284Z","avatar_url":"https://github.com/jay6430.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Navsari Live Bus Tracker\n\n[![HTML5](https://img.shields.io/badge/HTML5-E34F26?style=flat\u0026logo=html5\u0026logoColor=white)](https://developer.mozilla.org/en-US/docs/Web/HTML)\n[![CSS3](https://img.shields.io/badge/CSS3-1572B6?style=flat\u0026logo=css3\u0026logoColor=white)](https://developer.mozilla.org/en-US/docs/Web/CSS)\n[![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?style=flat\u0026logo=javascript\u0026logoColor=black)](https://developer.mozilla.org/en-US/docs/Web/JavaScript)\n[![Leaflet](https://img.shields.io/badge/Leaflet.js-199900?style=flat\u0026logo=leaflet\u0026logoColor=white)](https://leafletjs.com)\n[![OpenStreetMap](https://img.shields.io/badge/OpenStreetMap-7EBC6F?style=flat\u0026logo=openstreetmap\u0026logoColor=white)](https://www.openstreetmap.org)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nA real-time bus tracking dashboard for **Navsari, Gujarat, India**. The application polls a live GPS fleet-management API and renders every bus on an interactive map with directional markers, speed, heading, and trail history — all with no backend and no API key required.\n\n---\n\n## Screenshot\n\n![Navsari Bus Tracker Dashboard](bus-tracker/assets/screenshot.png)\n\n---\n\n## Features\n\n- **Live GPS tracking** — auto-refreshes every 10 seconds from the fleet API\n- **Directional SVG markers** — each bus icon rotates to indicate its actual heading; a pulsing ring highlights moving vehicles\n- **Polyline trail** — shows each bus's recent path on the map\n- **Sidebar dashboard** — fleet-wide metrics (total, moving, stopped, average speed) and a searchable, sortable bus list\n- **Marker clustering** — groups nearby buses at lower zoom levels for a clean view; toggleable\n- **Multiple map styles** — switch between OpenStreetMap standard, HOT Humanitarian, and OpenTopoMap tiles\n- **Bus detail modal** — one-click deep-dive with coordinates, speed, bearing, and a direct OpenStreetMap link\n- **Fully responsive** — works on desktop, tablet, and mobile\n- **Zero dependencies to install** — pure HTML/CSS/JS, served directly from the filesystem or any static host\n\n---\n\n## Technology Stack\n\n| Layer | Technology |\n|---|---|\n| Map rendering | [Leaflet.js](https://leafletjs.com) 1.9.4 |\n| Map tiles | [OpenStreetMap](https://www.openstreetmap.org) (free, no key) |\n| Marker clustering | [Leaflet.markercluster](https://github.com/Leaflet/Leaflet.markercluster) 1.5.3 |\n| Icons | [Font Awesome](https://fontawesome.com) 6.4.2 |\n| GPS data source | Locanix Fleet Management API (JSONP) |\n| Language | Vanilla JavaScript (ES6+), HTML5, CSS3 |\n| Runtime | Any modern browser — no build step, no framework |\n\n---\n\n## Getting Started\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/jay6430/navsari-bus-tracker.git\ncd navsari-bus-tracker\n```\n\n### 2. Open in a browser\n\nFor the simplest setup, serve the `bus-tracker` directory with any static HTTP server:\n\n```bash\n# Python (built-in)\npython3 -m http.server 8080 --directory bus-tracker\n\n# Node.js (npx)\nnpx serve bus-tracker\n```\n\nThen open `http://localhost:8080` in your browser.\n\nYou can also open `bus-tracker/index.html` directly as a `file://` URL — the JSONP data fetch works without a server.\n\n---\n\n## Project Structure\n\n```\nnavsari-bus-tracker/\n├── bus-tracker/\n│   ├── index.html          # Application shell\n│   ├── css/\n│   │   └── styles.css      # Design system and responsive layout\n│   ├── js/\n│   │   ├── app.js          # API polling, data normalisation, app state\n│   │   ├── map.js          # Leaflet map, SVG markers, polyline trails\n│   │   └── dashboard.js    # Sidebar bus list, search, modal\n│   └── assets/\n│       └── screenshot.png\n├── collect_bus_data.py     # Script to log raw GPS feed to CSV\n├── dashboard.py            # Streamlit analytics dashboard (historical data)\n├── bus_tracking_data.csv   # Sample collected GPS data\n└── README.md\n```\n\n---\n\n## How It Works\n\n1. `app.js` fires a JSONP request to the Locanix fleet API every 10 seconds.\n2. The raw response is normalised — speed converted from m/s to km/h, Unix timestamps formatted, cardinal directions derived from compass bearing.\n3. Per-bus coordinate history (up to 100 points) is maintained in memory for polyline trails.\n4. `map.js` renders each bus as an inline SVG marker: an arrowhead + circle group rotated to the GPS heading, with the short bus label counter-positioned so it remains upright regardless of direction.\n5. `dashboard.js` populates the sidebar list, handles search filtering, and wires up the detail modal.\n\n---\n\n## Testing\n\nThis web app was tested on [TestGrid's TestOS](https://testgrid.io) platform.\n\n---\n\n## Data Source\n\nBus positions are sourced from the **Locanix Fleet Management System** API. The Gujarat State Road Transport Corporation (GSRTC) / local fleet operator exposes live GPS telemetry including:\n\n- Latitude / Longitude (WGS84)\n- Speed (m/s, converted to km/h)\n- Compass heading (degrees, 0 = North)\n- Timestamp (Unix epoch)\n\n---\n\n## License\n\nThis project is released under the [MIT License](LICENSE).\n\n---\n\n## Author\n\n**Jay Kadam** — [github.com/jay6430](https://github.com/jay6430)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjay6430%2Flive-bus-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjay6430%2Flive-bus-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjay6430%2Flive-bus-tracker/lists"}