Recognize returning browsers.
A first-party cookie remembers each browser. A short history helps assess possible connections when signals change or the cookie disappears.
What is collected →Remember browsers. Connect people and agents to the accounts they use. Add that context to PostHog or Mixpanel, with optional Jev scoring to help you understand unfamiliar activity.
Runs in your app. Uses your database. AI is optional.
Doorman 0.13 is available on npm and Hex.Add it to your app →
Install the packages, connect your database and add one endpoint. Doorman creates its tables automatically. No migration commands, dashboard or separate service.
import { createDoormanClient } from "@aarondovturkel/doorman-browser";
const visitor = createDoormanClient({
endpoint: "/api/visitor",
});
const identity = await visitor.identify();
// { visitorId, sessionId, isReturning }
// Scores stay on your server.
// Destroy the client when collection should stop.
visitor.destroy();import { createDoorman }
from "@aarondovturkel/doorman-adapters/cloudflare";
let visitor: ReturnType<typeof createDoorman> | undefined;
export default {
async fetch(request, env) {
visitor ??= createDoorman({
db: env.VISITORS,
secret: env.DOORMAN_IDENTITY_SECRET,
namespace: "my-app",
});
return visitor.handle(request);
},
};import { createDoorman }
from "@aarondovturkel/doorman-adapters/vercel";
const visitor = createDoorman({
db, // Your Postgres pool.
secret: process.env.DOORMAN_IDENTITY_SECRET!,
namespace: "my-app",
evaluator: false, // Add Jev later.
});
export async function POST(request: Request) {
return visitor.handle(request);
}import { createDoorman }
from "@aarondovturkel/doorman-adapters/node";
const visitor = createDoorman({
db, // Any compatible Postgres pool.
secret: process.env.DOORMAN_IDENTITY_SECRET!,
namespace: "my-app",
evaluator: false, // Add Jev later.
});
// Standard Web Request / Response.
const response = await visitor.handle(request);
// Maintenance runs on your schedule.
await visitor.cleanup();# Native Elixir · your existing Ecto repo
doorman = Doorman.new(
repo: MyApp.Repo,
secret: System.fetch_env!("DOORMAN_IDENTITY_SECRET"),
namespace: "my-app"
)
# Your Phoenix controller
Doorman.handle(conn, doorman, %{
auth: %{user_id: to_string(current_user.id)}
})
# Private context is in conn.assigns.import { createDoormanClient } from "@aarondovturkel/doorman-browser";
const doorman = createDoormanClient({
endpoint: "/api/visitor",
analytics: { posthog, mixpanel }, // Initialized SDKs.
});
await doorman.identify();
// After your app verifies login:
await doorman.identify({ userId: user.id, accountId: account.id });
await doorman.update({ plan: "team" });
// Optional: forwards to both configured SDKs.
// Or keep posthog.capture() / mixpanel.track().
// Use one path per event per destination to avoid duplicates.
await doorman.track("Project created");
// On logout:
await doorman.reset();A login tells you which account is open. Doorman keeps track of the browsers, signed-in people and authenticated agents using it.
When you need an estimate, Jev can score whether activity looks human, assistant-operated or scripted. A guess stays separate from a verified identity.
Explore agent classificationA first-party cookie remembers each browser. A short history helps assess possible connections when signals change or the cookie disappears.
What is collected →Pass the user your server has authenticated. Doorman remembers that browser relationship without confusing a shared account with a single person.
Connect your login →Call identify once through Doorman. PostHog and Mixpanel keep their existing funnels and gain browser, session and account properties on events.
Connect your analytics →Activity labels are experimental. They do not reliably identify an agent’s brand or count people sharing one login. Read the results and limits →
Doorman gives a browser a random visitor ID and saves a small history of its signals, such as screen size and browser family.
A first-party cookie remembers that ID. If it disappears, Doorman compares the next visit with past observations. The recommended flow keeps a possible match private and gives the browser a fresh ID.
Understand browser matchingTry browser matching with made-up data. This experiment enables ID recovery to show the matcher’s behavior. The recommended API keeps cookie-less matches private and issues a fresh ID. No real signals are collected.
Synthetic signals only.
No browser data is collected.
Starting the local matching engine.
// Run a scenario to inspect the response.Each option starts from the same example history. All except “Return with cookie” remove the cookie first. The scores shown here normally stay on your server; they demonstrate the matching rules, not real-world accuracy. How matching works ↗
Jev is an AI model from TypeSafe. It compares browser history and scores automation and suspicious signals. With enough activity, it also estimates whether a human, assistant or script is operating the browser.
Use those estimates to inform your own checks, such as when to request a CAPTCHA. Doorman returns information; your app decides what happens next.
Meet Jev and the scoresOptional cross-device matching compares anonymous visits with earlier sessions confirmed by login. A suggestion stays private; only a real login connects that person to your analytics. Enable cross-device suggestions →
sameVisitorautomationsuspiciousScores are experimental estimates. Missing signals alone do not mean abuse.
Two people can share a laptop. One person can use a laptop and a phone. An AI assistant can act with that person’s permission.
After your app verifies a login or agent credential, Doorman can connect those visits to a known identity. It records who is making a request and whose account they are using.
Learn the few terms you’ll needHere your app has already verified who is making the request. Try the optional permission checks below. These are sample credentials, not predictions about who is using your browser.
Example people and credentials.Real permission checks.Runs in your browser.
Enable JavaScript to run the local scenarios.
In an application, your login system verifies these identities. Doorman checks the permission you recorded; it does not guess who is at the keyboard.Understand people and agents ↗
Keep your analytics. Let Doorman handle identification. Connect it to your existing login and logout flow, then keep using PostHog or Mixpanel as usual. You do not need to identify through both SDKs.
Build funnels for signed-in users, group activity by account, and count verified agents separately from people. Send private activity estimates from your server when you want to explore uncertain cases.
Connect your analyticsAgents can also use your API directly. Add optionalAPI activity middleware to bring those requests into the picture, with private Jev risk assessments.
Illustrative data. Your app supplies verified identities.
Doorman stores history in your database. If you enable Jev, a compact set of signals goes to your chosen AI provider. Doorman respects browser privacy restrictions and never captures form values, actual keystrokes or browsing history.
Risk scores stay on your server by default. Doorman does not replace login, prove who is at the keyboard, or automatically block anyone.
See exactly what is collectedRun a local example, see a returning browser, then add private activity scores and analytics context as your application needs them.
Get startedExplore the source on GitHub ↗