A mobile-friendly, "Liquid Glass" styled web application for checking real-time bus arrival times in Hong Kong. Supports KMB, Citybus, and NLB.
- Real-time Clock: Displays current date and time.
- GPS Location: Automatically finds nearby bus stops based on your location.
- Search: Search for routes by number (e.g., 68X).
- Favorites: Save frequently used stops or routes for quick access.
- ETA Information: View the next 3 scheduled arrivals for a selected route.
- Offline Capable Database: Caches Stop/Route data for performance (requires initial update). First time you open it, click the Update button to download the bus routes.
- Navigate to the deployed GitHub Pages URL (e.g.,
https://<username>.github.io/<repo>/). - The app will attempt to fetch data directly. If CORS issues occur, it falls back to a public proxy (
allorigins.win).
To avoid CORS issues during local testing, a simple Python proxy server is included.
- Double-click
start_server.bat(Windows) or runpython server.py. - Open
http://localhost:8000in your browser.
If hosting on a PHP-enabled server:
- Upload all files including
proxy.php. - The app will automatically detect and use
proxy.phpfor API requests.
- Data.gov.hk
- KMB / LWB data
- Citybus data
- New Lantao Bus (NLB) data
index.html: Main application interface.style.css: Styling and "Liquid Glass" effects.script.js: Application logic, IndexedDB management, and API handling.server.py: Local Python proxy server.proxy.php: PHP proxy for web hosting.
