How pbtamarona/openpytea works
OpenPyTEA is a Python techno-economic assessment toolkit with an optional desktop GUI backed by a local API. The principal workflow is to configure equipment and plant assumptions, calculate plant economics, then inspect results or run sensitivity and Monte Carlo analyses; projects can also hold and compare multiple plants. The graph preserves the documented JSON workflow and plotting capability as well. Backend routing and several frontend pages are represented at their source paths, but their internal implementations were not all sampled, so uncertain links are omitted.
Main entry points: App.tsx Desktop application · main.py HTTP API · client.ts API client · io.py JSON workflow
Components 26
Desktop interface
- Desktop application
frontend/src/App.tsx - Equipment costing
frontend/src/pages/EquipmentPage.tsx - Plant configuration
frontend/src/pages/PlantConfigPage.tsx - Economic results
frontend/src/pages/ResultsPage.tsx - Sensitivity analysis
frontend/src/pages/AnalysisPage.tsx - Monte Carlo
frontend/src/pages/MonteCarloPage.tsx - Plant comparison
frontend/src/pages/ComparePage.tsx - API client
frontend/src/api/client.ts
Application backend
- HTTP API
backend/app/main.py - Plant endpoints
backend/app/routers/plant.py - Equipment endpoints
backend/app/routers/equipment.py - Analysis endpoints
backend/app/routers/analysis.py - Plot endpoints
backend/app/routers/plots.py - JSON endpoints
backend/app/routers/io.py - Project endpoints
backend/app/routers/project.py - Session state
backend/app/state.py - Plant factory
backend/app/plant_factory.py - API schemas
backend/app/schemas.py
TEA model
- Equipment costing
src/openpytea/equipment.py - Plant economics
src/openpytea/plant.py - Model helpers
src/openpytea/helpers.py
Analysis and plots
- Sensitivity and uncertainty
src/openpytea/analysis.py - Visualization
src/openpytea/plotting.py
Project data
- Project store
backend/app/project_store.py - JSON workflow
src/openpytea/io.py
Other components
- TEA user
Connections 40
- TEA user → Desktop application: uses
- Desktop application → Equipment costing: shows
frontend/src/App.tsx - Desktop application → Plant configuration: shows
frontend/src/App.tsx - Desktop application → Economic results: shows
frontend/src/App.tsx - Desktop application → Sensitivity analysis: shows
frontend/src/App.tsx - Desktop application → Monte Carlo: shows
frontend/src/App.tsx - Desktop application → Plant comparison: shows
frontend/src/App.tsx - Equipment costing → API client: requests
frontend/src/pages/EquipmentPage.tsx - Plant configuration → API client: requests
frontend/src/App.tsx - Economic results → API client: requests
frontend/src/pages/ResultsPage.tsx - Sensitivity analysis → API client: requests
frontend/src/pages/AnalysisPage.tsx - Monte Carlo → API client: requests
frontend/src/pages/MonteCarloPage.tsx - API client → HTTP API: HTTP requests
- HTTP API → Plant endpoints: routes to
backend/app/main.py - HTTP API → Equipment endpoints: routes to
backend/app/main.py - HTTP API → Analysis endpoints: routes to
backend/app/main.py - HTTP API → Plot endpoints: routes to
backend/app/main.py - HTTP API → JSON endpoints: routes to
backend/app/main.py - HTTP API → Project endpoints: routes to
backend/app/main.py - Equipment endpoints → Plant factory: builds via
backend/app/routers/equipment.py - Plant endpoints → Plant factory: builds via
backend/app/routers/plant.py - Analysis endpoints → Sensitivity and uncertainty: runs
backend/app/routers/analysis.py - Plot endpoints → Visualization: renders with
backend/app/routers/plots.py - Plot endpoints → Sensitivity and uncertainty: uses results from
backend/app/routers/plots.py - JSON endpoints → JSON workflow: uses
backend/app/routers/io.py - Project endpoints → Project store: manages
- Plant endpoints → Project store: manages
backend/app/routers/plant.py - Project store → Session state: parks and restores
backend/app/project_store.py - Plant endpoints → Session state: reads and updates
backend/app/routers/plant.py - Plant factory → Equipment costing: creates
backend/app/plant_factory.py - Plant factory → Plant economics: creates
backend/app/plant_factory.py - Plant economics → Equipment costing: aggregates
src/openpytea/plant.py - Sensitivity and uncertainty → Plant economics: analyzes
src/openpytea/analysis.py - Sensitivity and uncertainty → Model helpers: uses
src/openpytea/analysis.py - Plant economics → Model helpers: uses
src/openpytea/plant.py - JSON workflow → Equipment costing: loads
src/openpytea/io.py - JSON workflow → Plant economics: runs TEA for
src/openpytea/io.py - JSON workflow → Sensitivity and uncertainty: runs analysis
src/openpytea/io.py - JSON workflow → Visualization: exports plots with
src/openpytea/io.py - Visualization → Model helpers: uses
src/openpytea/plotting.py