2023-03-08 20:33:47 +00:00
![readme-header ](https://user-images.githubusercontent.com/1769678/223572353-788d5d38-cd28-40fa-96cd-9d29226f7e4b.png )
2023-08-21 08:30:40 +00:00
< h4 align = "center" >
2023-08-24 12:10:54 +00:00
< a href = "https://codesandbox.io/p/sandbox/github/markmanx/isoflow" > Isoflow Editor< / a > |
2023-08-21 08:30:40 +00:00
< a href = "https://github.com/markmanx/isoflow" > Github< / a > |
2023-08-28 20:30:52 +00:00
< a href = "https://discord.gg/QYPkvZth7D" > Discord< / a >
2023-08-21 08:30:40 +00:00
< / h4 >
2023-03-08 20:33:47 +00:00
2023-08-21 08:30:40 +00:00
< div align = "center" >
2023-08-25 17:09:51 +00:00
< h1 > An open-source React component for drawing network diagrams.< / h2 >
2023-08-21 08:30:40 +00:00
< / div >
2023-03-08 20:33:47 +00:00
2023-08-21 08:30:40 +00:00
< div align = "center" >
2023-03-08 20:33:47 +00:00
2023-08-21 08:30:40 +00:00
[![License: MIT ](https://img.shields.io/badge/License-MIT-yellow.svg )](https://opensource.org/licenses/MIT)
![CircleCI ](https://circleci.com/gh/markmanx/isoflow.svg?style=shield )
2023-03-08 20:33:47 +00:00
< / div >
## Key Features
2023-08-24 12:18:00 +00:00
- **Annotation tools:** Annotate your architecture with isometric icons, labels, regions and connectors.
2023-08-25 17:09:51 +00:00
- **Customizable:** Use the standard free set of networking icons (also included under the MIT licence), or create your own.
2023-03-08 20:33:47 +00:00
- **Export options:** Export diagrams as images, JSON or YAML.
2023-03-16 23:19:31 +00:00
## Roadmap
2023-08-28 20:30:52 +00:00
V1 release progress: █████████░
2023-03-16 23:19:31 +00:00
2023-08-21 08:30:40 +00:00
- [x] Basic view controls (pan & zoom)
- [x] Create / delete nodes
- [x] Create / delete connectors
2023-08-25 17:09:51 +00:00
- [x] Create / delete rectangle areas
2023-08-28 20:30:52 +00:00
- [x] Node icons (e.g. server, router etc)
- [ ] Cloud service icons (i.e. AWS + GCP icons)
2023-08-21 08:30:40 +00:00
- [x] onSceneUpdate callback
2023-08-21 15:37:57 +00:00
- [x] Drag items
2023-08-25 17:09:51 +00:00
- [x] Documentation
2023-08-28 20:30:52 +00:00
- [x] Load / save diagram (locally as JSON)
2023-03-16 23:19:31 +00:00
2023-08-25 17:09:51 +00:00
2023-08-21 08:30:40 +00:00
## Quick start
2023-03-23 22:36:34 +00:00
2023-08-28 20:46:09 +00:00
To integrate with your existing React app, install the Isoflow [npm package ](https://www.npmjs.com/package/isoflow ):
- `npm install isoflow`
2023-03-23 22:36:34 +00:00
2023-08-28 20:46:09 +00:00
## Basic integration:
2023-03-23 22:36:34 +00:00
2023-08-25 17:09:51 +00:00
```jsx
2023-03-23 22:36:34 +00:00
import Isoflow from 'isoflow';
2023-08-25 17:09:51 +00:00
import { networkingIsopack } from 'isoflow/dist/iconpacks';
2023-03-23 22:36:34 +00:00
2023-08-24 16:52:33 +00:00
const initialData = {
2023-08-25 17:09:51 +00:00
icons: networkingIsopack,
2023-04-04 00:35:32 +00:00
nodes: [
{
2023-08-21 08:30:40 +00:00
id: "node1",
2023-08-25 17:09:51 +00:00
iconId: "server",
2023-04-04 00:35:32 +00:00
position: {
x: 0,
y: 0,
},
},
],
connectors: [],
2023-08-18 11:07:15 +00:00
rectangles: []
2023-08-25 17:09:51 +00:00
};
2023-04-04 00:35:32 +00:00
2023-03-23 22:36:34 +00:00
const App = () => (
2023-08-26 20:05:39 +00:00
< Isoflow initialData = {initialData} / >
2023-08-25 17:09:51 +00:00
);
2023-03-23 22:36:34 +00:00
```
2023-08-25 17:09:51 +00:00
**Note:** Isoflow cannot be server-side rendered. If using Next.js, make sure you only import Isoflow in the browser:
2023-03-23 22:39:13 +00:00
2023-08-25 17:09:51 +00:00
```jsx
2023-03-23 22:39:13 +00:00
const Isoflow = dynamic(() => import("isoflow"), {
ssr: false,
});
```
2023-08-28 20:46:09 +00:00
## Running Isoflow in development mode
To run Isoflow on a local development server with hot-reloading enabled:
1. `npm i`
2. `npm run start` .
2023-08-25 17:09:51 +00:00
## Developer documentation
2023-08-28 20:46:09 +00:00
For detailed API documentation, examples and more, see the online [developer documentation ](https://v2.isoflow.io/docs ). Or if you'd prefer to build and run the docs locally:
- `npm run start:docs`
2023-07-29 09:17:33 +00:00
2023-08-25 17:09:51 +00:00
## CodeSandbox
2023-08-28 20:46:09 +00:00
You can demo the latest version of Isoflow on [CodeSandbox ](https://codesandbox.io/p/sandbox/github/markmanx/isoflow/tree ). The sandbox is always synced with the Github repo.
2023-08-21 08:30:40 +00:00
## Contributing
2023-08-28 20:46:09 +00:00
- Isoflow is actively being worked on. Missing something or found a bug? Report it [here ](https://github.com/markmanx/isoflow/issues ) or join our [Discord server ](https://discord.gg/QYPkvZth7D ).
2023-08-25 17:09:51 +00:00
- Want to contribute? See [good first issues ](https://github.com/markmanx/isoflow/contribute ).