Identity and AI platform
OneLifeVibe: one account for a network of sites
One account across a network of independent websites, with a gateway that lets AI assistants act on a person's behalf.
Live: onelifevibe.com

The problem
I run a family of independent products: giving, family organising, job loss support, AI debate, stories, astrology and more. Each one has its own database, deploy and brand. People should not need a separate account for each, and AI assistants should be able to work across them without a pile of separate integrations.
What I built
- Single sign-on for every site. One OpenID Connect identity provider (Keycloak) with a shared "Sign in with OneLifeVibe" module that every site embeds. Sites keep their own users table and link it to the shared identity.
- An MCP gateway for AI assistants. A single Model Context Protocol endpoint exposes tools from every site. Assistants connect with OAuth, and the gateway swaps their token for a site-scoped one (RFC 8693 token exchange) before calling a site.
- OneLifeVibe Connect. A connector per site, installable in PersonalAgent and other apps, with two-way events. Sites publish events such as "a gift was received" and subscribers get signed deliveries with retries.
- Discovery for agents. llms.txt, an MCP server card, Agent Skills discovery files and read-only WebMCP tools on the hub pages, so assistants can find what is available without scraping.
- MCP Apps. Tools can return an interactive panel that renders inside the assistant, built as one self-contained view with no network access of its own.
- Connected apps page. People can see and revoke every app that has access to their account. Revoking is enforced at the gateway.
Architecture
People sign in to each site through the identity provider over OpenID Connect. The gateway uses the same provider to exchange the assistant's token before it calls a site.

Decisions and trade-offs
- JWT verification with WebCrypto only. RS256, PS256 and ES256 are verified inside the Worker with no third-party crypto library. There is more code to own, and nothing to track upstream.
- Sites keep their own users. Each site links to the shared identity rather than moving its users into one table. Sites stay independent and a site can be changed or retired without touching the others.
- Signed events, both directions. HMAC for site-to-hub and ES256 for hub-to-subscriber, with a short replay window. Sites write to a local outbox first, so an event is never lost if the hub is briefly unreachable.
- Same kit everywhere. The connector kit ships in TypeScript and PHP and is kept byte-identical across sites, checked by hash.
- Fail closed. If an app is revoked or uninstalled the gateway refuses the call, even on paths that skip the newer checks.
- Prove it end to end. A cross-repo test runs the hub and a subscriber in one process, and live probes walk the full link, install, call and revoke journey in production. Security headers and CSP are set at the edge on every response.
What it shows about how I lead
This is a platform with customers: the sites. I treated the identity layer and the gateway the way a platform team does, with a stable contract, a shared kit, tests that cross repositories and a revoke path that fails closed. The security decisions favour a safe default over convenience.
Stack
Cloudflare Workers, D1 and KV · Keycloak (OIDC, dynamic client registration with a trusted host list) · Model Context Protocol · TypeScript, JavaScript and PHP · Node test runner and Playwright