mirror of
https://github.com/mudabbir-ahmad/MAD-Treasure-Hunt.git
synced 2026-10-07 19:00:20 +00:00
ca27f8d6ed51a418b0326ae4e14635b34aa9e669
Welcome to the mobile application development repository for our Treasure Hunt Game! This project is built using React Native and Expo.
Get started
-
Install dependencies
npm install -
Start the app
npx expo start
Database Structure
This project uses split JSON files in DB/ so each collection behaves like its own REST endpoint.
Purpose
- Keep data modular and readable.
- Mirror server-side endpoint structure before moving to a hosted REST API.
- Allow the app to load all collections into one in-memory state via
app/Model/DbController.js.
Files
meta.json: global version and numeric ID counters.users.json: user accounts and role state (Uid,Gid,SGid,TGid,IsAcceptedAdmin).groups.json: top-level game groups (Gid), admin approvals, and group settings.subgroups.json: subgroup definitions within each group (SGidscoped byGid), join codes, cache trigger defaults.subgroup-memberships.json: membership bridge fromUidtoGid/SGid.admin-waitlist.json: pending admin requests for groups when active admins already exist.teams.json: team entities for non-admin subgroup players.team-members.json: membership bridge fromUidtoTid.game-data.json: per-group game payloads (geocaches, map/game objects).game-types.json: available game type options for UI flow.db.json: index file listing split JSON resources.
ID Rules
Uid: unique user ID.Gid: unique group/game ID.SGid: subgroup ID within a group (0is admin subgroup).Tid: unique team ID.
Admin Logic
- Group creator is set as admin (
SGid = 0) and accepted. - New admin join requests go into
admin-waitlist.jsonif active admins exist. - If no active admin exists, the requester is auto-promoted to accepted admin.
- Group-level
ApprovedAdminsstores accepted adminUidvalues.
Timestamp Format
CreatedAtvalues are stored at minute precision:- format:
YYYY-MM-DDTHH:mmZ - example:
2026-03-17T14:42Z
- format:
Languages
JavaScript
100%