How a-shojaei/constructai-oss works
ConstructAI is a full-lifecycle construction management platform: operators use a dashboard to manage projects and work, while domain services provide estimating, scheduling, safety, quality, and financial controls. Its API also supports document ingestion, AI-assisted answers, and multi-agent workflows; edge devices process camera feeds and publish detection events. The README documents the main product layers and capabilities. Several backend subsystems are represented from the file tree and README rather than inspected source, so those links are documented at a high level rather than traced through individual routes.
Main entry points: projects.py REST and WebSocket API · pipeline.py Document ingestion · retrieval.py Retrieval and generation · main.py API runtime
Components 22
Operator client
- Web dashboard
apps/web/src/app/(dashboard)/projects/page.tsx
API and tenancy
- REST and WebSocket API
apps/api/app/api/v1/projects.py - API runtime
apps/api/app/main.py - Tenant context
apps/api/app/middleware/tenant_context.py - PostgreSQL data
apps/api/app/database.py
Construction operations
- Document management
apps/api/app/services/document_service.py - Document ingestion
apps/api/app/services/ingestion/pipeline.py - Project operations
apps/api/app/services/project.py - Estimating and bids
apps/api/app/services/estimating/bid_decision_engine.py - Schedule analysis
apps/api/app/services/scheduling/cpm_engine.py - Cost and cash controls
apps/api/app/services/controls/evm_engine.py - Field safety and quality
apps/api/app/services/safety/predictive_risk.py
AI and intelligence
- Agent orchestration
apps/api/app/services/orchestration/orchestrator_agent.py - AI output validation
apps/api/app/services/guardrails/pipeline.py - Retrieval and generation
apps/api/app/services/rag/retrieval.py - LLM gateway
apps/api/app/services/reliability/llm_gateway.py - Cross-project analytics
apps/api/app/services/memory/cross_project_analytics.py
Edge vision
- Edge camera pipeline
edge/src/edge_pipeline.py - MQTT publisher
edge/src/mqtt_client.py - Offline event buffer
edge/src/offline_buffer.py
Other components
- Construction operator
- MQTT broker
Connections 23
- Construction operator → Web dashboard: uses
README.md - Web dashboard → REST and WebSocket API: requests data
README.md - API runtime → REST and WebSocket API: serves routes
README.md - API runtime → Tenant context: enforces tenancy
- REST and WebSocket API → Project operations: routes operations
- Project operations → PostgreSQL data: persists project data
- REST and WebSocket API → Document management: routes document work
- Document management → Document ingestion: processes uploads
- Document ingestion → PostgreSQL data: stores chunks
apps/api/app/services/ingestion/pipeline.py - Document ingestion → Retrieval and generation: generates embeddings
- REST and WebSocket API → Estimating and bids: supports bid decisions
- REST and WebSocket API → Schedule analysis: supports schedules
- REST and WebSocket API → Cost and cash controls: supports cost controls
- REST and WebSocket API → Field safety and quality: supports field safety
- REST and WebSocket API → Agent orchestration: invokes AI workflows
- Agent orchestration → AI output validation: validates output
- AI output validation → LLM gateway: uses confidence scoring
- REST and WebSocket API → Retrieval and generation: answers questions
- Cross-project analytics → Retrieval and generation: embeds RFI subjects
- Cross-project analytics → LLM gateway: uses model gateway
apps/api/app/services/memory/cross_project_analytics.py - Edge camera pipeline → MQTT publisher: publishes detections
edge/src/edge_pipeline.py - Edge camera pipeline → Offline event buffer: buffers offline events
edge/src/edge_pipeline.py - MQTT publisher → MQTT broker: publishes events
edge/src/mqtt_client.py