A gamified hiking trail app that transforms hiking into an interactive adventure. Using GPS tracking, challenge points, and leaderboards, TrailQuest motivates users to explore and complete trails around Melbourne. Features include trail navigation, quiz challenges, photo opportunities, and a points-based reward system.
- Interactive trail navigation with real-time GPS tracking
- Challenge points with quizzes along trails
- Photo capture and sharing capabilities
- Points system and leaderboards
- Real-time step counting and distance tracking
- Trail completion tracking
- Multiple difficulty levels
- Social features with user reviews
- Interactive Google Maps view of Melbourne trails.
- Trails are fetched from Firestore (collection:
trail_v4). - Each marker opens a trail detail screen with distance, estimated time, and route visualisation.
- Supports polylines to render the full trail path.
- Clean architecture with
MainActivity,HomeMapScreen, andTrailDetailScreen. - Shared data model (
Trail.kt) that includes both legacy fields and the new schema.
-
Android Development
- Kotlin + Jetpack Compose for UI
- Coroutines for asynchronous operations
- Material 3 Design System
- ViewModel + StateFlow for state management
-
Maps & Location
- Google Maps SDK + Maps Compose
- Location Services for GPS tracking
- Polyline encoding/decoding
-
Backend & Storage
- Firebase Firestore for trail and user data
- Firebase Authentication
- AWS S3 for photo storage
-
Sensors & Hardware
- Step Counter sensor integration
- Camera API for photo capture
- Activity recognition
-
Development Tools
- Python scripts for data import
- Gradle for build automation
- JUnit and Compose testing tools
The importer (scripts/import-walks-3.py) fetches the Self-Guided Walks dataset from the City of Melbourne and writes it into Firestore in a normalized format.
Install dependencies:
pip install -r scripts/requirements.txtCreate a file firebase.local.yaml in the scripts/ folder:
You should export a service account JSON file which contains a private key from Firebase Console.
project_id: YOUR_FIREBASE_PROJECT_ID
service_account: path/to/serviceAccount.json
collection: trail_v4
dataset_url: https://data.melbourne.vic.gov.au/api/explore/v2.1/catalog/datasets/self-guided-walks/recordscd scripts
python import-walks-3.py --keep-pointsFlags:
--keep-points: also store downsampledtrailPointsfor detailed route rendering.--debug: print skip reasons and sample fields during import.
Sydney trails are manually curated from KML data and saved locally as JSON (e.g., sydney_trails_v4_schema_updated.json).
Use the new scripts/firestore_manager.py script to upload the Sydney dataset into Firestore.
python3 scripts/firestore_manager.py \
--key trailquest-service-key.json \
--collection trail_v4_update \
--upload sydney_trails_v4_schema_updated.jsonThis script automatically:
- Converts {lat, lng} dictionaries into proper Firestore GeoPoint objects
- Normalizes timestamps (updatedAt) to numeric milliseconds
- Inserts or updates each document in the specified Firestore collection
Before uploading new datasets, you can backup or duplicate existing Firestore collections.
python3 scripts/firestore_manager.py \
--key trailquest-service-key.json \
--collection trail_v4_update \
--backup trail_v4_update_backup.jsonpython3 scripts/duplicate_collection.py \
--key trailquest-service-key.json \
--from trail_v4_update \
--to trail_v5_backupEach trail doc includes fields such as:
trailId,trailName,trailDescriptiontrailDistance,trailEstTime,trailType,terrainTypetrailAmenities,trailAccessibility,trailSourceUrlactivityType,trailMediabbox,trailPoints,path_polyline,updatedAt
TrailQuest/
│
├── app/ # Android app source
│ ├── ui/ # UI components (HomeMapScreen, TrailDetailScreen, etc.)
│ └── data/ # Data models (Trail.kt)
│
├── scripts/ # Importer scripts + requirements.txt
│ ├── *.py
│ ├── requirements.txt
│ └── firebase.local.yaml (not committed)
│
└── README.md
- Right-click on the
appfolder - Select
Run 'All Tests'to run both unit and instrumented tests- Or select
Run 'Tests in app'for unit tests only - Or right-click specific test files to run individual tests
- Or select
- Challenge completion logic
- Location-based triggers
- Basic calculations (points, distance)
- Google Maps and basic geographical calculations