2023-03-08 20:33:47 +00:00
|
|
|
![readme-header](https://user-images.githubusercontent.com/1769678/223572353-788d5d38-cd28-40fa-96cd-9d29226f7e4b.png)
|
|
|
|
|
|
|
|
<div align="center">
|
|
|
|
|
|
|
|
![GitHub License MIT](https://img.shields.io/github/license/wbkd/react-flow?color=%23ff0072)
|
2023-03-29 22:02:30 +00:00
|
|
|
![CircleCI](https://circleci.com/gh/markmanx/isoflow.svg?style=shield)
|
2023-03-08 20:33:47 +00:00
|
|
|
|
2023-03-29 22:02:30 +00:00
|
|
|
A highly customizable React component for building interactive network diagrams.
|
2023-03-08 20:33:47 +00:00
|
|
|
|
2023-07-29 09:20:26 +00:00
|
|
|
MIT licence | Source available on [Github](https://github.com/markmanx/isoflow) | Use it now on [isoflow.io](https://isoflow.io)
|
2023-03-08 20:33:47 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
## Key Features
|
|
|
|
|
|
|
|
- **Real-time:** Display real-time data on diagrams.
|
|
|
|
- **Customizable:** Use your own isometric icon packs, or use our free set of networking icons (also under MIT).
|
|
|
|
- **Export options:** Export diagrams as images, JSON or YAML.
|
|
|
|
- **Powerful annotation tools:** Annotate nodes, groups and connectors.
|
|
|
|
- **Step-by-step walkthroughs:** Create interactive tours of large diagrams to help viewers easily digest information.
|
|
|
|
|
2023-03-16 23:19:31 +00:00
|
|
|
## Roadmap
|
|
|
|
|
|
|
|
Migration to open-source: ██░░░░░░░░░
|
|
|
|
|
|
|
|
- [x] Set up automated publishing to NPM registry
|
|
|
|
- [ ] Migrate private JS project to public Typescript project
|
2023-03-23 22:36:34 +00:00
|
|
|
- [x] Pan / Select / Zoom modes
|
2023-07-20 15:45:54 +00:00
|
|
|
- [x] Display icons in itemControls
|
2023-04-04 00:35:32 +00:00
|
|
|
- [ ] Node controls
|
|
|
|
- [ ] Group controls
|
|
|
|
- [ ] Connector controls
|
2023-03-16 23:19:31 +00:00
|
|
|
- [ ] Publish icons as separate importable package
|
|
|
|
|
2023-03-23 22:36:34 +00:00
|
|
|
## Installation
|
|
|
|
|
2023-04-04 00:35:32 +00:00
|
|
|
Note: Isoflow is currently in development and _NOT_ production ready. To view it's current state of development:
|
2023-03-23 22:36:34 +00:00
|
|
|
|
|
|
|
`npm install isoflow`
|
|
|
|
|
|
|
|
```
|
|
|
|
import Isoflow from 'isoflow';
|
|
|
|
|
2023-04-04 00:35:32 +00:00
|
|
|
const scene = {
|
|
|
|
icons: [
|
|
|
|
{
|
|
|
|
id: "block",
|
|
|
|
name: "Block",
|
|
|
|
url: "https://isoflow.io/static/assets/icons/networking/primitive.svg",
|
|
|
|
category: "Networking",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
nodes: [
|
|
|
|
{
|
|
|
|
id: "a_node",
|
|
|
|
label: "A node",
|
|
|
|
icon: "block",
|
|
|
|
position: {
|
|
|
|
x: 0,
|
|
|
|
y: 0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
connectors: [],
|
|
|
|
groups: []
|
|
|
|
}
|
|
|
|
|
2023-03-23 22:36:34 +00:00
|
|
|
const App = () => (
|
|
|
|
<Isoflow
|
|
|
|
height={500}
|
2023-04-04 00:35:32 +00:00
|
|
|
scene={scene}
|
2023-03-23 22:36:34 +00:00
|
|
|
>
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
2023-03-23 22:39:13 +00:00
|
|
|
If using Next.js, make sure you only import Isoflow in the browser:
|
|
|
|
|
|
|
|
```
|
|
|
|
const Isoflow = dynamic(() => import("isoflow"), {
|
|
|
|
ssr: false,
|
|
|
|
});
|
|
|
|
```
|
|
|
|
|
2023-04-04 07:47:34 +00:00
|
|
|
## Development setup
|
|
|
|
|
|
|
|
1. Clone the repo
|
|
|
|
2. `npm i`
|
|
|
|
3. `npm run start`
|
|
|
|
4. Visit `localhost:3000` in your browser
|
|
|
|
|
2023-07-29 09:17:33 +00:00
|
|
|
## Codesandbox
|
|
|
|
|
|
|
|
You can preview the latest version of Isoflow on Codesandbox [here](https://codesandbox.io/p/sandbox/github/markmanx/isoflow/tree).
|
|
|
|
The sandbox is always synced with the Github repo. You can make changes by forking the template.
|
|
|
|
|
2023-07-04 18:43:09 +00:00
|
|
|
## To deploy to npm
|
|
|
|
|
|
|
|
CI is sensitive to any tag pushed to `main` branch. It will build and deploy the app to NPM.
|
|
|
|
To deploy:
|
|
|
|
|
|
|
|
1. Bump the version using `npm version patch` or similar
|
|
|
|
2. `git push && git push --tags`
|
|
|
|
|
2023-04-04 07:47:34 +00:00
|
|
|
## Contributions
|
|
|
|
|
2023-07-29 07:02:17 +00:00
|
|
|
### Branching Strategy:
|
|
|
|
|
|
|
|
Branches are named using the following convention:
|
|
|
|
|
|
|
|
- `feature/` for new feature implementations
|
|
|
|
- `fix/` for broken code / build / bug fixes
|
|
|
|
- `chore/` non-breaking & non-fixing code changes such as linting, formatting, etc.
|
|
|
|
|
|
|
|
#### Commit / PR Strategy:
|
|
|
|
|
|
|
|
- Commits are to be squashed prior to merge
|
|
|
|
- PRs are to target a singular issue in order to keep the commit history clean and easy to follow
|
|
|
|
|
2023-04-04 07:47:34 +00:00
|
|
|
See [good first issues](https://github.com/markmanx/isoflow/contribute).
|
|
|
|
|
2023-03-08 20:33:47 +00:00
|
|
|
## License
|
|
|
|
|
2023-03-16 23:19:31 +00:00
|
|
|
Isoflow is MIT licensed (see ./LICENSE).
|