https://github.com/flow-build/diagrams-core
https://github.com/flow-build/diagrams-core
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/flow-build/diagrams-core
- Owner: flow-build
- License: mit
- Created: 2022-08-11T12:33:10.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-16T15:51:49.000Z (about 3 years ago)
- Last Synced: 2025-09-20T05:57:17.975Z (9 months ago)
- Language: JavaScript
- Size: 861 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# diagrams-core
diagrams-core is a BPMN diagrams manager for your project.
 
[](https://sonarcloud.io/summary/new_code?id=flow-build_diagrams-core) [](https://github.com/semantic-release/semantic-release)
## Installation
Run the following command in your terminal:
```
npm install @flowbuild/diagrams-core
```
## Usage
```js
const { DiagramCore } = require('@flowbuild/diagrams-core');
const diagramCore = new DiagramCore(db);
// note that 'db' has to be a database configuration
```
The service does have a blueprint storage, but it only stores the data relevant to the diagram, a.k.a. nodes and lanes (prepare, environment and parameters are discarded).
## Environment variables
Add a .env file with the following variables:
- KNEX_ENV (suggested value = docker)
- NODE_ENV (suggested value = docker)
- POSTGRES_USER (default = postgres)
- POSTGRES_PASSWORD (default = postgres)
- POSTGRES_DB (default = diagrams)
- POSTGRES_HOST (default = localhost)
- POSTGRES_PORT (default = 5432)
- LOG_LEVEL (default = info)
## Testing on Docker:
Use the following command in order to setup two containers (database and test servers)
and run migrations, seeds and tests.
```
docker-compose up
```