Documentation Index
Fetch the complete documentation index at: https://docs.grantex.dev/llms.txt
Use this file to discover all available pages before exploring further.
What it does
This example demonstrates how to use the Grantex audit trail as a rich data source:- Set up two agents with different scopes and generate grant tokens
- Generate audit entries — a mix of success, failure, and blocked statuses across agents
- Display full audit timeline — formatted table with status icons, agent names, and timestamps
- Filter by agent — show entries for each agent separately
- Filter by action — show only specific actions (e.g.
email:send) with metadata - Compute metrics — success rate, failure rate, entries per agent, top actions by frequency
- Verify hash chain integrity — walk the cryptographic chain to confirm tamper evidence
Prerequisites
- Node.js 18+
- Docker (Docker Desktop or Docker Engine with Compose)
Run
Start the local Grantex stack from the repository root:Expected output
Environment variables
| Variable | Default | Description |
|---|---|---|
GRANTEX_URL | http://localhost:3001 | Base URL of the Grantex auth service |
GRANTEX_API_KEY | sandbox-api-key-local | API key. Use a sandbox key for auto-approval |
Source code
The full source is inexamples/audit-dashboard/src/index.ts.