How nickfox/gpstracker works
GPS Tracker is a multi-platform location-tracking product: mobile apps capture and upload device locations; server implementations accept and store updates; web maps expose current positions and route history. The main documented v7 workflow is represented by the Kotlin Android client and PHP/JS server, with the Swift iOS client and documented legacy implementations retained as distinct branches. Source excerpts and the index support the PHP routing and persistence relationships; several mobile and legacy internals were not sampled, so their links are limited to documented relationships.
Main entry points: index.php HTTP entry and routes · TrackingViewModel.kt Tracking view model · LocationService.php Location processing · RouteRepository.php Route repository
Components 26
Mobile clients
- Android app UI
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/GpsTrackerActivity.kt - Tracking view model
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/ui/TrackingViewModel.kt - Background tracking
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/service/TrackingService.kt - Location repository
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/data/repository/LocationRepositoryImpl.kt - Settings repository
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/data/repository/SettingsRepositoryImpl.kt - Android API client
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/network/ApiService.kt - iOS screens
phoneClients/ios/GPSTracker/View/ContentView.swift - iOS tracking view model
phoneClients/ios/GPSTracker/ViewModel/TrackingViewModel.swift - iOS location service
phoneClients/ios/GPSTracker/Service/LocationService.swift - iOS location repository
phoneClients/ios/GPSTracker/Repository/LocationRepository.swift - iOS API service
phoneClients/ios/GPSTracker/Service/APIService.swift
PHP server
- HTTP entry and routes
servers/php/index.php - Request router
servers/php/src/Router.php - Location controller
servers/php/src/Controllers/LocationController.php - Location processing
servers/php/src/Services/LocationService.php - GPS location model
servers/php/src/Models/GPSLocation.php - Route controller
servers/php/src/Controllers/RouteController.php - Route repository
servers/php/src/Services/RouteRepository.php - Database access
servers/php/src/Services/Database.php
Map interface
- Map page
servers/php/templates/map.php
Legacy platforms
- Earlier mobile clients
phoneClients/javaMe/src/com/websmithing/gpstracker/GpsTracker.java - ASP.NET server
servers/dotNet/UpdateLocation.aspx.cs - WordPress plugin
servers/wordpress/gps-tracker/gpstracker.php
Other components
- Tracker user
- Location database
- Map viewer
Connections 30
- Tracker user → Android app UI: configures tracking
- Android app UI → Tracking view model: uses view model
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/GpsTrackerActivity.kt - Tracking view model → Background tracking: controls tracking
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/ui/TrackingViewModel.kt - Tracking view model → Location repository: uses repository
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/ui/TrackingViewModel.kt - Tracking view model → Settings repository: uses settings
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/ui/TrackingViewModel.kt - Background tracking → Location repository: uploads locations
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/service/TrackingService.kt - Location repository → Android API client: calls API
phoneClients/android/app/src/main/java/com/websmithing/gpstracker/data/repository/LocationRepositoryImpl.kt - Android API client → HTTP entry and routes: posts location updates
- Tracker user → iOS screens: uses tracking app
- iOS screens → iOS tracking view model: drives tracking
- iOS tracking view model → iOS location service: uses location
- iOS location service → iOS location repository: provides location
- iOS location repository → iOS API service: uploads updates
- iOS API service → HTTP entry and routes: sends location data
- HTTP entry and routes → Request router: dispatches requests
servers/php/index.php - HTTP entry and routes → Location controller: registers updates
servers/php/index.php - HTTP entry and routes → Route controller: registers route queries
servers/php/index.php - HTTP entry and routes → Map page: serves map page
servers/php/index.php - Location controller → Location processing: processes updates
servers/php/src/Controllers/LocationController.php - Location processing → GPS location model: uses location model
servers/php/src/Services/LocationService.php - Location processing → Database access: stores locations
servers/php/src/Services/LocationService.php - Route controller → Route repository: queries routes
servers/php/src/Controllers/RouteController.php - Route repository → Database access: queries records
servers/php/src/Services/RouteRepository.php - Route repository → GPS location model: uses location model
servers/php/src/Services/RouteRepository.php - Database access → Location database: reads and writes
servers/php/src/Services/Database.php - Map page → Map viewer: renders map
- Tracker user → Map viewer: views route history
- Tracker user → Earlier mobile clients: may use
- Earlier mobile clients → ASP.NET server: sends tracking data
- Tracker user → WordPress plugin: may use