How sidhanth-s/elec-predict works
Project type and purpose
• This is a full-stack web application (“Forecastly”) for time-series forecasting of electricity demand and price.
• It consists of:
• A React/TailwindCSS frontend (TypeScript/JavaScript)
• A Flask/Python backend exposing JSON REST endpoints
• Pre-trained Prophet ML models + scalers
• Static dataset files for retraining
File structure
• Top level:
• app.py, train.py, model_*.pkl, scaler.pkl → Flask server + training scripts + serialized ML artifacts
• public/, index.html → static HTML entrypoint
• src/ → React application (pages, components, hooks, UI library wrappers, chart components)
• requirements.txt → Python deps for backend
• package.json, vite.config.ts, tsconfig.json → Frontend deps & build config
• Patterns:
• Single-page React app built with Vite
• Flask monolith exposing /forecast endpoint
• Chart.js embedded in React components
• Utility layers (src/lib, src/utils)
README for additional insights
• Sequence:
1. User picks date range in UI
2. Frontend calls Flask API
3. Flask loads Prophet models
4. Forecasts returned as JSON
5. Frontend renders tables & charts
• Tech stack clearly enumerated