# rohit5552/ipp architecture

> Architecture diagram of the GitHub repository rohit5552/ipp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rohit5552/ipp
- Repository: https://github.com/rohit5552/ipp

## Overview

NewRa is a GES-account workspace for assessing and comparing independent power producers (IPPs). Staff manage GES requirements and producer records, capture questionnaire evidence, and use the comparator to review scores and matching; procurement workflows extend into tariff negotiation, dealbooks, documents, and related decisions. The frontend calls a NestJS API, which applies domain evaluation and persists results in PostgreSQL. Several feature paths are documented by the module registry and README, but their internal call chains were not sampled, so those links are omitted or marked unverified.

Main entry points: [`apps/backend/src/platform/energy.service.ts`](https://github.com/rohit5552/ipp/blob/main/apps/backend/src/platform/energy.service.ts) (Energy workflows), [`apps/frontend/src/services/api.ts`](https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/services/api.ts) (API client), [`apps/backend/src/platform/platform.controller.ts`](https://github.com/rohit5552/ipp/blob/main/apps/backend/src/platform/platform.controller.ts) (Platform routes), [`apps/frontend/src/app`](https://github.com/rohit5552/ipp/tree/main/apps/frontend/src/app) (Workspace screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace UI"]
  node_web["Workspace screens"]
  node_authui["Session and scope<br/>[AuthProvider.tsx]"]
  node_gesui["GES management<br/>[page.tsx]"]
  node_ippui["IPP register<br/>[page.tsx]"]
  node_questionnaireui["Questionnaire UI<br/>[page.tsx]"]
  node_compareui["Comparison UI<br/>[page.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["API and access"]
  node_auth["Identity and access<br/>[auth.service.ts]"]
  node_platform["Platform routes"]
  node_energy["Energy workflows<br/>[energy.service.ts]"]
  node_questionnaires["Questionnaire service"]
  node_postgres[("PostgreSQL store<br/>[prisma.service.ts]")]
end

subgraph group_assessment["Assessment domain"]
  node_domain["Scoring and matching"]
  node_rebuild["Result rebuilding<br/>[rebuild.ts]"]
end

subgraph group_procurement["Procurement lifecycle"]
  node_procurement["Procurement workflows"]
  node_tariff["Tariff analysis<br/>[tariff.ts]"]
  node_modules["Feature modules"]
end

node_staff(("Staff user"))
node_gesuser(("GES user"))

node_staff -->|"uses"| node_web
node_gesuser -->|"uses"| node_web
node_web -->|"requests"| node_api_client
node_api_client -.->|"calls API"| node_platform
node_web -->|"uses session"| node_authui
node_gesui -->|"loads accounts"| node_api_client
node_ippui -->|"loads producers"| node_api_client
node_questionnaireui -->|"loads and saves"| node_api_client
node_compareui -->|"requests comparison"| node_api_client
node_platform -->|"routes workflows"| node_energy
node_platform -->|"routes profile"| node_procurement
node_platform -->|"routes questionnaire"| node_questionnaires
node_auth -->|"reads and writes"| node_postgres
node_questionnaires -->|"reads and writes"| node_postgres
node_energy -.->|"persists records"| node_postgres
node_energy -->|"rebuilds results"| node_rebuild
node_energy -->|"uses domain logic"| node_domain
node_energy -->|"uses ratings"| node_questionnaires
node_energy -->|"uses tariff logic"| node_tariff
node_platform -->|"registers features"| node_modules
node_modules -.->|"includes workflows"| node_procurement

click node_web "https://github.com/rohit5552/ipp/tree/main/apps/frontend/src/app"
click node_authui "https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/features/auth/AuthProvider.tsx"
click node_gesui "https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/app/ges/page.tsx"
click node_ippui "https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/app/ipps/page.tsx"
click node_questionnaireui "https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/app/questionnaire/page.tsx"
click node_compareui "https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/app/ges/%5BgesId%5D/comparison/page.tsx"
click node_api_client "https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/services/api.ts"
click node_auth "https://github.com/rohit5552/ipp/blob/main/apps/backend/src/auth/auth.service.ts"
click node_platform "https://github.com/rohit5552/ipp/blob/main/apps/backend/src/platform/platform.controller.ts"
click node_energy "https://github.com/rohit5552/ipp/blob/main/apps/backend/src/platform/energy.service.ts"
click node_questionnaires "https://github.com/rohit5552/ipp/blob/main/apps/backend/src/platform/questionnaire.service.ts"
click node_domain "https://github.com/rohit5552/ipp/tree/main/apps/backend/src/domain"
click node_rebuild "https://github.com/rohit5552/ipp/blob/main/apps/backend/src/persistence/rebuild.ts"
click node_procurement "https://github.com/rohit5552/ipp/blob/main/apps/backend/src/platform/procurement.service.ts"
click node_tariff "https://github.com/rohit5552/ipp/blob/main/apps/backend/src/domain/tariff.ts"
click node_modules "https://github.com/rohit5552/ipp/tree/main/apps/backend/src/modules"
click node_postgres "https://github.com/rohit5552/ipp/blob/main/apps/backend/src/prisma/prisma.service.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_authui,node_gesui,node_ippui,node_questionnaireui,node_compareui,node_api_client,node_staff,node_gesuser toneBlue
class node_auth,node_platform,node_energy,node_questionnaires,node_postgres toneAmber
class node_domain,node_rebuild toneMint
class node_procurement,node_tariff,node_modules toneRose
```

## Components

### Workspace UI

- [Workspace screens](https://github.com/rohit5552/ipp/tree/main/apps/frontend/src/app): `apps/frontend/src/app`
- [Session and scope](https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/features/auth/AuthProvider.tsx): `apps/frontend/src/features/auth/AuthProvider.tsx`
- [GES management](https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/app/ges/page.tsx): `apps/frontend/src/app/ges/page.tsx`
- [IPP register](https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/app/ipps/page.tsx): `apps/frontend/src/app/ipps/page.tsx`
- [Questionnaire UI](https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/app/questionnaire/page.tsx): `apps/frontend/src/app/questionnaire/page.tsx`
- [Comparison UI](https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/app/ges/%5BgesId%5D/comparison/page.tsx): `apps/frontend/src/app/ges/[gesId]/comparison/page.tsx`
- [API client](https://github.com/rohit5552/ipp/blob/main/apps/frontend/src/services/api.ts): `apps/frontend/src/services/api.ts`

### API and access

- [Identity and access](https://github.com/rohit5552/ipp/blob/main/apps/backend/src/auth/auth.service.ts): `apps/backend/src/auth/auth.service.ts`
- [Platform routes](https://github.com/rohit5552/ipp/blob/main/apps/backend/src/platform/platform.controller.ts): `apps/backend/src/platform/platform.controller.ts`
- [Energy workflows](https://github.com/rohit5552/ipp/blob/main/apps/backend/src/platform/energy.service.ts): `apps/backend/src/platform/energy.service.ts`
- [Questionnaire service](https://github.com/rohit5552/ipp/blob/main/apps/backend/src/platform/questionnaire.service.ts): `apps/backend/src/platform/questionnaire.service.ts`
- [PostgreSQL store](https://github.com/rohit5552/ipp/blob/main/apps/backend/src/prisma/prisma.service.ts): `apps/backend/src/prisma/prisma.service.ts`

### Assessment domain

- [Scoring and matching](https://github.com/rohit5552/ipp/tree/main/apps/backend/src/domain): `apps/backend/src/domain`
- [Result rebuilding](https://github.com/rohit5552/ipp/blob/main/apps/backend/src/persistence/rebuild.ts): `apps/backend/src/persistence/rebuild.ts`

### Procurement lifecycle

- [Procurement workflows](https://github.com/rohit5552/ipp/blob/main/apps/backend/src/platform/procurement.service.ts): `apps/backend/src/platform/procurement.service.ts`
- [Tariff analysis](https://github.com/rohit5552/ipp/blob/main/apps/backend/src/domain/tariff.ts): `apps/backend/src/domain/tariff.ts`
- [Feature modules](https://github.com/rohit5552/ipp/tree/main/apps/backend/src/modules): `apps/backend/src/modules`

### Other components

- **Staff user**
- **GES user**

## Connections

- Staff user → Workspace screens: uses (evidence: `README.md`)
- GES user → Workspace screens: uses (evidence: `README.md`)
- Workspace screens → API client: requests (evidence: `apps/frontend/src/app/ges/[gesId]/comparison/page.tsx`)
- API client → Platform routes: calls API
- Workspace screens → Session and scope: uses session (evidence: `apps/frontend/src/app/ges/[gesId]/comparison/page.tsx`)
- GES management → API client: loads accounts (evidence: `apps/frontend/src/app/ges/page.tsx`)
- IPP register → API client: loads producers (evidence: `apps/frontend/src/app/ipps/page.tsx`)
- Questionnaire UI → API client: loads and saves (evidence: `apps/frontend/src/app/questionnaire/page.tsx`)
- Comparison UI → API client: requests comparison (evidence: `apps/frontend/src/app/ges/[gesId]/comparison/page.tsx`)
- Platform routes → Energy workflows: routes workflows (evidence: `apps/backend/src/platform/platform.controller.ts`)
- Platform routes → Procurement workflows: routes profile (evidence: `apps/backend/src/platform/platform.controller.ts`)
- Platform routes → Questionnaire service: routes questionnaire (evidence: `apps/backend/src/platform/platform.controller.ts`)
- Identity and access → PostgreSQL store: reads and writes (evidence: `apps/backend/src/auth/auth.service.ts`)
- Questionnaire service → PostgreSQL store: reads and writes (evidence: `apps/backend/src/platform/questionnaire.service.ts`)
- Energy workflows → PostgreSQL store: persists records (evidence: `apps/backend/src/platform/energy.service.ts`)
- Energy workflows → Result rebuilding: rebuilds results (evidence: `apps/backend/src/platform/energy.service.ts`)
- Energy workflows → Scoring and matching: uses domain logic (evidence: `apps/backend/src/platform/energy.service.ts`)
- Energy workflows → Questionnaire service: uses ratings (evidence: `apps/backend/src/platform/energy.service.ts`)
- Energy workflows → Tariff analysis: uses tariff logic (evidence: `apps/backend/src/platform/energy.service.ts`)
- Platform routes → Feature modules: registers features
- Feature modules → Procurement workflows: includes workflows
