Real-time road hazard signals for Nepal.
Sanket is a citizen-reporting platform for road hazards in Nepal — landslides, floods, potholes, and similar incidents that block or endanger a route. Citizens report through the mobile app; local authorities review and verify through the web dashboard.
Mobile App (Android APK) Web App (Admin & Authority)
React + Capacitor React + Vite
Camera | Geolocation React Router v6
│ │
└──────────── Firebase ───────────┘
Firestore (data)
Firebase Storage (photos)
Firebase Auth (users)
Cloud Functions (logic)
- Mobile app — report road hazards, view nearby incidents, confirm existing reports.
- Authority web app — district-scoped dashboard to verify or reject submitted reports.
- Admin web app — full system view, analytics, override any decision.
- Node.js 18+
- A Firebase project (the existing
sanket-87ef4project is already configured)
git clone <repo-url>
cd Sanket
npm installcp .env.example .env
# Fill in your Firebase config values from:
# Firebase Console → Project Settings → General → Your apps → Web app
⚠️ Key rotation required: The Firebase API key was previously committed to the repository. Rotate it now: Firebase Console → Project Settings → General → Web API Key → Regenerate. Put the new key in.envonly — never commit.env.
npm run dev
# Opens at http://localhost:5173# 1. Download serviceAccountKey.json from:
# Firebase Console → Project Settings → Service accounts → Generate new private key
# 2. Place it in the project root (it's gitignored)
# 3. Install firebase-admin:
npm install firebase-admin
# 4. Run the seed script:
node scripts/seed.mjsnpm install -g firebase-tools
firebase login
firebase deploy --only firestore:rules,storage:rulesThe repository now includes firebase.json and firestore.indexes.json, so
that command deploys the workflow security rules and the indexes required by
the live reporter, district, and map feeds. Deploy the full backend after the
functions are built with:
firebase deploycd functions
npm install
npm run build
cd ..
firebase deploy --only functions
⚠️ These are for demo/testing only. Rotate all passwords before any real deployment.
| Role | Password | Scope | |
|---|---|---|---|
| Admin | admin@sanket.np | Admin@1234 | All districts |
| Authority | authority.ktm@sanket.np | Auth@1234 | Kathmandu, Lalitpur, Bhaktapur |
| Authority | authority.pkr@sanket.np | Auth@1234 | Kaski, Tanahu |
| Authority | authority.chit@sanket.np | Auth@1234 | Chitwan, Makwanpur |
| User | user1@sanket.np | User@1234 | — |
| User | user2@sanket.np | User@1234 | — |
No local Android Studio required. The APK is built via GitHub Actions.
- Push to the
mainbranch (or go to GitHub → Actions → "Build Android APK" → Run workflow). - Wait for the workflow to complete (~5–8 minutes).
- Download
sanket-debug.apkfrom the workflow run's Artifacts section. - Transfer to an Android device and install (enable "Install from unknown sources" in settings).
Add these in GitHub → Settings → Secrets and variables → Actions:
| Secret | Value |
|---|---|
VITE_FIREBASE_API_KEY |
Your Firebase API key |
VITE_FIREBASE_AUTH_DOMAIN |
e.g. sanket-87ef4.firebaseapp.com |
VITE_FIREBASE_PROJECT_ID |
sanket-87ef4 |
VITE_FIREBASE_STORAGE_BUCKET |
sanket-87ef4.firebasestorage.app |
VITE_FIREBASE_MESSAGING_SENDER_ID |
Your sender ID |
VITE_FIREBASE_APP_ID |
Your app ID |
npm install @capacitor/core @capacitor/cli @capacitor/android
npm install @capacitor/camera @capacitor/geolocation @capacitor/preferences
npx cap init "Sanket" "np.sanket.app" --web-dir dist
npx cap add android
npm run build
npx cap sync android| Variable | Default | Description |
|---|---|---|
VITE_AI_SCREENING_ENABLED |
false |
Enable AI image screening in admin review (requires Google Cloud Vision setup — see design.md) |
src/
components/ Shared UI components (AddressSearchInput, IncidentsMap, etc.)
lib/ Services (firebase, auth, incidents, storage, geo, districts, offlineQueue)
mobile/ Mobile app screens (MobileApp, ViewTab, ContributeTab, ProfileTab)
pages/ Web app pages (Landing, AdminDashboard, AuthorityDashboard, auth/)
types/ TypeScript types (Report, Confirmation, AppUser, etc.)
functions/ Firebase Cloud Functions (TypeScript)
scripts/ Seed script
firestore.rules Firestore security rules
storage.rules Storage security rules
.github/workflows/ APK build workflow