The application consists of three main submodules, each hosted in separate GitHub repositories. Docker Compose is configured to automatically bind the correct submodule versions for local deployment.
Documentation of the seperate functionalities can be found within each submodule.
-
File Parser: A module within IfcOpenShell, dedicated to parsing files. https://github.com/IfcOpenShell/step-file-parser
-
Gherkin Rules: Contains the rules for validation. It can be run independently by cloning the repository and executing: https://github.com/buildingSMART/ifc-gherkin-rules
pytest -sv
Debugging individual rules is supported with commands like:
python test/test_main.py alb001 # For a single rule python test/test_main.py alb001 alb002 # For multiple rules python test/test_main.py path_to_separate_file.py # For a separate file
-
Shared DataModel: This module includes Django data models shared between the main repository and the Gherkin repository, serving as a submodule for both. https://github.com/buildingSMART/ifc-validation-data-model
The application supports multiple validation checks on one or multiple IFC files that can be run separately:
- Syntax Check
- Schema Check
- Gherkin-Rules Check
- bSDD Check (disabled)
Depending on your workflow, you can run all or some services via Docker Compose.
Below are a few common options to run and debug these services locally. More scenario's exist - have a look at the various make files.
- Clone this repo in a local folder
mkdir bsi-validate
cd bsi-validate
git clone https://github.com/buildingSMART/validate .
- Make sure Docker is running.
docker info
- Start all services.
make start
or
docker compose up
- This pulls Docker-hub images, builds and spins up five different services:
db - PostgreSQL database
redis - Redis instance
backend - Django Admin + API's
worker - Celery worker
frontend - React UI
- One-time only: create Django superuser accounts for Django Admin and Celery background worker(s), for example:
docker exec -it backend sh
cd backend
DJANGO_SUPERUSER_USERNAME=root DJANGO_SUPERUSER_PASSWORD=root DJANGO_SUPERUSER_EMAIL=root@localhost python3 manage.py createsuperuser --noinput
DJANGO_SUPERUSER_USERNAME=SYSTEM DJANGO_SUPERUSER_PASSWORD=system DJANGO_SUPERUSER_EMAIL=system@localhost python3 manage.py createsuperuser --noinput
exit
- Navigate to different services:
- Validation Service - React UI: http://localhost
- Django Admin UI: http://localhost/admin - default user/password per step 5.
- Django API - Swagger: http://localhost/api/swagger-ui
- Django API - Redoc: http://localhost/api/redoc
- Optionally, use a tool like curl or Postman to invoke API requests directly
- Clone this repo in a local folder
mkdir bsi-validate
cd bsi-validate
git clone https://github.com/buildingSMART/validate .
- Make sure Docker is running.
docker info
- Start infrastructure services only (Redis, Postgres, Celery Flower)
make start-infra
or
docker compose -f docker-compose.infra_only.yml up
- This pulls different Docker-hub images and spins up three services:
db - PostgreSQL database
redis - Redis instance
flower - Celery flower dashboard
- Start Django backend (Admin + API)
cd backend
make install
make start-django
- Start Celery worker(s)
cd backend
make start-worker
- Start Node Development server to serve the React UI
cd frontend
npm install
npm run start
- One-time only: create Django superuser accounts for Django Admin and Celery background worker(s), for example:
cd backend
. .dev/venv/bin/activate
DJANGO_SUPERUSER_USERNAME=root DJANGO_SUPERUSER_PASSWORD=root DJANGO_SUPERUSER_EMAIL=root@localhost python3 manage.py createsuperuser --noinput
DJANGO_SUPERUSER_USERNAME=SYSTEM DJANGO_SUPERUSER_PASSWORD=system DJANGO_SUPERUSER_EMAIL=system@localhost python3 manage.py createsuperuser --noinput
- Navigate to different services:
- Validation Service - React UI: http://localhost:3000
- Django Admin UI: http://localhost:8000/admin - default user/password per step 8
- Django API - Swagger: http://localhost:8000/api/swagger-ui
- Django API - Redoc: http://localhost:8000/api/redoc
- Celery Flower UI: http://localhost:5555
- Optionally, use a tool like curl or Postman to invoke API requests directly