CityGem Go! is an interactive treasure hunt app designed to deliver unique and fun adventures. Players can explore real-world locations, solve riddles, and complete challenges through an intuitive interface.
- Sign Up/Login: User authentication with
Firebase Authentication
and optional credential saving usingAsyncStorage
. - Custom Routes: Dynamically displays available routes based on the user's location, featuring riddles and challenges.
- Interactive Riddles: Users can answer riddles, verify their responses, and advance through routes.
- Photo and Geolocation: Validates answers via photos taken at specific geographic locations.
- Notifications: Sends reminders to encourage users to return and continue their adventure.
- Progress Saving: Combines
Firebase Firestore
for cloud storage andSQLite
for local caching, optimizing user session and data management.
- Frontend:
React Native (Expo)
- Backend:
Firebase Authentication
andFirestore
- Notifications:
expo-notifications
- Geolocation:
expo-location
- Local Storage:
SQLite
andAsyncStorage
- Node.js: Version >= 16.x
- Expo CLI: Installable via
npm install -g expo-cli
- Firebase Account: Required for authentication and database setup.
-
Clone the repository:
git clone https://github.com/ngljcb/px-city-gem-go.git cd px-city-gem-go/city-gem-go
-
Install dependencies:
npm install
-
Configure Firebase:
- Create a project on Firebase Console.
- Download the
google-services.json
file (for Android) orGoogleService-Info.plist
file (for iOS). - Place the file in the appropriate directory:
- Android:
android/app
- iOS:
ios/
- Android:
-
Update Firebase configuration:
-
Edit the
FirebaseConfig.js
file:import { initializeApp } from 'firebase/app'; const firebaseConfig = { apiKey: 'YOUR_API_KEY', authDomain: 'YOUR_PROJECT_ID.firebaseapp.com', projectId: 'YOUR_PROJECT_ID', storageBucket: 'YOUR_PROJECT_ID.appspot.com', messagingSenderId: 'YOUR_SENDER_ID', appId: 'YOUR_APP_ID', }; export const FIREBASE_APP = initializeApp(firebaseConfig);
-
-
Start the app:
expo start
├── app/ # Main app screens and routes
├── assets/ # Static assets like images and icons
├── components/ # Reusable UI components
├── constants/ # App-wide constants (e.g., colors)
├── models/ # Data models (business logic)
├── services/ # Core services like notifications & database handlers
├── styles/ # Styling files
└── viewmodels/ # Logic to bridge views and models
Managed through the NotificationHandler
class:
- Requests permissions dynamically.
- Schedules notifications with customizable messages.
- Handles app state transitions to trigger background notifications.
- Validates user answers via geotagged photos taken at specific locations.
- Utilizes
expo-location
for geolocation checks and saves verified photos to the gallery.
- Loads routes from
Firestore
and caches them inSQLite
for offline performance. - Allows users to view and select routes based on proximity.
This project is released under the MIT License. For more details, see the LICENSE
file.