AI-Powered Building Energy Management System
Transform building energy consumption with machine learning. Achieve 15-35% energy savings, reduce CO2 emissions by up to 25%, and reach ROI in 6-18 months.
Get Started | Documentation | API Reference
Energy Optimizer Pro is a full-stack platform for monitoring, analyzing, and optimizing building energy consumption using advanced ML algorithms. It supports multi-building portfolios, real-time monitoring, predictive analytics, and automated optimization recommendations.
- Real-time monitoring with WebSocket-based live dashboards
- ML-powered optimization using XGBoost, LightGBM, and Random Forest
- Predictive analytics for energy usage forecasting and anomaly detection
- Executive reporting with PDF exports, cost tracking, and sustainability metrics
- Role-based access control with JWT authentication and audit logging
- Progressive Web App with mobile support and offline capability
graph TB
subgraph Frontend
A[Next.js 14] --> B[React Components]
B --> C[Tailwind CSS]
A --> D[PWA]
end
subgraph API
E[FastAPI] --> F[JWT Auth]
E --> G[WebSocket]
E --> H[REST Endpoints]
end
subgraph ML
I[XGBoost] --> J[Predictions]
I --> K[Optimization]
I --> L[Anomaly Detection]
end
subgraph Data
M[PostgreSQL] --> N[Time Series]
O[Redis] --> P[Cache / Sessions]
end
subgraph Monitoring
R[Prometheus] --> S[Grafana]
R --> T[Alertmanager]
end
A --> E
E --> I
E --> M
E --> O
I --> M
E --> R
git clone https://github.com/vinsblack/energy-optimizer-pro.git
cd energy-optimizer-pro
./start.sh install
./start.sh startThe application will be available at http://localhost:3000.
| Role | Password | |
|---|---|---|
| Admin | admin@energy-optimizer.com | admin123 |
| Analyst | analyst@energy-optimizer.com | analyst123 |
| Manager | manager@energy-optimizer.com | manager123 |
sudo apt update && sudo apt install -y \
git curl wget \
python3.11 python3.11-venv python3-pip \
nodejs npm \
docker.io docker-compose \
postgresql-client redis-toolsdocker-compose up -d postgres redis
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
alembic upgrade headcd frontend
npm install
npm run build
npm startcd backend
source venv/bin/activate
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd backend
python scripts/seed_data.py --buildings 5 --days 30Frontend: Next.js 14, Tailwind CSS, Recharts, Zustand, Framer Motion, PWA
Backend: FastAPI, PostgreSQL 15, Redis, Celery, Scikit-learn, XGBoost, LightGBM
Infrastructure: Docker, Nginx, Prometheus, Grafana, Alertmanager, GitHub Actions, Let's Encrypt
| Component | Minimum | Recommended |
|---|---|---|
| OS | Linux, macOS, Windows 10+ (WSL2) | Ubuntu 22.04 LTS / macOS 13+ |
| RAM | 8 GB | 16 GB+ |
| Storage | 20 GB | SSD, 100 GB+ |
| Docker | 20.0+ | Latest, 8 GB+ allocation |
| Python | 3.11+ | 3.11+ |
| Node.js | 18.0+ | 18.0+ |
import requests
auth = requests.post('http://localhost:8000/auth/login', json={
'email': 'admin@energy-optimizer.com',
'password': 'admin123'
})
token = auth.json()['access_token']
response = requests.post(
'http://localhost:8000/api/optimize',
headers={'Authorization': f'Bearer {token}'},
json={
'building_id': 'your-building-id',
'algorithm': 'xgboost',
'optimization_target': 'cost_reduction'
}
)
print(f"Job started: {response.json()['job_id']}")cd backend
python scripts/generate_report.py \
--building-id "your-building-id" \
--start-date "2024-07-01" \
--end-date "2024-07-31" \
--format pdf \
--output "reports/july-energy-report.pdf"./start.sh install # Full installation
./start.sh start # Start all services
./start.sh stop # Stop all services
./start.sh restart # Restart services
./start.sh status # Service status
./start.sh logs [service] # View logs
./start.sh test # Run test suite
./start.sh benchmark # Performance benchmarks
./start.sh database backup # Database backup
./start.sh database restore # Database restore./start.sh monitoring start| Service | URL | Credentials |
|---|---|---|
| Grafana | http://localhost:3001 | admin / admin123 |
| Prometheus | http://localhost:9090 | — |
| Alertmanager | http://localhost:9093 | — |
| Jaeger | http://localhost:16686 | — |
| Metric | Target | Measured |
|---|---|---|
| API Response Time | < 200 ms | 156 ms |
| Dashboard Load | < 800 ms | 687 ms |
| ML Prediction | < 100 ms | 73 ms |
| Uptime | 99.9% | 99.97% |
./start.sh test # All tests
cd frontend && npm test # Frontend unit tests
cd frontend && npm run test:e2e # E2E tests
cd backend && pytest tests/ -v # Backend unit tests
cd backend && pytest --cov=app # Coverage report
./start.sh benchmark # Performance benchmarks- Multi-factor authentication (TOTP, SMS)
- AES-256 encryption for sensitive data
- Role-based access control with granular permissions
- Comprehensive audit logging
- Automated vulnerability scanning
- Native mobile applications (iOS, Android)
- Multi-tenant SaaS architecture
- Expanded IoT sensor support
- LLM-powered natural language queries
- Carbon trading integration
- Multi-language support (Italian, Spanish, German, French)
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -m 'Add feature' - Push:
git push origin feature/your-feature - Open a Pull Request
- Email: vincenzo.gallo77@hotmail.com
- Issues: GitHub Issues
- Discussions: GitHub Discussions
MIT License — see LICENSE for details.
Built with Next.js, FastAPI, PostgreSQL, Redis, XGBoost, LightGBM, Docker, Prometheus, and Grafana.
This is a portfolio/demo project. Performance metrics are based on industry benchmarks and illustrative scenarios.