No description
Find a file
Manohar Gupta 4450eeb24f
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run
Fix: Remove duplicate financing cost in Project Cost Breakdown table
The financing cost (IDC + upfront fees) was being displayed both as a separate
line item AND included in the total calculation, causing the Total Project Cost
to be inflated by the financing amount. This fix removes the separate financing
row from the breakdown table while keeping the correct total calculation.
2026-05-28 15:17:27 +05:30
.claude [S1-T12/T13] P&L revenue breakdown + collapsible rows + UI polish 2026-05-13 10:42:36 +05:30
.github/workflows [S0-T11/T12/T13] GitHub Actions CI, pre-commit hooks, final README; mark Sprint 0 complete 2026-05-07 02:28:51 +05:30
packages Fix: Remove duplicate financing cost in Project Cost Breakdown table 2026-05-28 15:17:27 +05:30
sprints [S1-T12/T13] P&L revenue breakdown + collapsible rows + UI polish 2026-05-13 10:42:36 +05:30
.gitignore [S0-T01] Initialize monorepo with packages/engine, packages/api, packages/web directories 2026-05-07 02:04:47 +05:30
.pre-commit-config.yaml [S0-T11/T12/T13] GitHub Actions CI, pre-commit hooks, final README; mark Sprint 0 complete 2026-05-07 02:28:51 +05:30
CLAUDE.md Update CLAUDE.md with Dokploy deployment docs and fixes 2026-05-15 09:45:37 +05:30
CODEBASE_INVESTIGATION.md [S1-T12/T13] P&L revenue breakdown + collapsible rows + UI polish 2026-05-13 10:42:36 +05:30
docker-compose.yml fix: NEXT_PUBLIC_API_URL must be origin only — /api already in app routes 2026-05-16 04:24:42 +00:00
Makefile [S0-T01] Initialize monorepo with packages/engine, packages/api, packages/web directories 2026-05-07 02:04:47 +05:30
PROJECT.md Project spec 2026-05-07 02:03:45 +05:30
RE_Financial_Modeling_Platform PRD.md Project spec 2026-05-07 02:03:45 +05:30
README.md [S0-T11/T12/T13] GitHub Actions CI, pre-commit hooks, final README; mark Sprint 0 complete 2026-05-07 02:28:51 +05:30

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.