How vineeth4005/solarshare works
SolarShare is a shared-solar forecasting, allocation, and time-of-use billing platform for industrial estates, with a FastAPI backend and a React dashboard. Its intended user workflow runs from load and weather data through profiles, solar and tenant forecasts, allocation, battery status, and billing/analytics; the repository also includes authentication and estate configuration. The README describes Phase 1 as foundational and says several domain functions are not implemented, while the tree and sampled sources show additional ingestion, profiling, API, and UI modules. Uninspected modules are included only as documented or indexed subsystems; their internal behavior is not inferred.
Main entry points: main.py FastAPI application · App.tsx Web application · client.ts API client · session.py Database sessions
Components 30
Dashboard UI
- Web application
src/App.tsx - API client
src/api/client.ts - API types
src/types/api.ts - Overview dashboard
src/pages/OverviewPage.tsx - Tenant dashboard
src/pages/TenantDashboardPage.tsx - Load profiles UI
src/pages/LoadProfilesPage.tsx - Forecasting UI
src/pages/ForecastingPage.tsx - Energy and billing UI
src/pages - Loading and error views
src/components/ui/StateViews.tsx
Backend API
- FastAPI application
app/main.py - Authentication routes
app/api/routes_auth.py - Data routes
app/api/routes_data.py - Profile routes
app/api/routes_load_profiles.py - Solar routes
app/api/routes_solar.py - Energy domain routes
app/api
Data and energy
- Electricity ingestion
app/services/electricity_ingestion.py - TSF parser
app/integrations/tsf_parser.py - Load profiling
app/services/load_profiling.py - NASA weather ingestion
app/services/nasa_power_ingestion.py - NASA POWER integration
app/integrations/nasa_power.py - Forecasting services
app/services/tenant_forecasting.py - Solar services
app/services/solar_forecasting.py
Platform foundation
- Public load records
app/models/public_load.py - Weather records
app/models/weather.py - Profile records
app/models/load_profile.py - Database sessions
app/db/session.py - Runtime configuration
app/core/config.py - Auth dependencies
app/api/deps.py - JWT and password security
app/core/security.py
Other components
- Estate operator
Connections 38
- Estate operator → Web application: uses
src/App.tsx - Web application → Overview dashboard: routes to
src/App.tsx - Web application → Tenant dashboard: routes to
src/App.tsx - Web application → Load profiles UI: routes to
src/App.tsx - Web application → Forecasting UI: routes to
src/App.tsx - Web application → Energy and billing UI: routes to
src/App.tsx - Overview dashboard → API client: requests data
src/pages/OverviewPage.tsx - Tenant dashboard → API client: requests data
src/pages/TenantDashboardPage.tsx - Load profiles UI → API client: requests data
src/pages/LoadProfilesPage.tsx - Forecasting UI → API client: requests data
src/pages/ForecastingPage.tsx - Forecasting UI → Loading and error views: renders
src/pages/ForecastingPage.tsx - Load profiles UI → Loading and error views: renders
src/pages/LoadProfilesPage.tsx - API client → API types: uses types
src/api/client.ts - API client → FastAPI application: calls API
src/api/client.ts - FastAPI application → Authentication routes: registers
app/main.py - FastAPI application → Data routes: registers
app/main.py - FastAPI application → Profile routes: registers
app/main.py - FastAPI application → Solar routes: registers
app/main.py - FastAPI application → Energy domain routes: registers
app/main.py - Authentication routes → Auth dependencies: uses
app/api/routes_auth.py - Auth dependencies → JWT and password security: validates tokens
app/api/deps.py - Data routes → NASA weather ingestion: invokes
app/api/routes_data.py - NASA weather ingestion → NASA POWER integration: fetches data
app/services/nasa_power_ingestion.py - NASA weather ingestion → Weather records: persists
app/services/nasa_power_ingestion.py - Profile routes → Public load records: reads
app/api/routes_load_profiles.py - Profile routes → Profile records: reads
app/api/routes_load_profiles.py - Electricity ingestion → TSF parser: parses with
app/services/electricity_ingestion.py - Electricity ingestion → Public load records: persists
app/services/electricity_ingestion.py - Load profiling → Public load records: reads observations
README.md - Load profiling → Profile records: writes profiles
README.md - NASA weather ingestion → Runtime configuration: uses settings
app/services/nasa_power_ingestion.py - Database sessions → Runtime configuration: configures engine
app/db/session.py - FastAPI application → Database sessions: initializes schema
app/main.py - Data routes → Database sessions: gets session
app/api/routes_data.py - Profile routes → Database sessions: gets session
app/api/routes_load_profiles.py - Solar routes → Database sessions: gets session
app/api/routes_solar.py - Solar routes → Solar services: may expose
- Energy domain routes → Forecasting services: may expose