Interactive IFC-based 3D building viewer with metadata inspection
Find a file
warnason 4951671f63 Add database auto-creation and fix IFC parser flush logic
- Create tables on application startup via lifespan event
- Flush project before creating elements (generate project_id)
- Flush each element before creating properties (generate element_id)
- Add IfcWallStandardCase to parsed element types
- Include FZK-Haus sample IFC file for testing
- Tested: 58 elements, 3601 properties parsed successfully
2026-04-20 18:52:27 +02:00
.forgejo/workflows Initial project scaffold: FastAPI backend + Vue.js frontend 2026-04-20 18:01:12 +02:00
backend Add database auto-creation and fix IFC parser flush logic 2026-04-20 18:52:27 +02:00
data/sample Add database auto-creation and fix IFC parser flush logic 2026-04-20 18:52:27 +02:00
frontend Allow bim.stifting.at as Vite dev server host 2026-04-20 19:49:18 +02:00
.env.example Initial project scaffold: FastAPI backend + Vue.js frontend 2026-04-20 18:01:12 +02:00
.gitignore Initial project scaffold: FastAPI backend + Vue.js frontend 2026-04-20 18:01:12 +02:00
docker-compose.yml Initial project scaffold: FastAPI backend + Vue.js frontend 2026-04-20 18:01:12 +02:00
README.md Initial project scaffold: FastAPI backend + Vue.js frontend 2026-04-20 18:01:12 +02:00

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

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