Skip to content

Generate executable BPMN 2.0 diagrams from natural language using LLMs. Web-based tool with live editing, validation, and visualization built on Node.js and bpmn-js.

License

Notifications You must be signed in to change notification settings

Grade0/text-to-bpmn2.0

Repository files navigation

Text-to-BPMN 2.0 Node.js Project

Text-to-BPMN 2.0 is a web-based tool that allows users to generate executable BPMN 2.0 process diagrams from natural language descriptions. By leveraging powerful large language models such as DeepSeek and OpenAI, the application transforms informal text into well-structured BPMN XML, which can be visualized, validated, and edited directly in the browser. It is designed to lower the technical barrier of process modeling and support business analysts, developers, and non-technical users alike in capturing workflows quickly and intuitively.

Built with Node.js, Express, and the bpmn-js toolkit, this project integrates API-based language model inference with client-side BPMN rendering and semantic validation.


📦 Project Structure

Text-to-BPMN 2.0/
├── LICENSE
├── package.json
├── package-lock.json
├── .env                         # where API keys are stored (keep secret)
├── rollup.config.mjs            # bundles app.js into bundle-app.js
├── server.js                    # Node.js backend and API handler
├── system_prompt.txt
├── .bpmnlintrc                  # validation rules for BPMN Lint
├── public/
│   ├── index.html
│   ├── css/
│   │   └── style.css
│   ├── js/
│   │   ├── bundle-app.js        # bundled frontend logic
│   │   └── bundle-app.js.map
│   ├── diagram/
│   │   └── default.bpmn         # default diagram example
│   └── src/
│       └── app.js               # main frontend logic, imports bpmnlint
└── node_modules/

🚀 How to Run Locally

1. Clone or download this project folder

cd text-to-bpmn2.0

2. Install dependencies

npm install

3. Build the frontend

npm run build

3. Create .env file

At the root level, create a .env file with:

DEEPSEEK_API_KEY=sk-your-deepseek-api-key-here
OPENAI_API_KEY=sk-your-chatgpt-api-key-here

Replace with your real DeepSeek API key.

4. Start the server

npm start

Visit:

http://localhost:3000

✅ Text-to-BPMN2.0 app will be live on your local machine.


🌐 How to Deploy Online

This Node.js project is already production-ready!

You can easily host it using platforms like:

Basic steps to deploy:

  1. Push your project to GitHub.
  2. Create a new service on your hosting platform.
  3. Connect your GitHub repository.
  4. Set environment variable DEEPSEEK_API_KEY and OPENAI_API_KEY in the platform dashboard.
  5. Deploy.

That's it — the app will be live with its own URL!

Example:

https://your-app-name.onrender.com

⚡ Commands Summary

Command What it does
npm install Install all dependencies
npm run build Build the frontend logic
npm start Start the Node.js server
npm run dev Start server with auto-restart using nodemon

🛡️ Security Note

  • Never expose your .env file to the public.
  • Always add .env to your .gitignore when uploading to GitHub.

License

This project is licensed under the MIT License. Copyright © 2025 Davide Chen.

About

Generate executable BPMN 2.0 diagrams from natural language using LLMs. Web-based tool with live editing, validation, and visualization built on Node.js and bpmn-js.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published