Skip to content

Commit 733f7b2

Browse files
author
Libish Murugesan
committed
Document codebase overview
1 parent 16c0f50 commit 733f7b2

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,37 @@ $env:Path = "$nodeDir;$env:Path"
2727
Open:
2828
- Frontend: `http://localhost:5173`
2929
- Backend: `http://localhost:8000`
30+
31+
## Codebase overview
32+
33+
### Backend (FastAPI + TopologicPy)
34+
- API server lives in `topologicpy-web-backend/app/main.py` and exposes endpoints for health, IFC upload, graph construction, egress pathing, fire simulation (SSE + precompute), and RL training.
35+
- Core geometry types (Vertex/Edge/Face/Shell/Cluster/Graph/Wire) come from TopologicPy and are used to build navigation graphs and straightened paths.
36+
37+
### IFC processing & egress graph
38+
- `topologicpy-web-backend/app/main.py` ingests IFC-derived floor/stair point clouds and builds a navigation graph with hybrid adjacency (short edges for stairs, longer for floors).
39+
- It computes path endpoints by snapping to nearest graph nodes, then returns path + metadata for frontend overlay.
40+
41+
### Fire simulation & RL
42+
- Fire sim endpoints (`/fire-sim`, `/fire-sim/stream`) emit time-steps or temperature steps for overlay; RL endpoint (`/rl/train`) uses graph data to learn paths.
43+
- These are designed to feed overlays in the viewer, not to replace shortest-path routing.
44+
45+
### Frontend (React app)
46+
- Main UI and state live in `topologicpy-web-frontend/src/App.jsx`; this coordinates file loading, viewer mode switching, slider inputs, and egress/fire controls.
47+
- It sends IFC egress data to backend, receives graph/path, and pushes overlays into the viewer.
48+
49+
### IFC viewer (Fragments)
50+
- `topologicpy-web-frontend/src/IFCViewer.jsx` loads IFC with @thatopen components, handles selection/picking, and renders overlays (graph wires, paths, fire/temperature).
51+
- Includes coordinate transforms (up-axis + flips) so overlays align with IFC geometry.
52+
53+
### Topology JSON viewer
54+
- `topologicpy-web-frontend/src/TopologyViewer.jsx` renders TopologicPy JSON (non-IFC) with its own camera controls and selection logic.
55+
56+
### UI & styling
57+
- Global styles in `topologicpy-web-frontend/src/styles.css` and `topologicpy-web-frontend/src/index.css`.
58+
- Sidebar controls in `topologicpy-web-frontend/src/Sidebar.jsx`.
59+
60+
### Build & deploy
61+
- Frontend Vite setup in `topologicpy-web-frontend/`.
62+
- Backend uses Python venv + Uvicorn.
63+
- GitHub Pages deploy workflow in `.github/workflows/deploy-frontend.yml`.

0 commit comments

Comments
 (0)