This is the UI module of the SpyLogic app. It is a React SPA without routing, and built to be as accessible as possible. If you find a problem with keyboard navigation, screen reader usage, colour contrast or any other accessibility concern, please open an issue.
We are working on making the app useable up to 200% zoom, so please be patient with us!
npm ci- If you've not done so already, copy file .env.example and name the copy
.env. - If you've changed the default port for running the API, adjust the
VITE_BACKEND_URLvalue accordingly.
We are using Vite to bootstrap, build and run our UI locally.
Run the dev server which will hot-reload on changes:
npm run devNote that for simplicity, we recommend hosting the UI through the backend when running locally. Follow instructions in the main README.
To build and run the UI separately:
# Build if you've not done so yet
npm run build
# Any server can then host the resulting dist/ folder ...
# Locally you can use Vite Preview
npm run preview # then type 'o' to open browser
# Or the "serve" package
npx serve dist -l 5000 # then navigate to localhost:5000 in browserTo manually lint and format:
npm run lint
npm run formatWe are using Vitest as our test runner. This is much like Jest, except that because we are using Vite, we can share much of the build and transform config.
npm test