The Lumenqraph Explorer is a lightweight, zero-build, responsive Single Page Application (SPA) served directly by the API. It provides a visual dashboard for self-hosters to monitor ingestion health, browse indexed contracts, analyze state/transfers, review interface upgrades, and simulate read-only contract calls.
The explorer page (explorer/index.html) is structured into a real-time KPI monitoring header, an indexed contract sidebar, and a detailed contract tab panel.
At the top of the dashboard, the UI displays real-time statistics fetched from the API's /health endpoint:
- Indexer Status: A visual dot indicators showing the health of the tailing process (Green/Healthy if caught up, Yellow/Warning if lagging, Red/Critical if far behind or unreachable).
- Lag (ledgers): The number of ledgers behind the chain tip.
- Processed Ledger: The height of the last indexed ledger.
- Chain Tip: The current height of the Stellar network.
- Events Indexed: Total events persisted in the database.
- Errors: Cumulative error count recorded during ingestion.
When a contract is selected, the explorer fetches data from the API's endpoints to populate six dynamic tabs:
- Events: Lists the latest decoded events with columns for Ledger, Event Name/Type, Decoded Value, and transaction links to Stellar.Expert.
- Transfers: Projects SEP-41 token transfer operations (
from,to,amount). - State: Displays the raw JSON snapshot of the contract's instance storage (
GET /contracts/:id/state). - Holders: Displays per-key storage snapshots (e.g., token balances) with key hash mappings (
GET /contracts/:id/data). - Interface: Parses and renders the contract's callable functions, inputs, outputs, and custom data structures directly from the on-chain WASM metadata.
- Upgrades: Renders a chronological timeline of contract upgrades, comparing WASM hashes and outputting a semantic diff of added, modified, or deleted functions/events.
The Interface tab includes an interactive simulation form. Users can specify view function parameters, and the UI will dispatch a request to /contracts/:id/call or /contracts/:id/simulate to run the execution using simulateTransaction on the Soroban RPC. It renders the typed result directly.
The explorer is a single, self-contained HTML file located in explorer/index.html. It can be served in two ways:
By default, the lumenqraph-api serves the explorer directory at its root fallback URL.
EXPLORER_DIR: Set this environment variable to the path containingindex.html(e.g.,EXPLORER_DIR="/app/explorer").- CORS-Free: Running the UI same-origin eliminates the need to configure CORS or manage cross-origin credentials.
- Revalidation Cache Headers: The API serves these assets with a
Cache-Control: no-cacheheader. This forces browsers to perform a lightweight conditional request (checkingLast-Modifiedtags). If the assets haven't changed, the server answers with a fast304 Not Modified, but new deployments are loaded immediately instead of waiting for long browser cache expirations.
You can host explorer/index.html on any static provider (GitHub Pages, Vercel, S3, Netlify, or local filesystem).
- In the top right header of the UI, fill in the API base field with your remote Lumenqraph API URL (e.g.
https://api.lumenqraph.dev). - Input your optional
x-api-keyin the API Key field if your endpoint has authentication enabled (REQUIRE_API_KEY=true). - Browser configurations (API Base, API Key) are automatically persisted in
localStoragefor convenience.
A single Lumenqraph instance indexes exactly one network (Stellar Mainnet or Testnet). However, you can front multiple instances using a single origin to allow seamless switching.
To index multiple networks on the same domain, deploy separate instances for each network and configure the primary instance to mount the other as a sibling proxy:
INSTANCE_MOUNTS="testnet=http://127.0.0.1:8081"The primary API will capture all incoming requests under /testnet/* and proxy them directly to the testnet instance (stripping the prefix).
- Advertisement: Sibling mounts are declared in the
/healthendpoint output under themountsfield. - Discovery: The explorer UI loads the
/healthendpoint of the primary base URL. It discovers the declared mounts ({ "testnet": "/testnet" }). - Switching: The Network dropdown in the header lists "mainnet" and "testnet".
- When the user selects "testnet", the UI automatically updates its API Base to the mounted subpath (e.g.
/testnet), updates its deep links pointing to Stellar.Expert, and queries the testnet database. - The UI remembers the API base URLs for each network in
localStorage(lq.base.mainnet,lq.base.testnet) to ensure seamless switching back and forth.
- When the user selects "testnet", the UI automatically updates its API Base to the mounted subpath (e.g.