# aakashkavediya/visionaries_orchathon architecture

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

- Interactive diagram: https://gitdiagram.com/aakashkavediya/visionaries_orchathon
- Repository: https://github.com/aakashkavediya/visionaries_orchathon

## Overview

Visionaries Orchathon is a BIM analytics and clash-resolution project: it aims to turn model inputs into extracted MEP data, detected clashes and actionable resolution recommendations. The clearest implemented request workflow is the Flask prototype: upload RVT, convert it to IFC, then request MEP extraction or clash results. Separate scripts cover data enrichment and a more standards-aware rule engine. The README also describes reporting and a Next.js interface, though the sampled Next.js page is still a starter screen. Some documented stages lack sampled call wiring, so those links are documented rather than inferred from module names.

Main entry points: [`prototype/app.py`](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/app.py) (Flask API), [`stage2/stage2.py`](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/stage2/stage2.py) (Stage 2 analysis), [`stages/stage4.py`](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/stages/stage4.py) (Rule validation), [`process_bim_data.py`](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/process_bim_data.py) (IFC enrichment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Ingestion and extraction"]
  node_converter["RVT converter<br/>[converter.py]"]
  node_ifc_store[("Converted IFC<br/>[app.py]")]
  node_mep_extract["MEP extraction<br/>[mep_extractor.py]"]
  node_ifc_enrichment["IFC enrichment"]
end

subgraph group_analysis["Clash and resolution"]
  node_clash_detect["AABB detection<br/>[clash_detector.py]"]
  node_stage2_extract["Stage 2 analysis<br/>[stage2.py]"]
  node_rule_engine["Rule validation<br/>[stage4.py]"]
  node_resolution_prototype["Resolution engine<br/>[decision.py]"]
end

subgraph group_delivery["API and interface"]
  node_flask["Flask API<br/>[app.py]"]
  node_prototype_ui["Prototype UI<br/>[main.js]"]
  node_next_ui["Next.js starter<br/>[page.js]"]
  node_static_prototype["Static prototype<br/>[index.html]"]
end

subgraph group_support["Data and reporting"]
  node_xml_merge["XML processing<br/>[stage2_xml.py]"]
  node_artifacts["JSON and CSV outputs"]
  node_reports["Reports<br/>[report.html]"]
end

node_engineer(("BIM engineer"))
node_rvt_upload["RVT upload"]

node_engineer -->|"uploads"| node_rvt_upload
node_rvt_upload -->|"submits to"| node_flask
node_flask -->|"calls"| node_converter
node_converter -->|"writes IFC"| node_ifc_store
node_flask -->|"loads IFC"| node_ifc_store
node_flask -->|"extracts via"| node_mep_extract
node_flask -->|"detects via"| node_clash_detect
node_prototype_ui -->|"requests API"| node_flask
node_engineer -.->|"provides model"| node_ifc_enrichment
node_ifc_enrichment -.->|"feeds analysis"| node_stage2_extract
node_stage2_extract -.->|"supports scoring"| node_rule_engine
node_xml_merge -.->|"merges data"| node_ifc_enrichment
node_rule_engine -.->|"produces outputs"| node_artifacts
node_stage2_extract -.->|"writes artifacts"| node_artifacts
node_artifacts -.->|"feeds reporting"| node_reports
node_engineer -.->|"views results"| node_next_ui
node_engineer -.->|"uses preview"| node_static_prototype
node_rule_engine -.->|"complements strategy"| node_resolution_prototype

click node_flask "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/app.py"
click node_converter "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/converter.py"
click node_ifc_store "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/app.py"
click node_mep_extract "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/mep_extractor.py"
click node_clash_detect "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/clash_detector.py"
click node_prototype_ui "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/static/js/main.js"
click node_next_ui "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/bim_fixer/app/page.js"
click node_ifc_enrichment "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/process_bim_data.py"
click node_stage2_extract "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/stage2/stage2.py"
click node_xml_merge "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/stages/stage2_xml.py"
click node_rule_engine "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/stages/stage4.py"
click node_resolution_prototype "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/extra/decision.py"
click node_artifacts "https://github.com/aakashkavediya/visionaries_orchathon/tree/main/stage2"
click node_reports "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/stages/report.html"
click node_static_prototype "https://github.com/aakashkavediya/visionaries_orchathon/blob/main/extra/index.html"

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_converter,node_ifc_store,node_mep_extract,node_ifc_enrichment toneBlue
class node_clash_detect,node_stage2_extract,node_rule_engine,node_resolution_prototype toneAmber
class node_flask,node_prototype_ui,node_next_ui,node_static_prototype toneMint
class node_xml_merge,node_artifacts,node_reports toneRose
class node_engineer,node_rvt_upload toneIndigo
```

## Components

### Ingestion and extraction

- [RVT converter](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/converter.py): `prototype/converter.py`
- [Converted IFC](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/app.py): `prototype/app.py`
- [MEP extraction](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/mep_extractor.py): `prototype/mep_extractor.py`
- [IFC enrichment](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/process_bim_data.py): `process_bim_data.py`

### Clash and resolution

- [AABB detection](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/clash_detector.py): `prototype/clash_detector.py`
- [Stage 2 analysis](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/stage2/stage2.py): `stage2/stage2.py`
- [Rule validation](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/stages/stage4.py): `stages/stage4.py`
- [Resolution engine](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/extra/decision.py): `extra/decision.py`

### API and interface

- [Flask API](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/app.py): `prototype/app.py`
- [Prototype UI](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/prototype/static/js/main.js): `prototype/static/js/main.js`
- [Next.js starter](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/bim_fixer/app/page.js): `bim_fixer/app/page.js`
- [Static prototype](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/extra/index.html): `extra/index.html`

### Data and reporting

- [XML processing](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/stages/stage2_xml.py): `stages/stage2_xml.py`
- [JSON and CSV outputs](https://github.com/aakashkavediya/visionaries_orchathon/tree/main/stage2): `stage2`
- [Reports](https://github.com/aakashkavediya/visionaries_orchathon/blob/main/stages/report.html): `stages/report.html`

### Other components

- **BIM engineer**
- **RVT upload**

## Connections

- BIM engineer → RVT upload: uploads (evidence: `README.md`)
- RVT upload → Flask API: submits to (evidence: `prototype/app.py`)
- Flask API → RVT converter: calls (evidence: `prototype/app.py`)
- RVT converter → Converted IFC: writes IFC (evidence: `prototype/app.py`)
- Flask API → Converted IFC: loads IFC (evidence: `prototype/app.py`)
- Flask API → MEP extraction: extracts via (evidence: `prototype/app.py`)
- Flask API → AABB detection: detects via (evidence: `prototype/app.py`)
- Prototype UI → Flask API: requests API (evidence: `prototype/static/js/main.js`)
- BIM engineer → IFC enrichment: provides model (evidence: `README.md`)
- IFC enrichment → Stage 2 analysis: feeds analysis (evidence: `README.md`)
- Stage 2 analysis → Rule validation: supports scoring (evidence: `README.md`)
- XML processing → IFC enrichment: merges data (evidence: `README.md`)
- Rule validation → JSON and CSV outputs: produces outputs (evidence: `README.md`)
- Stage 2 analysis → JSON and CSV outputs: writes artifacts (evidence: `README.md`)
- JSON and CSV outputs → Reports: feeds reporting (evidence: `README.md`)
- BIM engineer → Next.js starter: views results (evidence: `README.md`)
- BIM engineer → Static prototype: uses preview (evidence: `README.md`)
- Rule validation → Resolution engine: complements strategy
