A browser-based graph workbench for the Semantica platform. Pan and zoom live graphs, scrub the timeline, trace every decision's causal chain, resolve duplicates, and author your ontology visually. Built on React 19 + Sigma.js.
| Dependency | Minimum version |
|---|---|
| Python | 3.8+ |
| Node.js | 18.x or higher (20.x recommended) |
| npm | 9.x or higher |
python --version
node --version
npm --versionInstall the package with the explorer extras. The pre-built frontend bundle is included in the wheel so no Node.js is required.
pip install "semantica[explorer]"Launch the dashboard by pointing it at any graph JSON file:
semantica-explorer --graph my_graph.jsonThe server starts at http://127.0.0.1:8000 and opens the dashboard in your default browser automatically.
CLI flags:
| Flag | Default | Description |
|---|---|---|
--graph / -g |
(required) | Path to a ContextGraph JSON file |
--port / -p |
8000 |
Port to bind the server to |
--host |
127.0.0.1 |
Host to bind (use 127.0.0.1 for local-only; see security note below) |
--no-browser |
off | Skip opening the browser automatically |
Examples:
# Default β opens at http://127.0.0.1:8000
semantica-explorer --graph my_graph.json
# Custom port
semantica-explorer --graph my_graph.json --port 8080
# Suppress auto-open
semantica-explorer --graph my_graph.json --no-browser
# Equivalent using python -m
python -m semantica.explorer --graph my_graph.jsonSecurity note: The Explorer API has no built-in authentication. The default
--host 127.0.0.1binds to localhost only, so it is not reachable from other machines on your network. If you bind to0.0.0.0, all graph data is readable and writable by any host that can reach the port. The CLI will print a warning in that case.
This mode runs the React dev server with hot module replacement, so frontend changes appear in the browser instantly without rebuilding.
git clone https://github.com/semantica-agi/semantica.git
cd semanticapip install -e ".[explorer]"cd explorer
npm ciOpen a terminal in the repo root:
semantica-explorer --graph path/to/my_graph.json --no-browserThis starts the API on http://127.0.0.1:8000. Keep this terminal open.
Open a second terminal in explorer/:
npm run devVite starts on http://localhost:5173. Open that URL in your browser. All /api and /ws requests are automatically proxied to the Python backend at http://127.0.0.1:8000.
If you need to serve the UI from the Python server directly (without the Vite dev server):
cd explorer
npm ci
npm run buildThis writes the compiled assets to ../semantica/static/. The Python server then serves the full dashboard at http://127.0.0.1:8000 β no separate Vite process needed.
| Workspace | What you can do |
|---|---|
| Knowledge Graph | Live Sigma.js canvas Β· ForceAtlas2 layout Β· Ego Mode Β· semantic distance heatmap Β· path highlighting |
| Timeline | Temporal event scrubber β watch the graph evolve across time |
| Decisions | Browse causal chains behind every recorded decision with outcome badges and confidence scores |
| Registry | Live audit log of every graph mutation (add-node, add-edge, delete, update) |
| Entity Resolution | Review and merge duplicate entities with blocking + semantic dedup |
| KG Overview | Aggregate stats, community breakdown, centrality heatmap |
| Ontology Hub | SHACL Studio Β· visual drag-and-drop editor Β· cross-ontology alignments Β· SKOS browser |
| Lineage | W3C PROV-O provenance visualization for any entity |
| Variable | Default | Description |
|---|---|---|
EXPLORER_CORS_ORIGINS |
http://localhost:5173,http://127.0.0.1:5173 |
Comma-separated list of allowed CORS origins |
EXPLORER_CORS_CREDENTIALS |
false |
Set to true to allow credentialed cross-origin requests (only needed behind an authenticating reverse proxy) |
Run these from inside the explorer/ directory:
# Start the dev server with hot module replacement
npm run dev
# Type-check and build the production bundle into ../semantica/static/
npm run build
# Preview the production build locally
npm run preview
# Run ESLint over all source files
npm run lint
# Run the graph store multi-edge unit tests
npm run test:graph-store
# Run the graph workspace display tests
npm run test:graph-workspaceDuring development, Vite forwards requests automatically β no CORS configuration needed:
| Pattern | Forwarded to |
|---|---|
/api/* |
http://127.0.0.1:8000/api/* |
/ws/* |
ws://127.0.0.1:8000/ws/* |
To run the backend on a different port, update server.proxy in vite.config.ts.
explorer/
βββ src/
β βββ App.tsx # Root layout, tab routing, workspace wiring
β βββ index.css # Global resets, fonts, keyframe animations
β βββ store/
β β βββ graphStore.ts # In-memory graph state
β β βββ registryStore.ts # Pub/sub audit registry
β βββ workspaces/
β βββ GraphWorkspace/ # Sigma.js canvas + inspector + behaviors
β βββ DecisionWorkspace/ # Causal flow diagram + decision list
β βββ DiffMergeWorkspace/ # Graph diff and merge view
β βββ EnrichWorkspace/ # Entity resolution + registry tabs
β βββ ImportExportWorkspace/ # Import CSV/JSON, export graph
β βββ LineageWorkspace/ # W3C PROV-O lineage diagram
β βββ ManageWorkspace/ # KG Overview + Ontology Summary
β βββ OntologyWorkspace/ # SHACL Studio, visual editor, SKOS browser
β βββ SparqlWorkspace/ # In-browser SPARQL query editor
β βββ VocabularyWorkspace/ # SKOS vocabulary manager
βββ index.html
βββ vite.config.ts # Dev proxy β 127.0.0.1:8000, build β ../semantica/static
βββ package.json
The frontend bundle is missing from the server's static directory. Fix options:
- If you installed via pip:
pip install --upgrade "semantica[explorer]"β the wheel includes the pre-built bundle. - If you installed from source: run
cd explorer && npm ci && npm run buildfrom the repo root, then restart the server. - In dev mode: use the Vite dev server at
http://localhost:5173instead of the backend URL.
- Confirm the Python backend is running and check the terminal for errors.
- Open browser DevTools β Network tab and look for failed
/api/graphrequests. - If the backend is on a different port, update
server.proxyinvite.config.ts.
The package-lock.json must be present. Run npm install once to generate it, commit it, then use npm ci going forward.
Vite 6 requires Node 18 or higher. Run node --version to check. If you're on Node 16, upgrade via nvm or the official Node.js installer.
Vite automatically tries the next available port and prints the actual URL in the terminal. Use the URL shown in the output.
- Confirm the backend exposes the
/ws/graph-updatesWebSocket endpoint. - Check DevTools β Network β WS tab for the connection status and error code.
- Ensure the backend version matches the frontend β mixing major versions can cause protocol mismatches.
- React 19 + TypeScript (strict mode)
- Vite 6 with
babel-plugin-react-compiler - Sigma.js 3 + Graphology β graph rendering and in-memory graph model
- ForceAtlas2 β physics-based layout
- @tanstack/react-query β async data fetching for ontology and vocab tabs
- vis-timeline β temporal event visualization
- @xyflow/react β lineage diagram rendering
- Monaco Editor β in-browser SPARQL / SHACL editor
- lucide-react β icon set
See the root CONTRIBUTING.md and open issues on the main Semantica repository.