JalOS Deep Dive: Building a Predictive Water Management Platform with FastAPI, Flutter, React, and AWS

JalOS is an AI-driven residential water management prototype that predicts how long your current supply will last.
JalOS is a predictive water resource management platform built by two developers during a hackathon. Its core innovation transforms static water level monitoring into a dynamic "how long will it last" duration estimate. The system uses a FastAPI backend, React admin portal, and Flutter resident app, with Ridge Regression for time-series demand forecasting and a Terraform + GitHub Actions + OIDC temporary credentials stack for cloud deployment. Notably, the team is transparent about key limitations: the prediction model is validated only on synthetic data, and real-world accuracy awaits testing with actual sensor data.
Can a residential community estimate how long its current water supply will last before the tank runs dry? This seemingly simple question became the starting point for JalOS — an AI-driven predictive water resource management platform developed by Jai Singh Bisht and Tanishka Rawat during the "Bharat Builds Tour: Environmental Hacks" hackathon organized by WeBuildDevs. This article breaks down the project's problem definition, system architecture, technology choices, and lessons learned during prototype development.

From "How Much Water" to "How Long Will It Last"
Residential property managers face a series of real-world challenges: monitoring water levels, estimating consumption, scheduling water tanker deliveries, and responding to sudden demand spikes. The traditional approach relies on real-time tank readings — they tell administrators how much water is currently available, but they don't answer a more critical operational question: how long will that water last?
JalOS's core design philosophy is to connect current water level readings with demand forecasting and operational context, shifting from passive "inventory checking" to proactive "predictive planning." The value of this approach lies in transforming water resource management from a static monitoring activity into a time-aware decision support system.
Three-Tier Architecture: Backend, Admin Portal, and Resident App
JalOS consists of three main components with clearly defined responsibilities:
Backend Service
The backend is built with Python and FastAPI, responsible for providing API endpoints and hosting all water management logic — including tank reading processing, inventory management, water supply duration calculations, and prediction model integration. The backend serves as the central hub of the platform, connecting both the web and mobile clients while sharing underlying functionality.
Admin Portal
The admin portal is built with React and TypeScript, providing property managers with a dashboard that covers inventory, tank water levels, forecast results, tanker scheduling, anomaly detection, maintenance records, and complaint handling.
Resident Mobile App
The resident-facing app is developed with Flutter, giving residents access to water usage information, conservation guidance, alert notifications, and complaint submission — bringing end users into the complete water management loop.
This dual-client design (web + mobile) addresses both the operational needs of property managers and the information transparency needs of residents.
Five Core Features
Water Level Monitoring: The platform displays total water inventory alongside individual tank readings. Maintaining consistency across these values is key to reliable monitoring, and was one of the main engineering challenges the team encountered.
Demand Forecasting: The team employed a Ridge Regression model to estimate future water demand based on structured time-series data. Choosing a relatively simple model like Ridge Regression is a pragmatic decision for validating the pipeline at the prototype stage.
Water Supply Duration Estimation: This is JalOS's most distinctive feature. The duration engine estimates how long the available water supply can last before hitting a critical reserve threshold or running out entirely, based on projected consumption — directly answering the project's original core question.
Anomaly Analysis: The system flags unusual consumption patterns for further investigation. The team maintains appropriately measured language here: these indicators can support early inspection, but cannot independently confirm whether a leak or equipment failure exists.
Community Operations: Tanker planning, maintenance, alerts, and complaint management connect water level monitoring to the concrete actions administrators need to take.
Ridge Regression is a regression algorithm that adds an L2 regularization term on top of ordinary linear regression. Its core idea is to minimize prediction error while simultaneously penalizing the magnitude of model coefficients, preventing certain feature weights from becoming too large and causing overfitting. For time-series demand forecasting tasks, when input features exhibit multicollinearity (for example, "time of day" and "whether it's peak hours" being highly correlated), ordinary linear regression tends to produce unstable coefficient estimates — Ridge Regression's regularization mechanism effectively mitigates this problem.
Choosing Ridge Regression over more complex models (such as LSTM or XGBoost) is well-justified: at the prototype stage, model interpretability and training stability matter more than maximum accuracy; synthetic datasets are typically small, making complex models prone to overfitting; and simpler models are easier to recalibrate with real data later. Validating the pipeline itself takes priority over validating model complexity.
Tech Stack and AWS Cloud Infrastructure
The technology choices reflect a comprehensive full-stack engineering effort:
| Layer | Technology |
|---|---|
| Backend API | Python, FastAPI |
| Prediction Model | Ridge Regression |
| Web Application | React, TypeScript |
| Mobile Application | Flutter |
| Containerization | Docker |
| Infrastructure as Code | Terraform |
| CI/CD | GitHub Actions |
| Cloud Provider | Amazon Web Services |
On the AWS side, the team's configuration is quite complete: EC2 for hosting, IAM for access control, Systems Manager Parameter Store for runtime configuration management, S3 for storing deployment artifacts and model files, CloudWatch for application log collection, and Systems Manager Run Command for deployment operations. This combination covers the full operational chain from hosting and configuration to log monitoring — a remarkably complete engineering setup for a hackathon prototype.
Infrastructure as Code (IaC) is the practice of defining and managing computing resources through code files rather than manually clicking through a cloud console. Terraform is one of the most widely used IaC tools today, developed by HashiCorp and supporting multiple cloud platforms including AWS, GCP, and Azure. Its core value lies in repeatability: the same Terraform configuration file can reliably create infrastructure with an identical structure in any environment, dramatically reducing the risk of "works in dev, breaks in prod" scenarios. For hackathon projects, using Terraform means every infrastructure change is recorded in code — team members can review infrastructure modifications through code review rather than relying on someone to remember which buttons they clicked. Combined with GitHub Actions automation, every code merge can automatically sync and update cloud resources, achieving true co-evolution of application code and infrastructure code.
Deployment Pipeline: OIDC and Infrastructure as Code
The deployment process deserves special attention. Terraform defines infrastructure as code, while GitHub Actions handles automated deployment. One particularly noteworthy practice: the workflow obtains short-lived AWS temporary credentials via OpenID Connect (OIDC) rather than storing long-lived access keys in the workflow. This significantly reduces the security risk of credential exposure and is the recommended approach for modern CI/CD pipelines.
S3 supports artifact and model file storage, CloudWatch collects application logs, and Systems Manager Run Command coordinates deployment operations on EC2 while supporting application health checks. The team noted that this setup allowed them to simultaneously think about deployment repeatability, access control, and monitoring while building the application — precisely the critical gap between "it runs" and "it's production-ready."
OpenID Connect (OIDC) is an authentication protocol built on top of OAuth 2.0. In CI/CD scenarios, the traditional approach is to store long-lived AWS access keys (Access Key ID + Secret Access Key) in GitHub Secrets, which the workflow reads at runtime. The risk with this approach is that if the key leaks — through accidental log output or misconfigured repository permissions — an attacker can continuously use that key to access cloud resources until it is manually revoked.
With OIDC, a GitHub Actions workflow requests a short-lived temporary credential from AWS at runtime (typically valid for 15 minutes to 1 hour), bound to a specific repository, branch, and workflow, and expires after use. Even if a temporary credential accidentally appears in logs, it is likely already expired by the time an attacker obtains it, making the attack window extremely small. Both AWS and GitHub officially recommend this as the standard credential management approach for production-grade CI/CD.
Engineering Challenges and Honest Limitations
What's most commendable about the JalOS project is the team's candor about their own limitations. They explicitly called out two core challenges.
The first is data consistency: ensuring that total water inventory remains consistent with individual tank readings, and handling environment-specific configurations when the web and mobile clients connect to the backend.
The second is model validation — and this is the most honest part of the entire project. The current prototype uses synthetic water demand data, and the prediction model has only been evaluated on a held-out synthetic test set. The team states directly: this is useful for testing the overall pipeline, but does not demonstrate real-world accuracy. Validating actual model performance still requires testing against real residential water meter readings and sensor data.
This attitude — not overstating, not claiming the problem is "solved" — is particularly refreshing in a landscape saturated with over-packaged AI projects.
Next Steps and Key Takeaways
The team's planned next steps include: integrating real tank level sensors and water meters, evaluating forecasts against actual consumption data, improving anomaly detection and alerting, optimizing replenishment planning, testing usability and reliability in real residential environments, and strengthening production-grade security and deployment practices.
JalOS brings together backend engineering, frontend development, machine learning, and cloud infrastructure to explore a more proactive approach to residential water management. It is a starting point, not a finished product. For developers looking to complete a full-stack + ML + cloud deployment practice within a short timeframe, this project offers a reference with clear structure, pragmatic technology choices, and a clear-eyed awareness of its own limitations. The project code is open-sourced on GitHub.
Related articles

Apple HomeView Hands-On Review: Is the $300 Smart Home Hub Worth It?
Apple HomeView hands-on: a $300 smart home hub with facial recognition for quick account switching, but no App Store or voice recognition. Is the wall-mounted version worth it? Should you buy the first generation?

Meta Muse Wonder Launch: What It Means for Meta's Return to the Frontier AI Race
Meta releases Muse Wonder and WonderFull, benchmarks reach the frontier, community feedback is polarized. An in-depth look at Meta's return to the frontier AI race, its personal agent strategy, and Zuckerberg's different path.

Apple Home Smart Home Lineup Leaked: LG and Schneider Team Up, UWB Door Lock on Board
Apple Home ecosystem gains new LG and Schneider devices: UWB smart lock with proximity unlock, 2.5K dual-camera doorbell, privacy indoor camera, and AirPods-like seamless pairing.