This project is a Next.js-based marketing website for Solaira, integrated with a Python FastAPI backend for solar energy forecasting and simulation.
- Frontend: Next.js application for the user interface, featuring dashboards and marketing pages.
- Backend: Python FastAPI services handling data processing, energy simulation, and solar forecasting (using Quartz Solar Forecast).
- Node.js: >= 18.x
- Python: >= 3.10
- Git: For version control and dependency management.
git clone <repository-url>
cd peschallengeweb2Install the Node.js dependencies:
npm installImportant: Python 3.10 is required.
Create a virtual environment (optional but recommended):
py -3.10 -m venv venv
# Windows
.\venv\Scripts\activate
# Linux/Mac
source venv/bin/activateInstall the Python dependencies:
pip install -r backend/requirements.txtTo start the backend services (Main API and Solar Forecast API), run:
py -3.10 backend/start.pyThe services will start on:
- Main Backend: http://localhost:8001
- Solar Forecast API: http://localhost:8002
We have a helper script to start all backend services (Main API and Solar Forecast API) simultaneously.
Important: Ensure you are using Python 3.10+.
Windows:
py -3.10 backend/start.py
# OR if you have a venv activated:
python backend/start.pyLinux/Mac:
python3 backend/start.pyThis will start:
- Main Backend: http://localhost:8001
- Solar Forecast API: http://localhost:8002
In a new terminal window:
npm run devThe application will be available at http://localhost:3000.
peschallengeweb2/
├── backend/ # Python Backend
│ ├── main.py # Main API Entry Point
│ ├── start.py # Script to run all backend services
│ ├── core/ # Core logic (Phases 1, 2, 3)
│ ├── models/ # ML Models & Quartz Solar Forecast
│ └── requirements.txt # Python Dependencies
├── components/ # React Components
├── pages/ # Next.js Pages
├── public/ # Static Assets
└── ...
- Solar Forecasting: Integrated Quartz Solar Forecast for accurate PV generation predictions.
- Energy Simulation: Simulates battery usage and energy flow.
- Interactive Dashboard: Visualizes energy data and forecasts.