# HSML Viewer

This is published at NPM here: https://www.npmjs.com/package/@versesdev/hsml-viewer

A minimal example implementation can be found at `src/App.tsx`. To run this minimal example locally, do the following:

```bash
npm i
npm run dev
```

For a more thorough example implementation look at Workbench: https://github.com/VersesTech/workbench

## Tips on developing/ making changes to this app:

step1:
To start, in this package run `npm run buildwatch`, this will call `vite build --watch` which will cause the package to build whenever a change is made to any of the compiled code.

step2:
run `npm link` inside this package
run `npm link @versesdev/hsml-viewer` inside the consumer app

Now when you make changes in this app you will get an auto rebuild, right now it takes about 7 seconds which isn't great, but better than having to manually rebuild after every change.

I like to run this when i'm ready to unlink as it gives a nice clean break: `
npm unlink && rm -rf node_modules && npm install`

It's helpful to install this vs code extension, https://marketplace.visualstudio.com/items?itemName=roblourens.npm-link-status which will show an icon at the bottom of your vscode when you are linked in your consumer app.

you can also just run `npm list` in the consumer app and it will show you if this package is linked or not

## Scenario Example

### Setup:
- Spin a local Genius Core instance
- Upsert schemas and entities present in `src/example/res`
- Spin a local 3D File Importer instance with `AWS_UPLOAD_ENABLED` enabled in .env
