Build a vertical storefront on Sensrik.
A vanilla JavaScript SDK and a public REST API. Use what you like — Lovable, Wix, Webflow, Cursor, hand-coded HTML. Same backend, your branding.
Quickstart — 60 seconds
1. Import the SDK straight from this site
<script type="module">
import { Sensrik } from 'https://docs.sensrik.com/sensrik.js';
const sensrik = new Sensrik({ apiKey: 'sk_...' });
const devices = await sensrik.devices.list();
console.log(devices);
</script>
Host your frontend on any domain — the Sensrik API sends
Access-Control-Allow-Origin: *, so there's no CORS allowlist to get added to.
2. Or vendor it into your project
For a bundler-based stack (React, Vue, Vite, Next), save the file next to your source and import it by path. It's one dependency-free ES module — no install step, nothing to keep updated but the file itself.
curl -o src/lib/sensrik.js https://docs.sensrik.com/sensrik.js
import { Sensrik } from './lib/sensrik.js';
const sensrik = new Sensrik({ apiKey: 'sk_...' });
const devices = await sensrik.devices.list();
An @sensrik/sdk npm package is planned but not published yet — use one of the two
routes above.
What you get
Auth done
Email + password, API keys, JWT auto-refresh. The SDK handles it all.
Device data
List devices, read live telemetry, render charts. Updates every 15s.
Alerts
List, acknowledge, and count alerts per tenant out of the box.
Multi-tenant
Each storefront sees its own customer's devices. No cross-tenant leaks.
Zero deps
The SDK is one file, no runtime dependencies. ~6KB minified.
Drop-in template
A working storefront in pure HTML + CSS + JS. No build step. Ask your Sensrik admin for a copy.
Examples
Copy-paste starter snippets for your stack of choice:
- HTML Vanilla HTML + <script type="module">
- JS React (functional, no extra deps)
- JS Vue 3 (Composition API)
Common endpoints
The full reference is at /api — these are the ones you'll use first:
- POST
/api/auth/token— sign in - GET
/api/devices— list devices on your tenant - GET
/api/devices/{id}/readings— recent telemetry, grouped by sensor - GET
/api/alerts— active and historical alerts - POST
/api/tenant/api-keys— issue an API key
What's "tenant" vs "customer"?
They're the same object — two words for two audiences. The API and database call it a tenant (the standard multi-tenant SaaS term). The admin UI calls it a customer. From your point of view as a vibecoder: you're building a storefront on top of one tenant, and that tenant's data is what your storefront shows.
Licensing
The SDK, template, and these docs are MIT-licensed. Fork, modify, ship.