How vaishak08-nayak/rainsmart works
RainSmart’s main workflow is location selection, live and historical rainfall retrieval, catchment and tank calculations, then dashboard guidance and AI advice. The browser application also supports authentication and administration through the Node backend and persistent user/settings/audit storage. The README documents the meteorological, hydrological, and advisor capabilities; the sampled excerpts show selected implementation paths, so unsampled feature links are omitted where their callers are not evidenced.
Main entry points: script.js Dashboard logic · server.js HTTP API and AI proxy · index.html Main dashboard · auth.html Sign-in and registration
Components 20
RainSmart browser
- Main dashboard
index.html - Dashboard logic
script.js - API endpoint config
api-config.js - Sign-in and registration
auth.html - User dashboard
user-dashboard.html - Admin dashboard
admin-dashboard.html - Welcome page
welcome.html
Hydrology services
- Location geocoding
script.js - Live weather forecast
script.js - Historical rainfall
script.js - Catchment and tank model
script.js - Rule-based water advisor
script.js
Backend services
- HTTP API and AI proxy
server.js
Persistent data
- User and settings store
db.js
Other components
- RainSmart user
- Open-Meteo geocoding
- Open-Meteo forecast
- Open-Meteo archive
- Google Gemini
- OpenAI fallback
Connections 19
- RainSmart user → Main dashboard: opens
README.md - Main dashboard → Dashboard logic: runs
README.md - Dashboard logic → Location geocoding: searches locations
README.md - Location geocoding → Open-Meteo geocoding: queries
README.md - Dashboard logic → Live weather forecast: fetches forecast
README.md - Live weather forecast → Open-Meteo forecast: queries
README.md - Dashboard logic → Historical rainfall: fetches history
script.js - Historical rainfall → Open-Meteo archive: queries
README.md - Dashboard logic → Catchment and tank model: recalculates
README.md - Dashboard logic → Rule-based water advisor: fallback advice
script.js - Dashboard logic → API endpoint config: resolves endpoints
api-config.js - Dashboard logic → HTTP API and AI proxy: requests chat
script.js - HTTP API and AI proxy → Google Gemini: queries models
server.js - HTTP API and AI proxy → OpenAI fallback: fallback query
server.js - Sign-in and registration → HTTP API and AI proxy: uses auth API
README.md - User dashboard → HTTP API and AI proxy: uses user API
- Admin dashboard → HTTP API and AI proxy: uses admin API
server.js - Welcome page → Main dashboard: continues to
- HTTP API and AI proxy → User and settings store: reads and writes
server.js