The Zorphix App is an offline-first event management application built with React Native and Expo. It allows event organizers to manage registrations, verify participants via QR codes, and sync on-spot data to a central Firebase server. The core philosophy is Local-First: all critical operations (scanning, searching, registering) happen against a local SQLite database to ensure zero latency and offline reliability.
- Local Database: The app uses
expo-sqliteto maintain a complete copy of participant data on the device. - Source of Truth: For the duration of the event, the local SQLite database acts as the immediate source of truth for verification.
- Performance: Searching and QR scanning query the local SQL database, providing instant results regardless of network conditions.
- Local Auth: Authentication is handled locally. The app verifies credentials against a pre-defined list of admin accounts stored within the application code.
- Role-Based Access:
- Master Admin (
admin@zorphix.com): Has global access, including the ability to perform a one-time bulk import from Excel. - Event Admins: Restricted context to their specific events (e.g., Pixel Reforge, AlgoPulse).
- On-Spot Desk: Simplified interface purely for registering users.
- Master Admin (
Data enters the local system in two primary ways:
- One-Time Excel Import: The Master Admin seeds the database by importing a master list
.xlsxfile. This populates the local SQLite database with all pre-registered web participants. - On-Spot Registration: New participants are registered directly via the app forms. These records are saved locally with a
sync_statusof0(Unsynced).
The app implements a specific "Push-Only" sync strategy to handle on-spot data:
- Direction: Local Device → Firebase.
- Trigger: The "Sync" button in the header.
- Process:
- The app queries the local SQLite database for records marked as
Unsynced(sync_status = 0). - These records are uploaded to the Firestore
local_registrationscollection (or the main collection for imported data). - Once successfully uploaded, the local records are marked as
Synced.
- The app queries the local SQLite database for records marked as
- Note: The app does not pull data down from Firebase during the event to prevent overwriting local verification states or dealing with merge conflicts in real-time.
- QR Scanning:
- Individual Mode: Scans a participant's QR code, looks up their UID in the local SQLite db, and marks them as "Participated".
- Team Mode: Allows rapid scanning of multiple members to associate them with a single Team ID.
- Payment Verification: Checks the
payment_verifiedflag in the local database to grant or deny entry.
- Excel Export: The entire local database can be exported to an
.xlsxfile for backup or reporting. - Import from Peers: Devices can share their database state via generated QR codes or file sharing to keep multiple admin devices relatively consistent without relying on the central server.