A web app for solar energy yield estimation. Create a project for a specific location, configure one or more scenarios with different configurations, and generate an energy production report ready to share.
- A user signs up and creates a project for a specified location
- They add one or more scenarios to the project, each with a different module type, quantity, tilt, and azimuth
- The app fetches irradiance data from PVGIS and calculates the estimated annual and monthly energy yield
- A report is generated with the results, ready to share
This is a monorepo with two independently deployed pieces:
| Directory | What | Docs |
|---|---|---|
backend/ |
FastAPI REST API - auth, data model, calculations | backend/README.md |
frontend/ |
React + Vite web client | frontend/README.md |
- Backend: FastAPI, PostgreSQL, SQLModel, Alembic, JWT
- Frontend: React, Vite, Tailwind CSS, shadcn/ui
- External data: PVGIS API (solar irradiance, European Commission)
Run both pieces locally. See each README for full details.
# 1. backend
python -m venv venv
venv\Scripts\activate # Windows
pip install -r backend/requirements.txt
cp backend/.env.example backend/.env # edit with your DB credentials and secret key
alembic -c backend/alembic.ini upgrade head
python -m backend.utils.seed_modules # required - scenarios need modules to reference
python -m uvicorn backend.app:app --reload
# -> http://localhost:8000 (docs at /docs)
# 2. frontend (separate terminal tab)
cd frontend
npm install
npm run dev
# -> http://localhost:5173, proxies /api to the backend aboveFor database setup details, see backend/DATABASE_SETUP.md.