Use Google Maps for navigation β Use HKMTRVUE for train schedules & real-time arrivals β Complete your Hong Kong journey!
π The Google Maps Companion - While Google Maps gets you to MTR and LRT stations, HKMTRVUE provides schedules and real-time arrival times in a traditional timetable view design. A specialized frontend web app with official DATA.GOV.HK data updated every 10 seconds - no GPS or location services required.
- Use Google Maps to find directions to any MTR or Light Rail station
- Get walking/driving routes to station entrances
- See estimated travel time to reach the station
- Open HKMTRVUE web app on your phone
- Select your destination station (no GPS location required)
- See live schedules & arrival times in traditional timetable view updated every 10 seconds
- Check which platform and direction to take
- Board the train with confidence knowing exact arrival times
- Use Google Maps again for final walking directions from destination station
- Bookmark frequently used stations for faster access
- Google Maps Navigation: Get the fastest route to your nearest MTR/LRT station
- Real-time Train Data: Check exact arrival times so you don't rush unnecessarily
- Platform Information: Know which platform and direction before you arrive
- Transfer Planning: See connections and timing for multi-line journeys
- Familiar Interface: Use Google Maps (which you already know) for navigation
- No App Downloads: HKMTRVUE works in any web browser - frontend web app only
- No Location Required: Manual station selection - no GPS or location services needed
- Traditional Timetable View: Easy-to-read scheduled timetables and real-time arrival information
- Complete Journey Planning: From hotel to attraction using both apps together
- Language Support: English and Traditional Chinese in both Google Maps and HKMTRVUE
- Perfect Timing: Arrive at station just as your train is coming
- Avoid Crowds: Choose less crowded trains by seeing multiple arrival times
- Weather Protection: Minimize waiting time on outdoor platforms (especially LRT)
- Data Efficiency: Only use data when you need real-time information
Google Maps Strengths:
- πΆββοΈ Walking/driving directions to stations
- πΊοΈ Overview of entire Hong Kong transit network
- π Station locations and nearby landmarks
- π’ Integration with restaurants, hotels, attractions
HKMTRVUE Strengths:
- π Real-time train schedules & arrival times in traditional timetable view (updated every 10 seconds)
- π Platform and direction information
- β±οΈ Exact waiting times and train frequencies
- π± Lightweight frontend web app - no installation or GPS required
Step 1: Use Google Maps
πΊοΈ Search "Hong Kong Airport to Tsim Sha Tsui"
πΆββοΈ Follow walking directions to Airport Express platform
Step 2: Use HKMTRVUE
π Check Airport Express real-time arrivals
β±οΈ See next train in 8 minutes, then 18 minutes
π Confirm Platform 1 for Hong Kong/Kowloon direction
Step 3: During Journey
π± Use HKMTRVUE to check Kowloon Station arrival time
π Plan transfer to Tsuen Wan Line
Step 4: Final Destination
πΊοΈ Use Google Maps for walking directions from Tsim Sha Tsui Station to hotel
Step 1: Check Schedule
π± Open HKMTRVUE β Select Sha Tin Station (East Rail Line)
β° Next train: 3 minutes, then 6 minutes, then 9 minutes
Step 2: Navigate to Station
πΊοΈ Google Maps β "Directions to Sha Tin MTR Station"
πΆββοΈ 5-minute walk β Perfect timing to catch the 6-minute train
Step 3: Monitor Journey
π± HKMTRVUE β Check real-time arrival at Admiralty for transfer
π Transfer to Island Line for Central
Step 1: Route Planning
πΊοΈ Google Maps β Overview of LRT network and stations
π Find nearest LRT stop to your current location
Step 2: Real-time Information
π± HKMTRVUE β Select LRT station (e.g., Tuen Mun Town Centre)
π Route 610: 4 minutes | Route 615: 7 minutes | Route 614: 12 minutes
β
Choose Route 610 for fastest journey
Step 3: Destination Navigation
πΊοΈ Google Maps β Walking directions from Yuen Long LRT station
- π Real-time MTR & LRT schedules & arrival times in traditional timetable view for all Hong Kong lines (updated every 10 seconds)
- π Live train schedules showing next 3-4 arrivals with exact timing
- π Platform and direction information so you know exactly where to go
- π± Mobile-optimized frontend web app - no installation, GPS, or location services required, works in any browser
- β‘ 10-second refresh rate - fastest real-time data in Hong Kong
- π Bilingual support (English/Traditional Chinese) for all users
- πΎ Bookmark favorite stations for quick access to frequently used routes
- π Dark mode support for comfortable viewing day and night
- π³ Haptic feedback for enhanced mobile experience
- π Auto-refresh technology with smart caching to save your data
- Official Government APIs: Direct integration with DATA.GOV.HK transport endpoints
- MTR Corporation Data: Real-time train schedules from MTR's official systems
- 10-Second Refresh Cycle: Perfectly tuned for Hong Kong's high-frequency train service
- Resilient Error Handling: Exponential backoff and retry mechanisms for Hong Kong's mobile network conditions
- π΅ Island Line (ζΈ―ε³ΆηΆ«): Chai Wan β Kennedy Town
- π΄ Tsuen Wan Line (θη£ηΆ«): Tsuen Wan β Central
- π’ Kwun Tong Line (θ§ε‘ηΆ«): Tiu Keng Leng β Whampoa
- π£ Tseung Kwan O Line (ε°θ»ζΎ³ηΆ«): Po Lam/LOHAS Park β North Point
- π€ Tuen Ma Line (屯馬碫): Tuen Mun β Wu Kai Sha
- π΅ East Rail Line (ζ±ι΅ηΆ«): Lo Wu/Lok Ma Chau β Admiralty
- π‘ South Island Line (εζΈ―ε³ΆηΆ«): South Horizons β Admiralty
- π’ Airport Express (ζ©ε ΄εΏ«ηΆ«): AsiaWorld Expo β Hong Kong
- π Tung Chung Line (ζ±ζΆηΆ«): Tung Chung β Hong Kong
- π΄ Complete LRT Network in Tuen Mun and Yuen Long districts
- 68 LRT Stations across New Territories West
- 12 LRT Route Numbers (505, 507, 610, 614, 614P, 615, 615P, 705, 706, 751, 751P, 761P)
// Seamless integration flow:
1. πΊοΈ Google Maps β Find directions to nearest MTR/LRT stations
2. π HKMTRVUE App β Manual station selection (no GPS required) for real-time timetable view
3. β° Traditional Timetable Design β Clear scheduled times and live arrival information
4. π Smart Timing β Combine walking time + wait time + travel time
5. π± Browser-based β Direct handoff between Google Maps and HKMTRVUE web app
- Density-Optimized: Hong Kong has the world's highest concentration of MTR stations - this app helps navigate the complexity
- Transfer Intelligence: Multi-line journeys are common in HK - smart transfer suggestions save time
- Rush Hour Optimization: Real-time data crucial during Hong Kong's intense peak hours (7-9 AM, 6-8 PM)
- Tourist-Friendly: Essential for visitors navigating Hong Kong's extensive transit network
- Weather-Aware Planning: Indoor connections mapped for Hong Kong's rainy season and summer heat
Scenario 1: Daily Commuter (Sha Tin β Central)
Morning Routine with HKMTRVUE:
1. Check app at home β See East Rail delays/normal service
2. Google Maps integration β Walking route to Sha Tin Station
3. Real-time platform info β Platform 1 or 2 for southbound trains
4. Transfer optimization β Best route via Admiralty or direct to Central
5. Arrival prediction β Exact ETA at Central for meeting planning
Scenario 2: Tourist Journey (Airport β Tsim Sha Tsui)
Visitor Experience:
1. Land at Hong Kong Airport β Open HKMTRVUE web app (no download needed)
2. Airport Express timing β Real-time departures every 10-15 minutes
3. Kowloon Station arrival β Transfer guidance to Tsuen Wan Line
4. Google Maps handoff β Walking directions in Tsim Sha Tsui
5. Return journey planning β Bookmark favorite stations for later
Scenario 3: Light Rail User (Tuen Mun β Yuen Long)
New Territories Navigation:
1. Complex LRT network β 12 different route numbers, multiple platforms
2. Real-time platform display β Which route arrives first
3. Transfer optimization β Direct route vs. faster connection
4. Google Maps integration β Last-mile connection to final destination
5. Service disruption alerts β Alternative routing during maintenance
// Optimized for Hong Kong's mobile network conditions
const CACHE_DURATION = 10000 // 10 seconds - matches MTR frequency
const MAX_RETRIES = 3 // Handles network congestion
const API_ENDPOINTS = {
MTR: 'https://rt.data.gov.hk/v1/transport/mtr/getSchedule.php',
LRT: 'https://rt.data.gov.hk/v1/transport/mtr/lrt/getSchedule'
}
- Network Resilience: Handles Hong Kong's underground mobile coverage gaps
- Bilingual Data Processing: Seamless Chinese/English station name handling
- Local Time Accuracy: Hong Kong timezone (UTC+8) precision for arrival predictions
- Mobile Data Efficiency: Minimized API calls for Hong Kong's expensive mobile data plans
src/
βββ App.vue # Main app component with routing logic
βββ main.ts # Vue app entry point
βββ pages/ # Page components
β βββ MtrTrain/
β β βββ MtrTrain.vue # Main MTR train page with real-time data
β βββ LightRail/
β β βββ LightRail.vue # Light Rail transit page
β βββ Home/
β β βββ Home.vue # Home page component
β βββ BusEta/
β βββ BusEta.vue # Bus ETA page (placeholder)
βββ components/ # Reusable UI components
β βββ settings/
β β βββ PersonalizeDialog.vue # Settings modal dialog
β β βββ OptionsList.vue # Simplified settings buttons
β βββ icons/ # SVG icon components
β β βββ BackspaceIcon.vue
β β βββ ClearIcon.vue
β β βββ CloseIcon.vue
β βββ route-board/ # Route selection components
β β βββ BoardTabbar.vue # Tab navigation
β β βββ RouteInputPad.vue # Route input interface
β β βββ SwipeableRoutesBoard.vue # Swipeable route board
β βββ route-eta/ # ETA display components
β βββ RouteHeader.vue # Route information header
β βββ StopAccordionList.vue # Expandable stop list
β βββ TimeTableButton.vue # Timetable access button
βββ composables/ # Vue 3 composable functions
β βββ useMtrData.ts # MTR API data fetching logic
β βββ useFavoriteStations.ts # Bookmark management
β βββ useTheme.ts # Dark/light theme handling
β βββ useNetworkStatus.ts # Network connectivity monitoring
βββ constants/
β βββ mtrLines.ts # MTR line configurations and station data
βββ types/
β βββ train.ts # TypeScript interfaces for train data
βββ utils/
βββ index.ts # Utility functions (distance, formatting)
βββ tests/
βββ searchRouteHelpers.ts # Helper functions for route search
- Used by:
MtrTrain.vue
,LightRail.vue
- Purpose: Fetches real-time train arrival data from DATA.GOV.HK APIs
- Features: 10-second caching, retry logic, error handling
- APIs:
- MTR:
https://rt.data.gov.hk/v1/transport/mtr/getSchedule.php
- LRT:
https://rt.data.gov.hk/v1/transport/mtr/lrt/getSchedule
- MTR:
- Used by:
App.vue
(global), all components inherit - Purpose: Manages dark/light mode, font sizes, color schemes
- Features: System preference detection, localStorage persistence
- CSS Variables: Dynamically sets CSS custom properties for theming
- Used by: Station selection components, route displays
- Purpose: Manages user's bookmarked stations
- Storage: localStorage with JSON serialization
- Used by: Data fetching components for connection monitoring
- Purpose: Monitors online/offline status and connection quality
- Features: Connection type detection (2G, 3G, 4G, etc.)
- Used by: All MTR-related components
- Purpose: Central configuration for all MTR lines and stations
- Data: Line colors, station names (Chinese/English), terminus information
- Used by: All components handling train data
- Purpose: TypeScript interfaces for type safety
- Interfaces:
TrainArrival
,StationData
,LineConfig
, etc.
- Clean Architecture: Removed all legacy React components and unnecessary files
- Mobile-First Design: Container max-width of 480px, centered layout like HKBUS.APP
- Simplified Settings: Converted complex React settings to simple button-based interface
- TypeScript Support: Full type safety with proper interfaces and type definitions
- Clone the repository:
git clone https://github.com/HugoLi0213/HKMTRVUE.git
cd HKMTRVUE
- Install dependencies:
npm install
- Start development server:
npm run dev
- Build for production:
npm run build
This app uses real-time data from:
- DATA.GOV.HK - Hong Kong Government's open data platform
- MTR real-time arrival API endpoints
The app features a mobile-centered design similar to HKBUS.APP:
- Maximum container width of 480px
- Centered layout on larger screens
- Touch-friendly button sizes
- Smooth animations and transitions
- Card-based design with subtle shadows
- π App Updates: Force refresh service worker
- π οΈ Database Updates: Renew route database
- π Dark Mode: Switch between light/dark themes
- π³ Vibration: Enable/disable haptic feedback
- π Bookmark Management: Save and organize favorite stations
- π¨ Traditional Timetable View: Classic scheduled timetable design for easy reading
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Hugo
π§ Email: s12332146@gmail.com
π GitHub: HugoLi0213
This project is open source and available under the Apache License Version 2.0
- Hong Kong MTR Corporation for providing public transportation,also data display like:https://www.mtr.com.hk/ch/customer/services/timetable_detail_weekday.html for UI 's reference
- DATA.GOV.HK for open data APIs
- HKBUS.APP for design inspiration
- https://github.com/sammyfung/mtrtrain for code & design 's reference,API reference,data reuse.