← All projects

Smart BPMN

AI-supported business-process modelling

Case study verified in parts
Role
Team lead and backend/collaboration developer
Team context
University group project — five-person team — Team Leader
Year
2024–25
Stack
PythonDjangoDjango REST FrameworkDjango ChannelsReactMaterial UIRedisDocker
Routed metal rails and nodes representing a BPMN process machine with real-time state indicators

Exhibit views

Overview

Modelling business processes in BPMN is usually manual and error-prone. Smart BPMN assists by generating process diagrams from text descriptions or images, detecting modelling problems, and proposing optimizations. Several people can edit the same diagram simultaneously: changes propagate in real time over WebSockets, with Redis as the channel layer. I led the five-person team and implemented central parts of the backend and the collaboration functionality.

What it does

  • BPMN diagram generation from text or image input
  • Detection of modelling problems and optimization proposals
  • Real-time collaboration via Django Channels, WebSockets, and Redis
  • Versioning and diagram sharing

Key decisions

  • Used Django Channels with a Redis channel layer (served via Daphne) for real-time collaboration: diagram edits propagate over WebSockets through dedicated consumers, so several people can work on the same process model simultaneously.
  • Chose bpmn-js with bpmn-moddle on the frontend for standards-compliant BPMN rendering, paired with bpmnlint rules so modelling problems are flagged directly in the editor — AI suggestions stay grounded in valid BPMN 2.0.
  • Built a multi-input AI pipeline: text descriptions go to the OpenAI API for diagram generation, while uploaded images pass through OpenCV preprocessing and Tesseract OCR first — organized in dedicated backend apps (bpmn, bpmn_error_detection) behind DRF endpoints.
  • Seeded the product with default process templates and shipped everything in Docker Compose (backend, frontend, Redis, Postgres) so a five-person team could develop and demo without environment drift.

Difficult problem

The hardest problem was keeping AI output and concurrent edits inside valid BPMN: generated XML could reference missing elements, and two collaborators could interleave incompatible changes. I addressed it on two layers — server-side validation and error-detection logic that rejects or repairs broken models before they persist, plus client-side bpmnlint feedback that surfaces problems immediately in the editor. Versioning and default templates gave users a safe way back whenever a generation went wrong.

Lessons learned

  • Leading a five-person team taught me to split work along app boundaries (auth, bpmn, error detection, frontend) so people rarely blocked each other.
  • Real-time features force you to design the message protocol first — the consumer/routing contract mattered more than any single UI polish.
  • AI features need guardrails, not just prompts: validation and linting turned unpredictable model output into a trustworthy modelling assistant.
  • Docker Compose became the team's shared language — one command to run the whole system removed an entire class of works-on-my-machine discussions.
Next project — Khairul Islam

03 Sudoku Online