- FastAPI with async SQLAlchemy models for IFC elements - IFC file upload and parsing via IfcOpenShell - REST API for projects, elements, and properties - Vue.js 3 frontend shell with Three.js dependency - Docker Compose for full-stack local development - PostgreSQL 16 as database - CI pipeline for Forgejo Actions - Project documentation and API overview
25 lines
635 B
Python
25 lines
635 B
Python
"""BIM Twin Viewer — FastAPI application entry point."""
|
|
|
|
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
from app.api import health, elements, upload
|
|
|
|
app = FastAPI(
|
|
title="BIM Twin Viewer API",
|
|
description="REST API for IFC-based 3D building model inspection",
|
|
version="0.1.0",
|
|
)
|
|
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=["*"], # tighten in production
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
app.include_router(health.router)
|
|
app.include_router(upload.router, prefix="/api")
|
|
app.include_router(elements.router, prefix="/api")
|
|
|