Emergency identity platform with:
- an Android app (
app/) for creating and sharing emergency profile data - a web app + serverless APIs (
helper-id/) for public profile access, short-lived share links, and Gemini proxy calls
app/ Android (Kotlin + Jetpack Compose + Firebase + Room)
helper-id/ Vite + React frontend and Vercel serverless APIs (api/*.js)
gradle/, gradlew* Android build tooling
- Emergency ID card UI with profile, medical notes, and emergency contacts
- SOS flow with SMS + optional location link
- Offline-first profile behavior (Room cache + pending sync)
- Anonymous Firebase auth bootstrap and Firestore profile storage
- Shareable emergency profile links minted via
/api/mintand resolved by/api/profile - Gemini server-side proxy endpoint at
/api/gemini(API key stays server-side)
- Android Studio (latest stable recommended)
- JDK 17 (Android Gradle Plugin 8.x compatibility)
- Node.js 18+ and npm (for
helper-id/) - Firebase project configured for:
- Anonymous Authentication
- Firestore Database
- Ensure
app/google-services.jsonis present and matches your Firebase project. - Open the repository root in Android Studio.
- Sync Gradle.
- Run on emulator/device.
CLI build:
./gradlew :app:assembleDebugWindows PowerShell:
.\gradlew.bat :app:assembleDebug- Install dependencies:
cd helper-id
npm install- Create
.env.localinhelper-id/with required values:
GEMINI_API_KEY=your_gemini_key
FIREBASE_SERVICE_ACCOUNT_KEY={"type":"service_account",...}
PROFILE_JWT_SECRET=replace_with_a_long_random_secretNotes:
FIREBASE_SERVICE_ACCOUNT_KEYmust be a JSON string (single line) forfirebase-admin.PROFILE_JWT_SECRETsigns temporary profile access tokens used by/api/mintand/api/profile.
- Run local dev server:
npm run dev- Build production bundle:
npm run buildPOST /api/mint- Verifies Firebase ID token from
Authorization: Bearer <token> - Generates/reuses public key
- Returns signed temporary URL (
/e/:key?t=...)
- Verifies Firebase ID token from
GET /api/profile?key=<publicKey>&t=<jwt>- Validates token
- Maps public key to UID
- Returns sanitized profile fields only
POST /api/gemini- Proxies prompt to Gemini model server-side
-
helper-id/node_modules/appears committed locally; keep it gitignored and out of source control. -
local.propertiesis machine-specific for Android SDK paths; do not commit personalized values.
No license file is currently present in the repository. Add one if this project will be shared publicly.