💧 Anthar-Jala Watch
A community borewell monitor for groundwater awareness
Crowdsourced water-table insights for farmers and residents in rural India.
Groundwater (Anthar-Jala) levels are falling across many regions. Most farmers and homeowners only discover their borewell is failing when it is already too late. There is rarely a shared picture of water-table health in a village—making it hard to plan usage, avoid unnecessary new borewells, and invest in recharge instead of only extraction.
Anthar-Jala Watch turns invisible groundwater into a visible, community-managed resource.
Anthar-Jala Watch is a Community Borewell Monitor: a crowdsourced water-table map where users log borewell depth and yield. The app aggregates readings into a water stress heatmap for the neighborhood, helping communities decide when to conserve water and when to start recharge activities—before summer peaks cause failures.
- Record water depth (feet), yield (inches/hour), and year of digging
- GPS-based location with automatic privacy rounding (~100 m precision)
- Animated vertical depth scale for intuitive reading entry
- Data synced to Cloud Firestore for community aggregation
- Interactive Google Maps view centered on your village
- Heatmap layer (green → yellow → red) reflecting local water stress
- Marker clustering for grouped borewell readings
- Live village statistics: average yield, average depth, critical wells, total logs
- Cluster averages computed per GPS area (~100 m grid)
- Notifications-style alerts screen for your area
- Detects seasonal water-table drops (e.g. 10+ ft between reading periods)
- Flags moderate and critical stress zones based on community yield data
- Badge count on the dashboard when new alerts are active
- Step-by-step DIY recharge structures:
- Percolation pit
- Recharge trench / channel
- Sand filter chamber
- Simple vector diagrams for each technique
- Exact house locations are never stored
- Coordinates are rounded to 3 decimal places (~100 m) before upload
- Clear in-app privacy messaging for contributors
- Email/password sign-up and login
- Google Sign-In integration
- Village selection during registration (e.g. Sirsi, Banavasi, Bhairumbe, Hulekal)
| Layer | Technology |
|---|---|
| Language | Kotlin |
| UI | Jetpack Compose, Material 3 |
| Architecture | MVVM (ViewModel + Repository) |
| Navigation | Navigation Compose |
| Backend | Firebase Auth, Cloud Firestore |
| Maps | Google Maps SDK, Maps Compose, Heatmap API |
| Location | Google Play Services Location |
| Build | Gradle (Kotlin DSL), KSP |
flowchart TB
subgraph Users
A[Farmer / Resident]
end
subgraph App
B[Log Borewell]
C[Anonymize GPS ~100m]
D[Firestore]
E[Cluster & Stats Engine]
F[Heatmap + Map]
G[Alerts]
H[Recharge Guide]
end
A --> B --> C --> D
D --> E
E --> F
E --> G
A --> H
- A user logs depth, yield, year dug, and location.
- Location is rounded for privacy, then saved to Firestore.
- Readings are grouped into GPS clusters; averages and stress levels are calculated.
- The map heatmap and village stats update from community data.
- Alerts are generated when stress or seasonal depth drops exceed thresholds.
- Android Studio Ladybug (2024.2+) or newer recommended
- JDK 11+
- Android device or emulator with Google Play Services
- A Firebase project
- A Google Cloud project with Maps SDK for Android enabled
git clone https://github.com/Wafee17/AntharJalaWatch.git
cd AntharJalaWatch- Create a Firebase project and add an Android app with package name:
com.example.anthar_jalawatch - Download
google-services.jsonand place it in:app/google-services.json - Enable Authentication (Email/Password and Google).
- Create a Cloud Firestore database (test or production mode).
- Enable Google Sign-In and add your Web client ID for Credential Manager.
In the project root, create or edit local.properties (this file is git-ignored):
sdk.dir=C\:\\Users\\YourName\\AppData\\Local\\Android\\Sdk
MAPS_API_KEY=your_google_maps_api_key
WEB_CLIENT_ID=your_firebase_web_client_id.apps.googleusercontent.com
GEMINI_API_KEY=your_gemini_api_key_optional| Key | Purpose |
|---|---|
MAPS_API_KEY |
Google Maps & Heatmap layer |
WEB_CLIENT_ID |
Google Sign-In (OAuth 2.0 Web client from Firebase) |
GEMINI_API_KEY |
Reserved for future AI features |
Never commit
local.propertiesor API keys to GitHub.
Adjust for production. Example permissive rules for student/demo use:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
match /borewells/{docId} {
allow read: if request.auth != null;
allow create: if request.auth != null;
}
}
}./gradlew assembleDebugOr open the project in Android Studio and click Run.
Grant location permission when logging a borewell so readings appear on the community map.
app/src/main/java/com/example/anthar_jalawatch/
├── data/
│ ├── models/ # Borewell, User, WaterAlert, WaterCluster
│ └── repository/ # Auth & Firestore access
├── navigation/ # App routes & NavHost
├── ui/
│ ├── components/ # Heatmap, depth indicator
│ ├── screens/ # Dashboard, Log, Alerts, Recharge, Auth
│ └── theme/ # Material 3 dark theme
├── util/ # Location, clustering, alerts
└── MainActivity.kt
| Screen | Route | Description |
|---|---|---|
| Splash | splash |
Branded launch |
| Login / Sign up | login, signup |
Authentication |
| Dashboard | dashboard |
Map, heatmap, village stats |
| Log borewell | log_borewell |
Submit a reading |
| Recharge guide | recharge |
DIY recharge steps |
| Alerts | alerts |
Community water alerts |
- Water sustainability — shift from individual extraction to community management
- Disaster prevention — surface stress before peak summer
- Resource awareness — make groundwater visible and actionable
| Setting | Value |
|---|---|
| Min SDK | 24 (Android 7.0) |
| Target SDK | 36 |
| Package | com.example.anthar_jalawatch |
Contributions are welcome. To propose a change:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project was developed as part of an Android App Development using GenAI coursework module (Natural Resources — Anthar-Jala Watch).
Specify your license here if you publish publicly, for example:
MIT License — see LICENSE file for details.
- Inspired by the Anthar-Jala Watch project specification (community borewell monitoring for groundwater sustainability)
- Built with Jetpack Compose, Firebase, and Google Maps Platform
Made with care for villages facing falling water tables — Sirsi, Banavasi, and beyond.