How neo4j/neo4j-browser works
Project type and purpose
• It includes:
– A rich browser-based frontend under src/browser
– A companion UI component library (“neo4j-arc”) under src/neo4j-arc
– Shared Redux-style state & services logic under src/shared
– A minimal Node.js “auth_server” for issuing delegation tokens (for SSO)
– Docker compositions for Keycloak SSO and a Neo4j test database
– Cypress end-to-end tests and unit tests (Jest)
File structure
• Top-level directories:
– src/browser: React application, webpack entry point, components, hooks, modules, styles
– src/neo4j-arc: reusable component library consumed via an alias
– src/shared: cross-cutting state management (ducks/epics), services (Bolt driver, remote, localStorage)
– auth_server: Node.js service for delegation token endpoint (certificates, HTML pages)
– docker/sso-keycloak: docker-compose setup for Keycloak and Neo4j in tests
– docs: Antora-based documentation site
– e2e_tests: Cypress fixtures, integration and SSO tests
– build_scripts, scripts: custom build-and-release helpers
• Architectural patterns:
– Component-based UI (React) organized into “modules” by feature (Stream, Sidebar, Frame, Docs, etc.)
– State management via Redux ducks + RxJS epics (thunks in shared/modules)
– Shared utility library (neo4j-arc) built separately and consumed via webpack aliases
– Minimal backend (auth_server) for token brokerage, otherwise direct Bolt connections to Neo4j
README for additional insights
• Describes how the browser connects directly to a local Neo4j (bolt://localhost:7687) or remote instance
• Mentions SSO support via Keycloak and a local auth server
• Explains testing commands (unit, e2e) and required Docker setup
Detail
• Essential parts: webpack dev server, shared modules, subproject build, auth_server endpoints, direct Bolt connections, test harness.
• Special interactions (e.g., SSO token flow, Cosmos-style epics pipeline, Arc library import).