How buildingsmart/validate works
Project type and purpose
• This is a full-stack, containerized validation service for IFC files.
• It provides a React-based frontend UI, a Django REST API + Admin backend, an asynchronous Celery worker, a PostgreSQL database, a Redis broker, plus monitoring (Prometheus, OpenTelemetry, Grafana).
• It uses two Git submodules—“ifc-gherkin-rules” and “ifc-validation-data-model”—for validation rules and shared data models.
Main components
• Frontend
– React app served over Nginx (supports Let’s Encrypt).
– E2E test harness (Playwright) for UI/API.
• Backend (Django)
– Django Admin UI, REST API (Swagger/Redoc), URL routing, serializers, views.
– Management commands, email templates, authentication.
• Asynchronous Worker
– Celery tasks for syntax, schema, Gherkin, bSDD, signature checks.
– Task runner, processing modules, logger, email notifications.
• Data Store & Broker
– PostgreSQL (persistent storage of requests, results, user data).
– Redis (Celery broker + cache).
• External rule modules (Git submodules)
– IFC Gherkin rules (pytest-driven rule engine).
– Shared Django data model.
• Infrastructure & Monitoring
– Docker Compose orchestrates services.
– Prometheus + OpenTelemetry Collector + Grafana dashboards for metrics.
– Dockerfiles for frontend/backend, Nginx, Grafana provisioning, OTEL, Prometheus.
Relationships & data flows
• User → Frontend (browser) → Nginx → React UI
• React UI → HTTP(S) → Django REST API
• API → enqueue validation request → Redis
• Celery Worker → dequeue → execute checks using submodules → write results to PostgreSQL → trigger email tasks
• Django API → poll/read results from PostgreSQL → serve to UI
• Monitoring agents (OTEL) in each container → send metrics to OTEL Collector → Prometheus → Grafana
Architectural patterns & principles
• Separation of concerns: UI vs API vs background processing
• Microservice-style isolation in containers
• Event-driven architecture via message broker (Celery + Redis)
• Reusable submodules for rules and shared data model
• Infrastructure as code: Docker Compose, Makefiles, GitHub Actions pipelines
Key technologies & frameworks
• Frontend: React, Playwright for E2E, Nginx
• Backend: Python, Django, Django REST Framework, Celery, pytest, pytest-Django
• Data stores: PostgreSQL, Redis
• Monitoring: OpenTelemetry, Prometheus, Grafana
• CI/CD: GitHub Actions, Make, Docker Compose
Essential elements
• Clear, consistent labels on each container/service.
• Optional: side-panel listing GitHub Actions workflows and submodule relationships.