Node reference example
Run the complete OAuth and research lifecycle locally with Node, Hono, and encrypted SQLite storage.
Download and verify#
Download the Node reference ZIP.
Verify it against artifacts.productIntegration.sha256 in the distribution manifest before using it.
Inspect downloaded source and package scripts before executing them.
The reference code is MIT licensed; it does not publish or require a Dativue SDK package.
Inspect the maintained source#
The example README contains exact install, start, and test commands. Read the package manifest, OAuth and tools implementation, encrypted storage, and local server. The complete file inventory is listed in the distribution manifest.
Run the example#
Use Node 24 or newer and run these commands from the extracted example directory:
npm ci
npm start
Open http://127.0.0.1:4318 and select a local test customer.
Connect Dativue, complete consent yourself, then inspect tools and run the free quote without an LLM account.
Run the example's checks with:
npm test
npm run typecheck
npm run lint
Adapt it to your product#
The local harness listens only on loopback and refuses production mode. It creates a local encryption key with restricted file permissions and keeps encrypted records in SQLite. Its test-customer selector is demonstration authentication, not production authentication. For an existing product, replace the harness with that product's authenticated administrator routes, tenant model, database, vault, and distributed locking. Retain the OAuth, token, customer-isolation, and spending rules when adapting it. Do not deploy the demonstration customer selector publicly.