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">
|
|
|
|
<a href="beta.isoflow.io">Isoflow Editor</a> |
|
|
|
|
<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">
|
|
|
|
<h1>An open-source isometric whiteboard for React.</h2>
|
|
|
|
</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-21 08:30:40 +00:00
|
|
|
- **Annotation tools:** Annotate your whiteboard with isometric icons, labels, rectangles and connectors.
|
|
|
|
- **Customizable:** Use your own isometric icon packs, or the standard free set of networking icons (also under MIT).
|
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-21 15:37:57 +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 rectangle areas
|
|
|
|
- [x] Create / delete connectors
|
|
|
|
- [x] onSceneUpdate callback
|
2023-08-21 15:37:57 +00:00
|
|
|
- [x] Drag items
|
|
|
|
- [x] Iconpacks
|
2023-08-21 08:30:40 +00:00
|
|
|
- [ ] Export options
|
2023-03-16 23:19:31 +00:00
|
|
|
|
2023-08-21 08:30:40 +00:00
|
|
|
## Quick start
|
2023-03-23 22:36:34 +00:00
|
|
|
|
2023-08-21 08:30:40 +00:00
|
|
|
Install the [Isoflow npm package](https://www.npmjs.com/package/isoflow):
|
|
|
|
```
|
|
|
|
npm install isoflow
|
|
|
|
```
|
2023-03-23 22:36:34 +00:00
|
|
|
|
2023-08-21 08:30:40 +00:00
|
|
|
Render a diagram:
|
2023-03-23 22:36:34 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
import Isoflow from 'isoflow';
|
|
|
|
|
2023-04-04 00:35:32 +00:00
|
|
|
const scene = {
|
|
|
|
icons: [
|
|
|
|
{
|
|
|
|
id: "block",
|
|
|
|
name: "Block",
|
2023-08-21 08:30:40 +00:00
|
|
|
url: "https://isoflow.io/static/assets/icons/networking/primitive.svg"
|
2023-04-04 00:35:32 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
nodes: [
|
|
|
|
{
|
2023-08-21 08:30:40 +00:00
|
|
|
id: "node1",
|
2023-04-04 00:35:32 +00:00
|
|
|
icon: "block",
|
|
|
|
position: {
|
|
|
|
x: 0,
|
|
|
|
y: 0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
connectors: [],
|
2023-08-18 11:07:15 +00:00
|
|
|
rectangles: []
|
2023-04-04 00:35:32 +00:00
|
|
|
}
|
|
|
|
|
2023-03-23 22:36:34 +00:00
|
|
|
const App = () => (
|
|
|
|
<Isoflow
|
|
|
|
height={500}
|
2023-08-21 08:30:40 +00:00
|
|
|
initialScene={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-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).
|
2023-08-21 08:30:40 +00:00
|
|
|
The sandbox is always synced with the Github repo.
|
|
|
|
|
|
|
|
## Contributing
|
|
|
|
- Missing something or found a bug? Report it [here](https://github.com/markmanx/isoflow/issues).
|
|
|
|
- Want to contribute? See [good first issues](https://github.com/markmanx/isoflow/contribute).
|
2023-07-29 09:17:33 +00:00
|
|
|
|
2023-08-21 08:30:40 +00:00
|
|
|
# For contributors
|
|
|
|
|
|
|
|
## Deploying to NPM
|
2023-07-04 18:43:09 +00:00
|
|
|
|
|
|
|
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-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-03-08 20:33:47 +00:00
|
|
|
## License
|
|
|
|
|
2023-03-16 23:19:31 +00:00
|
|
|
Isoflow is MIT licensed (see ./LICENSE).
|