Dashier’s API is JSON over HTTP, so an existing application can keep its own frontend while using Dashier for records and administrative workflows. The key integration decision is credential placement: a private API key stays on a server you control, never in a browser bundle or mobile app.
Start with the source endpoint
Create a source and confirm its slug. For members, the collection path is /api/v1/members. Configure GET intentionally, then use a scoped key or a deliberately public read endpoint. The collection supports page, perpage, search, sort, and filter{field} query options.
Next.js: fetch on the server
Keep the key in a server-only variable. This server-side example deliberately avoids a NEXTPUBLIC prefix.
const response = await fetch(`${process.env.DASHIER_ORIGIN}/api/v1/members?page=1&per_page=20`, {
headers: { "x-api-key": process.env.DASHIER_API_KEY! },
cache: "no-store",
});
if (!response.ok) throw new Error(`Dashier request failed: ${response.status}`);
const result = await response.json();
React in the browser
For browser-only React, call your own backend route and add the key there. A direct browser request is appropriate only for an endpoint deliberately configured as public and data safe to disclose. Do not paste a project key into React source.
Vue
Use the same boundary as React: call a protected backend for private data, or a carefully configured public endpoint for public data. Handle unsuccessful responses, empty lists, and loading states while keeping framework state separate from credentials.
Node.js backend
A Node service can call Dashier directly. Store DASHIERORIGIN and DASHIERAPI_KEY in server configuration, send the key in x-api-key, and check response.ok before parsing. Prefer separate keys for separate services and rotate or revoke keys that no longer need access.
Flutter and other mobile clients
A compiled mobile application cannot keep a shared secret. Route private operations through your backend. A mobile client may call a public endpoint only when its data and method are intentionally public; never embed an admin/write key in the package.
Verify the integration
Test without credentials, with the intended key, with an insufficient scope, and with an invalid field value. Confirm status and JSON for each case. See API generation and Permissions.
