Your own app, inside LopeBase.

The LopeBase Adapter is one small handler you mount at /api/lopebase. LopeBase signs every request to it, and it answers with only what you declare: your records, your dashboard numbers, your admin actions, and whether each service you depend on is up. Your database never leaves your app.

No dependencies. Runs on Cloudflare Workers, Node 18 and up, Vercel, Netlify, Deno, and Convex.

What it adds

The parts of your product no other tool can see.

Stripe knows payments and PostHog knows visits. Only your app knows its own users, plans, and queues. The adapter puts them next to everything else.

Your records, searchable

Users, subscriptions, reports, whatever you describe. Search, filter, and saved views work on all of them, and you pick whether emails and names go out in full, masked, or not at all.

Exact dashboard numbers

Users, signups, active users, MRR, and paying customers, counted in your own database and shown on Overview and in the weekly email.

Admin actions with an audit trail

Grant credits, extend a trial, resolve a report. Each action has typed fields, a confirm step, a role check, and a before and after on both sides.

Every service, watched

List the database, queue, workers, or second API your app needs. LopeBase's uptime checks show each one on its own and alert you when one fails.

Warnings from your own app

Your app can report what needs a person, and it shows under Needs attention beside outages and past-due payments, with email or push alerts if you want them.

Service health

One address, every service

Declare what your app cannot work without. Each check uses your app's own credentials for the cheapest authenticated call, like select 1, Stripe balance.retrieve, GitHub GET /app, or your AI provider's GET /models, so it proves your integration works, not just that the vendor is up. Never point a check at a vendor's status page or home address. /api/lopebase/health runs every check in parallel, each with its own time limit. A failing critical service answers 503; mark a service critical: false and its failure shows as degraded instead. cachedCheck keeps a success for 60 seconds and a failure for 10, so polling does not use up your API limits while a recovery still shows up within seconds. Use that address as the product's uptime check. Only names and up or down leave your app.

import { cachedCheck, createAdminAdapter, httpCheck } from "@lopebase/adapter";

export const lopebase = createAdminAdapter({
  // ...resources, overview, auth
  services: [
    { id: "db", label: "Database", check: async () => { await db.execute("select 1"); } },
    cachedCheck({ id: "stripe", label: "Payments", check: async () => { await stripe.balance.retrieve(); } }),
    cachedCheck({ id: "ai", label: "AI provider", critical: false, check: async () => { await openai.models.list(); } }),
    // httpCheck is for hosts your app owns
    httpCheck("api", "https://api.example.com/health", { label: "Our API" }),
  ],
});

More on how checks run and alert on the Uptime and incidents page.

Pageviews

Pair your signups with where they came from

LopeBase can count your pageviews itself with one tag: pages, sources, and visits, with no cookies and no visitor ids. Next to the signups your adapter reports, the Analytics page shows which pages and sources bring people in. It works with or without the adapter.

<script defer src="https://app.lopebase.com/lb.js" data-site="your-site-key"></script>

Copy your tag from the product's Analytics page, or let your agent add it. See Growth analytics.

Set up by your coding agent

Run npx lopebase in the product's folder. It scans the stack, lists what is worth watching, and hands setup to Claude Code, Codex, or the agent you use. The agent asks you before it changes anything.

agent · acme

Set up LopeBase for this repo.

get_onboarding_statusacmenext: adapter

This app uses Postgres, a BullMQ queue, and Resend. I'll add @lopebase/adapter at /api/lopebase with users and subscriptions, and list those three as services so uptime watches each one. How should emails and names reach LopeBase: full, masked, or IDs only?

connect_adapteracme.com/api/lopebasetested

Connected. Uptime now checks acme.com/api/lopebase/health every 15 minutes. Want LopeBase to count pageviews too? It is one tag in your layout, no cookies.

More on the Agents and MCP page.

What it never does

It lives in your code, so you can read every rule it follows.

  • Change anything by defaultIt lists and shows what you declare. Updates and actions exist only if you add them.
  • Send fields you did not declareEvery row is cut down to the fields you list. Anything else your query returns is dropped.
  • Let secrets slip outA field named like a password, token, API key, or card detail stops the adapter from starting, unless you allow that one field.
  • Accept unsigned requestsEach request is signed with a secret only your app and LopeBase know. The secret never crosses the wire, and a captured request is useless after five minutes.
  • Leak errorsErrors are logged in your app. LopeBase only ever sees "adapter error", never a stack trace or a connection string.
  • Answer without limitsAt most 100 rows per page, and 600 signed requests a minute per running instance by default.

The contract

Every path sits under /api/lopebase. A conformance suite in the package checks your adapter against it in your own tests.

  • GET /healthOpen, no data. Each declared service's id, label, and up or down. 503 when a critical one is down, 200 and degraded when only non-critical ones are.ok · status · services
  • GET /overviewSigned. Your dashboard numbers and anything that needs attention.stats · attentionItems
  • GET /resourcesSigned. The resources and fields you declared.resources · personalData
  • GET /resources/:nameSigned. A page of rows, with search, sort, filters, and a cursor.rows · nextCursor
  • POST /actions/:nameSigned. Only if you add actions. Typed params in, a summary and an audit row out.ok · summary · audit
  • GET /auditSigned. The adapter's own record of every change made through it.actor · action · before · after

Adapter questions

Something else? Email us.

Does LopeBase need my database credentials?

No. It only talks to the adapter, which decides what to expose. LopeBase never connects to your database.

Do I need the adapter to use LopeBase?

No. Analytics, search, revenue, errors, and uptime all connect without touching your code. Add the adapter when you want your own users, numbers, actions, or service health next to them.

What frameworks does it support?

It uses only Web Crypto and has no dependencies, so it runs on Cloudflare Workers, Node 18 and up, Vercel, Netlify, Deno, and Convex. The guide has Next.js, Hono, and Convex examples.

Can secrets or personal data leak through it?

Only fields you declare leave your app. A field named like a password, token, or API key stops the adapter from starting unless you allow that one field, and you choose whether emails and names go out in full, masked, or not at all.

Is the health endpoint public?

Yes, so the uptime check can read it without a secret. It shows only each service's name and whether it is up. Error messages stay in your logs.

Does the adapter count pageviews?

No. Pageviews come from a separate one-line tag that LopeBase serves. The adapter reports signups from your database, and the two together show which pages bring signups.

Put your own product next to everything else.

Free for one product. No card.