No description
- Show all items even when value is 0 (DSRA, EPC overheads, etc.) - Always show Solar Module, Solar BoS, Solar Land Cost - Wind items only show if windEnabled - BESS items only show if bessEnabled |
||
|---|---|---|
| .claude | ||
| .github/workflows | ||
| packages | ||
| sprints | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| CLAUDE.md | ||
| CODEBASE_INVESTIGATION.md | ||
| docker-compose.yml | ||
| Makefile | ||
| PROJECT.md | ||
| RE_Financial_Modeling_Platform PRD.md | ||
| README.md | ||
REmodel
Python calculation engine + FastAPI backend + Next.js frontend for Indian renewable energy (Solar + Wind + BESS) project finance modeling.
Replaces an Excel-macro workflow for bid preparation at hybrid RTC RE projects. Computes optimal flat tariff and full 25-year project financials in <30 seconds per scenario.
Prerequisites
| Tool | Version | Install |
|---|---|---|
| Python | ≥ 3.12 | python.org |
| Poetry | ≥ 2.0 | curl -sSL https://install.python-poetry.org | python3 - |
| Node.js | ≥ 20 | nodejs.org |
| pnpm | ≥ 10 | npm install -g pnpm |
| Docker | any | docker.com |
Quick start
git clone <repo-url> remodel
cd remodel
# 1. Start Redis (required for API + worker)
docker compose up -d redis
# 2. Install all deps
make setup
# 3. Start all services
make dev
After make dev:
| Service | URL |
|---|---|
| Web UI | http://localhost:3000 |
| API | http://localhost:8000 |
| API docs | http://localhost:8000/docs |
| Redis | localhost:6379 |
Package layout
packages/
├── engine/ pip-installable Python calculation library (UI-agnostic)
├── api/ FastAPI + Arq async worker
└── web/ Next.js App Router frontend
Common commands
make setup # one-time: install all deps (Poetry + pnpm)
make dev # start Redis, API server, Arq worker, web dev server
make test # pytest (engine + api) + jest (web, if any)
make lint # ruff + mypy + tsc + eslint
make build # production build of web
make clean # remove build artefacts, __pycache__, .next, etc.
Individual package commands
# Engine
cd packages/engine && poetry run pytest
cd packages/engine && poetry run mypy src/
# API
cd packages/api && poetry run uvicorn remodel_api.main:app --reload --port 8000
cd packages/api && poetry run arq remodel_api.workers.main.WorkerSettings
cd packages/api && poetry run pytest
# Web
cd packages/web && pnpm dev
cd packages/web && pnpm type-check
cd packages/web && pnpm generate-types # needs API on :8000
Pre-commit hooks
pip install pre-commit
pre-commit install
Architecture overview
┌─────────────────────────────────────────────────────┐
│ packages/web (Next.js App Router + shadcn/ui) │
└────────────────────────┬────────────────────────────┘
│ REST + SSE
┌────────────────────────▼────────────────────────────┐
│ packages/api (FastAPI + Arq + SQLite) │
└────────────────────────┬────────────────────────────┘
│ Python import
┌────────────────────────▼────────────────────────────┐
│ packages/engine (Pydantic + NumPy + SciPy) │
└─────────────────────────────────────────────────────┘
See PROJECT.md for full domain context and architectural decisions.