Expand description
IFC-Lite Server - High-performance IFC processing server.
This server provides a REST API for parsing IFC files and extracting geometry. It supports:
- Full synchronous parsing with caching
- Streaming Server-Sent Events for progressive rendering
- Quick metadata extraction without geometry processing
Β§Endpoints
GET /api/v1/health- Health checkPOST /api/v1/parse- Full parse with all geometry (JSON)POST /api/v1/parse/stream- Streaming parse (SSE)POST /api/v1/parse/metadata- Quick metadata onlyPOST /api/v1/parse/parquet- Full parse with Parquet-encoded geometry (~15x smaller)POST /api/v1/parse/parquet/optimized- ara3d BOS-optimized format (~50x smaller)GET /api/v1/parse/symbolic/:cache_key- 2D symbol stream (IfcAnnotation + IfcGrid) as JSONGET /api/v1/cache/:key- Retrieve cached resultDELETE /api/v1/cache/:key- Invalidate every cache entry for the source file acache_keynames
ModulesΒ§
- admission π
- Request admission control: bounded parse concurrency + a byte-weighted memory budget + a coarse RSS circuit breaker.
- config π
- Server configuration loaded from environment variables.
- error π
- Error types and handling for the server.
- in_
flight π - In-memory marker for βa data-model write is running right now for this cache keyβ (issue #5129).
- mem_
policy π - Memory-budget policy: the readers and the resolver that decide the admission byte budget at startup.
- middleware π
- Middleware modules.
- panic_
strategy π - Self-check for the panic strategy this binary was actually built with.
- routes π
- API routes for the IFC server.
- services π
- Service modules for IFC processing and caching.
- types π
- Type definitions for API requests and responses.
- write_
timeout π - Connection-level write-idle enforcement.
StructsΒ§
- AppState
- Application state shared across handlers.
EnumsΒ§
- LogDecision π
- Startup log level for the memory-admission βgate offβ branch in
main, derived purely from the re-parsedIFC_MEM_BUDGET_MBenv var (#1547).
ConstantsΒ§
- BODY_
LIMIT_ πSLACK_ MB - Slack added on top of
max_file_size_mbfor the raw framework-level body limit β covers multipart boundary/header overhead so the appβs ownFileTooLargecheck (clean 413) is what rejects an oversized file, not axumβs raw limit (generic 400MultipartError).
StaticsΒ§
- GLOBAL π
FunctionsΒ§
- build_
cors_ πlayer - Build CORS layer based on configuration.
- build_
router π - Build the application router with all routes and middleware.
- main π
- memory_
admission_ πlog_ level - Pure decision for
LogDecisionfrom the resolvedIFC_MEM_BUDGET_MBenv var:None(unset/unparseable),Some(0)(explicit opt-out), orSome(n)withn > 0(an explicit positive budget).