isoflow/README.md

93 lines
2.6 KiB
Markdown
Raw Normal View History

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> |
<a href="https://discord.gg/efXxbsha">Discord</a>
</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-25 17:09:51 +00:00
Beta 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-21 08:30:40 +00:00
- [x] onSceneUpdate callback
2023-08-21 15:37:57 +00:00
- [x] Drag items
- [x] Iconpacks
2023-08-25 17:09:51 +00:00
- [x] Documentation
2023-08-21 08:30:40 +00:00
- [ ] Export options
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-25 17:09:51 +00:00
Install the Isoflow [npm package](https://www.npmjs.com/package/isoflow):
```bash
2023-08-21 08:30:40 +00:00
npm install isoflow
```
2023-03-23 22:36:34 +00:00
2023-08-25 17:09:51 +00:00
Basic usage is as follows:
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
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: [],
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-25 17:09:51 +00:00
<Isoflow initialData={initialData}>
);
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-25 17:09:51 +00:00
## Developer documentation
For more detailed API documentation, examples and more, see the [developer documentation](https://v2.isoflow.io/docs).
2023-08-25 17:09:51 +00:00
## CodeSandbox
Demo the latest version of Isoflow on Codesandbox [here](https://codesandbox.io/p/sandbox/github/markmanx/isoflow/tree).
2023-08-21 08:30:40 +00:00
The sandbox is always synced with the Github repo.
## Contributing
2023-08-25 17:09:51 +00:00
- Missing something or found a bug? Report it [here](https://github.com/markmanx/isoflow/issues) or join our [Discord server](https://discord.gg/efXxbsha).
- Want to contribute? See [good first issues](https://github.com/markmanx/isoflow/contribute).