Interactive IFC-based 3D building viewer with metadata inspection
|
Some checks failed
CI / backend-lint-and-test (push) Has been cancelled
- Remove IfcWallStandardCase from parser (covered by IfcWall as parent type) - Add seen_global_ids set to prevent duplicate element insertion - Use scalars().first() instead of scalar_one_or_none() for resilient lookup - Re-parse required: clears and rebuilds element data without duplicates |
||
|---|---|---|
| .forgejo/workflows | ||
| backend | ||
| data/sample | ||
| frontend | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.yml | ||
| README.md | ||
BIM Twin Viewer
Interactive IFC-based 3D building model viewer. Upload an IFC file to inspect building elements, their properties, and navigate the model in a browser-based 3D view.
Tech stack
- Backend: Python 3.12, FastAPI, SQLAlchemy (async), IfcOpenShell
- Frontend: Vue.js 3, Three.js
- Database: PostgreSQL 16
- Infrastructure: Docker Compose, Caddy, Forgejo CI
Quick start
cp .env.example .env
# Edit .env and set DB_PASSWORD
docker compose up -d
- API: http://localhost:8000
- API docs: http://localhost:8000/docs
- Frontend: http://localhost:5173
Project structure
.
├── backend/
│ ├── app/
│ │ ├── api/ # FastAPI route handlers
│ │ ├── models/ # SQLAlchemy ORM models
│ │ ├── schemas/ # Pydantic request/response schemas
│ │ └── services/ # Business logic (IFC parsing)
│ ├── tests/
│ ├── Dockerfile
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── components/ # Vue components (viewer, panels)
│ │ ├── views/ # Page-level views
│ │ └── composables/ # Reusable composition functions
│ ├── Dockerfile
│ └── package.json
├── data/
│ └── sample/ # Example IFC files for testing
├── docs/
├── docker-compose.yml
└── README.md
API overview
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| POST | /api/upload |
Upload and parse IFC file |
| GET | /api/projects |
List all projects |
| GET | /api/projects/{id}/elements |
List elements (filterable) |
| GET | /api/elements/{id} |
Element detail + properties |
Running tests
# Backend
docker compose exec backend pytest -v
# Or locally
cd backend
python -m pytest -v
License
MIT