Web client for BioProtect, a spatial conservation planning tool built on Priotizr. Built with React, Vite, MUI, Redux Toolkit and Mapbox GL.
- Node.js (see
package.jsonfor dependency versions) - A Mapbox account (for map tiles and geocoding)
- A running instance of the server (or set
VITE_API_BASE_URLto a remote one)
git clone <this-repo>
cd frontend
npm install
npm start
Runs the Vite dev server at http://localhost:4500 and opens it in the browser.
npm start- run the dev servernpm run build- build for production intobuild/npm run serve- preview the production build locallynpm test- run the test suite (Vitest)npm run test:coverage- run tests with coveragenpm run deploy- build and publishbuild/to GitHub Pages
Key path aliases (see vite.config.ts): @slices, @planningGrids, @projects, @features, @navbars, @images, @hooks, @config, @store, @utils, all resolving under src/.
Notable areas under src/:
LeftInfoPanel/,RightInfoPanel/,MenuBar/- main app panelsplanningGrids/,projects/,features/- domain data viewsHexInfo/- planning unit inspection popoverslices/- Redux Toolkit state
A standalone Docker image is provided, intended to run behind an nginx-fronted deployment alongside a marxan-server instance and database.
Build:
docker build -t bioprotect-client:latest .
Run:
docker run -dp 5000:80 --name bioprotect-client bioprotect-client:latest
-d- detached mode-p 5000:80- maps local port 5000 to the container's exposed port 80--name- names the container
The image builds the app with Node, then serves the static build/ output via nginx (see nginx.conf).
See LICENSE.