Getting started
This guide gets the Fusion Analyst frontend running locally. All commands run from the repository root unless noted otherwise.
Prerequisites
- Node.js 20+ and npm (the project is developed on Node 22).
- For real ArcGIS sign-in: an ArcGIS Online or Enterprise OAuth client id. You can skip this and use the built-in mock auth for local development.
Install and run
npm install
npm run dev # binds http://localhost:5174
Open the dev server URL, sign in (see Authentication), create a workspace, and add widgets from the picker.
Available scripts
The frontend scripts are defined in the root package.json:
npm run dev # start the Vite dev server
npm run build # production build to dist/
npm run preview # preview a production build
npm run typecheck # tsc --noEmit
npm run test # run the Vitest suite once
npm run test:watch # Vitest in watch mode
npm run coverage # Vitest with V8 coverage
Choosing an auth mode
Authentication is selected by the VITE_AUTH_MODE environment variable:
| Mode | Provider | Use when |
|---|---|---|
mock | MockAuthProvider | Local development with no ArcGIS portal. Auto-signs in a built-in test account. |
arcgis | ArcGisAuthProvider | Real ArcGIS OAuth against ArcGIS Online and/or Enterprise. |
The default is arcgis. To develop without a portal, create a .env (or
.env.local) file with:
VITE_AUTH_MODE=mock
See Authentication for the full provider contract and how connections are managed.
Running the documentation site
This documentation lives in the website/ directory and is built with
Docusaurus.
cd website
npm install
npm start # local docs dev server with hot reload
npm run build # static build to website/build/
npm run serve # serve the production build locally
Project layout at a glance
fusion-analyst/
index.html # SPA entry
package.json # frontend app (Vite + TS + Tailwind)
src/ # the application (documented here)
api/ # Python FastAPI + LangGraph backend (separate docs)
website/ # this documentation site
The frontend source layout is described in detail in Project structure.