# upc-hub/hpc-resource-planner architecture

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

- Interactive diagram: https://gitdiagram.com/upc-hub/hpc-resource-planner
- Repository: https://github.com/upc-hub/hpc-resource-planner

## Overview

HPC Resource Planner is a browser-based planner for comparing HPCI and mdx computing resources. Users review centers, adjust resource limits and requests, search for capacity, and inspect estimated costs and institutional comparisons; an optional AI consultant estimates project needs for a selected center. The sampled source shows the React entry point, planner components, shared resource data, and Gemini estimation service. Some App.tsx excerpts omit the handlers and rendering details, so the graph limits those relationships to component references visible in the source index.

Main entry points: [`App.tsx`](https://github.com/upc-hub/hpc-resource-planner/blob/main/App.tsx) (Planner dashboard), [`types.ts`](https://github.com/upc-hub/hpc-resource-planner/blob/main/types.ts) (Resource data models), [`components/CenterCard.tsx`](https://github.com/upc-hub/hpc-resource-planner/blob/main/components/CenterCard.tsx) (Center planner), [`components/CostChart.tsx`](https://github.com/upc-hub/hpc-resource-planner/blob/main/components/CostChart.tsx) (Cost chart)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Planner interface"]
  node_mount["React mount<br/>[main.tsx]"]
  node_planner["Planner dashboard<br/>[App.tsx]"]
end

subgraph group_planning["Resource planning"]
  node_center["Center planner<br/>[CenterCard.tsx]"]
  node_costs["Cost chart<br/>[CostChart.tsx]"]
  node_comparison["Resource comparison"]
  node_settings["Limit settings<br/>[SettingsModal.tsx]"]
end

subgraph group_guidance["Guidance and estimates"]
  node_guide["Infrastructure guide<br/>[InfoModal.tsx]"]
  node_consultant["AI consultant"]
  node_estimator["Gemini estimator<br/>[geminiService.ts]"]
end

subgraph group_foundation["Planner data and types"]
  node_catalog["Center resource catalog<br/>[constants.ts]"]
  node_models["Resource data models<br/>[types.ts]"]
end

node_researcher(("Researcher"))
node_gemini["Google Gemini API"]

node_researcher -.->|"opens planner"| node_mount
node_mount -->|"renders"| node_planner
node_planner -->|"renders"| node_center
node_planner -->|"renders"| node_costs
node_planner -->|"renders"| node_comparison
node_planner -->|"uses"| node_settings
node_planner -->|"uses"| node_guide
node_planner -->|"uses"| node_consultant
node_consultant -->|"requests estimate"| node_estimator
node_estimator -->|"requests generation"| node_gemini
node_planner -->|"imports data"| node_catalog
node_center -->|"reads limits"| node_catalog
node_costs -->|"reads centers"| node_catalog
node_consultant -->|"uses types"| node_models
node_estimator -->|"uses types"| node_models
node_center -->|"uses types"| node_models
node_comparison -->|"uses types"| node_models
node_settings -->|"uses types"| node_models
node_costs -->|"uses types"| node_models

click node_mount "https://github.com/upc-hub/hpc-resource-planner/blob/main/src/main.tsx"
click node_planner "https://github.com/upc-hub/hpc-resource-planner/blob/main/App.tsx"
click node_center "https://github.com/upc-hub/hpc-resource-planner/blob/main/components/CenterCard.tsx"
click node_costs "https://github.com/upc-hub/hpc-resource-planner/blob/main/components/CostChart.tsx"
click node_comparison "https://github.com/upc-hub/hpc-resource-planner/blob/main/components/ResourceComparison.tsx"
click node_settings "https://github.com/upc-hub/hpc-resource-planner/blob/main/components/SettingsModal.tsx"
click node_guide "https://github.com/upc-hub/hpc-resource-planner/blob/main/components/InfoModal.tsx"
click node_consultant "https://github.com/upc-hub/hpc-resource-planner/blob/main/components/AiConsultantModal.tsx"
click node_estimator "https://github.com/upc-hub/hpc-resource-planner/blob/main/services/geminiService.ts"
click node_catalog "https://github.com/upc-hub/hpc-resource-planner/blob/main/constants.ts"
click node_models "https://github.com/upc-hub/hpc-resource-planner/blob/main/types.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_mount,node_planner toneBlue
class node_center,node_costs,node_comparison,node_settings toneAmber
class node_guide,node_consultant,node_estimator,node_gemini toneMint
class node_catalog,node_models toneRose
class node_researcher toneIndigo
```

## Components

### Planner interface

- [React mount](https://github.com/upc-hub/hpc-resource-planner/blob/main/src/main.tsx): `src/main.tsx`
- [Planner dashboard](https://github.com/upc-hub/hpc-resource-planner/blob/main/App.tsx): `App.tsx`

### Resource planning

- [Center planner](https://github.com/upc-hub/hpc-resource-planner/blob/main/components/CenterCard.tsx): `components/CenterCard.tsx`
- [Cost chart](https://github.com/upc-hub/hpc-resource-planner/blob/main/components/CostChart.tsx): `components/CostChart.tsx`
- [Resource comparison](https://github.com/upc-hub/hpc-resource-planner/blob/main/components/ResourceComparison.tsx): `components/ResourceComparison.tsx`
- [Limit settings](https://github.com/upc-hub/hpc-resource-planner/blob/main/components/SettingsModal.tsx): `components/SettingsModal.tsx`

### Guidance and estimates

- [Infrastructure guide](https://github.com/upc-hub/hpc-resource-planner/blob/main/components/InfoModal.tsx): `components/InfoModal.tsx`
- [AI consultant](https://github.com/upc-hub/hpc-resource-planner/blob/main/components/AiConsultantModal.tsx): `components/AiConsultantModal.tsx`
- [Gemini estimator](https://github.com/upc-hub/hpc-resource-planner/blob/main/services/geminiService.ts): `services/geminiService.ts`

### Planner data and types

- [Center resource catalog](https://github.com/upc-hub/hpc-resource-planner/blob/main/constants.ts): `constants.ts`
- [Resource data models](https://github.com/upc-hub/hpc-resource-planner/blob/main/types.ts): `types.ts`

### Other components

- **Researcher**
- **Google Gemini API**

## Connections

- Researcher → React mount: opens planner
- React mount → Planner dashboard: renders (evidence: `src/main.tsx`)
- Planner dashboard → Center planner: renders (evidence: `App.tsx`)
- Planner dashboard → Cost chart: renders (evidence: `App.tsx`)
- Planner dashboard → Resource comparison: renders (evidence: `App.tsx`)
- Planner dashboard → Limit settings: uses (evidence: `App.tsx`)
- Planner dashboard → Infrastructure guide: uses (evidence: `App.tsx`)
- Planner dashboard → AI consultant: uses (evidence: `App.tsx`)
- AI consultant → Gemini estimator: requests estimate (evidence: `components/AiConsultantModal.tsx`)
- Gemini estimator → Google Gemini API: requests generation (evidence: `services/geminiService.ts`)
- Planner dashboard → Center resource catalog: imports data (evidence: `App.tsx`)
- Center planner → Center resource catalog: reads limits (evidence: `components/CenterCard.tsx`)
- Cost chart → Center resource catalog: reads centers (evidence: `components/CostChart.tsx`)
- AI consultant → Resource data models: uses types (evidence: `components/AiConsultantModal.tsx`)
- Gemini estimator → Resource data models: uses types (evidence: `services/geminiService.ts`)
- Center planner → Resource data models: uses types (evidence: `components/CenterCard.tsx`)
- Resource comparison → Resource data models: uses types (evidence: `components/ResourceComparison.tsx`)
- Limit settings → Resource data models: uses types (evidence: `components/SettingsModal.tsx`)
- Cost chart → Resource data models: uses types (evidence: `components/CostChart.tsx`)
