Skip to content

sagm07/SolarOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

β˜€οΈ SolarOS β€” Sustainability-Aware Decision Engine for Solar Farms

Intelligent, data-driven cleaning recommendations for solar panel operations using NASA satellite data and multi-objective optimization.

Next.js FastAPI TypeScript Python


πŸš€ Live Demo


πŸš€ Live Demo


🌍 Overview

SolarOS is a full-stack SaaS application that helps solar farm operators optimize cleaning schedules by balancing:

  • Energy Output Recovery β€” Maximize kWh generation
  • Carbon Footprint β€” Minimize environmental impact
  • Water Conservation β€” Reduce water usage through intelligent forecasting
  • Economic Efficiency β€” Optimize cleaning ROI

Built for hackathons, research demonstrations, and production deployment on Vercel (frontend) + Render (backend).


✨ Features

🎯 Core Intelligence

  • Digital Twin Modeling β€” Physics-based degradation simulation
  • NASA POWER API Integration β€” Real-time satellite environmental data
  • Multi-Objective Optimization β€” Balance profit, carbon, and water usage
  • Autonomous Recommendations β€” Data-driven cleaning date suggestions

πŸš€ Dashboard Features

  • Rain Intelligence β€” Defer cleaning when rain is forecast to save water
  • Multi-Farm Portfolio Optimizer β€” Optimize resource allocation across multiple sites
  • Live Analysis β€” Interactive parameter tuning with instant feedback
  • Production-Ready Analytics β€” Professional charts and metrics visualization

πŸ› οΈ Tech Stack

Frontend

  • Next.js 14 (App Router)
  • TypeScript β€” Type-safe development
  • Tailwind CSS β€” Utility-first styling
  • Framer Motion β€” Smooth, performant animations
  • Recharts β€” Data visualization

Backend

  • FastAPI β€” High-performance Python API
  • NumPy & Pandas β€” Scientific computing
  • NASA POWER API β€” Satellite weather data
  • Uvicorn β€” ASGI server

πŸš€ Local Setup

Prerequisites

  • Node.js 18+
  • Python 3.10+
  • Git

Frontend Setup

cd web
npm install
npm run dev

Frontend runs at: http://localhost:3000

Backend Setup

# From project root
pip install -r backend/requirements.txt
uvicorn backend.main:app --reload

Backend runs at: http://localhost:8000

API Documentation: http://localhost:8000/docs


πŸ“¦ Environment Variables

Frontend (.env.local)

NEXT_PUBLIC_API_BASE_URL=http://localhost:8000

For production on Vercel:

NEXT_PUBLIC_API_BASE_URL=https://your-backend-url.onrender.com

🌐 Deployment

Deploy Backend (Render)

  1. Create new Web Service on Render
  2. Connect GitHub repository
  3. Start Command:
    uvicorn backend.main:app --host 0.0.0.0 --port $PORT
  4. Deploy and copy the URL

Deploy Frontend (Vercel)

  1. Import repository to Vercel
  2. Set Root Directory: web
  3. Environment Variable:
    NEXT_PUBLIC_API_BASE_URL=https://your-backend-url.onrender.com
    
  4. Deploy

πŸ“Š API Endpoints

Endpoint Method Description
/health GET Health check
/analyze GET Solar cleaning analysis
/rain-forecast GET Rain intelligence
/optimize-farms POST Multi-farm optimization

Full API docs: http://localhost:8000/docs


🎨 Features Showcase

Intelligent Cleaning Recommendations

  • Analyzes 30 days of solar farm data
  • Recommends optimal cleaning date
  • Calculates energy gain, carbon savings, and ROI

Rain Intelligence

  • Checks 7-day weather forecast
  • Defers cleaning if rain expected
  • Estimates natural dust reduction and water savings

Multi-Farm Portfolio Optimization

  • Optimize resource allocation across multiple farms
  • Balance profit, carbon offset, or water scarcity constraints
  • Smart selection based on cleaning ROI

πŸ“ Project Structure

SolarOS/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ main.py              # FastAPI application
β”‚   └── requirements.txt     # Python dependencies
β”œβ”€β”€ ml/
β”‚   β”œβ”€β”€ data_loader.py       # NASA API integration
β”‚   β”œβ”€β”€ scenario_analysis.py # Core optimization logic
β”‚   └── ...                  # ML models
β”œβ”€β”€ web/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/             # Next.js pages
β”‚   β”‚   └── components/      # React components
β”‚   β”œβ”€β”€ public/              # Static assets
β”‚   └── package.json         # Node dependencies
β”œβ”€β”€ .gitignore
└── README.md

πŸ§ͺ Testing

Frontend Build

cd web
npm run build

Backend Health Check

curl http://localhost:8000/health

πŸ”’ Security

  • βœ… No API keys committed
  • βœ… Environment variables excluded via .gitignore
  • βœ… CORS configured for production
  • βœ… Input validation with FastAPI Pydantic models

πŸ“ License

This project is open source and available under the MIT License.


πŸ‘₯ Contributing

Contributions, issues, and feature requests are welcome!


πŸ™ Acknowledgments

  • NASA POWER API for environmental data
  • Vercel for frontend hosting
  • Render for backend deployment

πŸ“¬ Contact

Project Link: https://github.com/yourusername/SolarOS


Built with ❀️ for sustainable energy infrastructure

About

SolarOS is an intelligent optimization system that dynamically determines the most economically and environmentally optimal time to clean solar panels. By modeling energy degradation, recoverable value, electricity pricing, and cleaning costs,

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors