
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@mongodb-js/diagramming
Advanced tools
Diagram canvas for data modelling capabilities in MongoDB
@mongodb-js/diagramming is a React component library built on top of React Flow for creating interactive, customizable diagrams, designed specifically for use cases in the MongoDB or relational world.
yarn add @mongodb-js/diagramming
Here is a basic example of how to use the Diagram
component:
import React from 'react';
import { Diagram } from '@mongodb-js/diagramming';
const nodes = [
{
id: '1',
type: 'collection',
data: { label: 'Node 1' },
position: { x: 250, y: 0 },
},
{
id: '2',
type: 'collection',
data: { label: 'Node 2' },
position: { x: 250, y: 250 },
}
];
const edges = [
{
id: 'e1-2',
source: '1',
target: '2',
type: 'default',
}
];
export const Component = () => {
return <Diagram nodes={nodes} edges={edges} />;
}
The project uses Vitest for unit testing.
To run all tests:
yarn test
To explore components and their behavior in isolation: https://mongodb-js.github.io/diagramming
Changes to the Storybook will be uploaded to the link above on push to main
To run locally at http://localhost:6006 on your own branch:
yarn install
yarn storybook
For contributing, please see CONTRIBUTING.md
For releasing and publishing please see RELEASING.md
FAQs
Diagram canvas for data modelling capabilities in MongoDB
The npm package @mongodb-js/diagramming receives a total of 8,254 weekly downloads. As such, @mongodb-js/diagramming popularity was classified as popular.
We found that @mongodb-js/diagramming demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 25 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.