# hypercerts-org/certified-app architecture

> Architecture diagram of the GitHub repository hypercerts-org/certified-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hypercerts-org/certified-app
- Repository: https://github.com/hypercerts-org/certified-app

## Overview

Certified is a passwordless AT Protocol identity platform: users authenticate, manage a portable identity and profile, and use that identity across partner apps. The repository also exposes social discovery, endorsements, activity/context records, group management, and an indexer proxy. The README documents the signup-to-PDS flow; sampled routes and source-index references support the specific authentication, resolution, and proxy relationships shown. Other feature branches are represented from the route and component tree, without inferring unsampled call chains.

Main entry points: [`src/lib/auth/oauth-client.ts`](https://github.com/hypercerts-org/certified-app/blob/main/src/lib/auth/oauth-client.ts) (OAuth client), [`src/lib/auth/session.ts`](https://github.com/hypercerts-org/certified-app/blob/main/src/lib/auth/session.ts) (Signed sessions), [`src/app/api/xrpc/[...method]/route.ts`](https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/xrpc/%5B...method%5D/route.ts) (XRPC proxy), [`src/app/api/auth/login/route.ts`](https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/auth/login/route.ts) (OAuth routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and auth"]
  node_welcome["Welcome and onboarding<br/>[page.tsx]"]
  node_auth_routes["OAuth routes<br/>[route.ts]"]
  node_oauth["OAuth client<br/>[oauth-client.ts]"]
  node_session["Signed sessions<br/>[session.ts]"]
  node_redis[("Redis auth stores<br/>[stores.ts]")]
  node_profile_ui["Profile dashboard<br/>[page.tsx]"]
  node_settings["Account settings<br/>[page.tsx]"]
end

subgraph group_protocol["AT Protocol services"]
  node_xrpc["XRPC proxy<br/>[route.ts]"]
  node_did_resolution["DID resolution<br/>[resolve-core.ts]"]
  node_did_route["Resolution routes<br/>[route.ts]"]
  node_atproto_identity["AT identity utilities<br/>[did.ts]"]
  node_profile_records["Profile records<br/>[profile.ts]"]
  node_indexer_proxy["Indexer API<br/>[route.ts]"]
  node_indexer_operations["Indexer operations<br/>[operations.ts]"]
  node_indexer_variables["Indexer variables<br/>[variables.ts]"]
  node_context_records["Context attachments"]
  node_activity_uri["Activity references<br/>[activity-uri.ts]"]
end

subgraph group_social["Social features"]
  node_search["Global search<br/>[global-search.tsx]"]
  node_explore["Explore<br/>[explore.tsx]"]
  node_endorsements["Endorsements<br/>[page.tsx]"]
  node_context_updates["Context updates"]
end

subgraph group_groups["Group management"]
  node_groups_ui["Group management<br/>[page.tsx]"]
  node_group_account["Group account controls"]
  node_group_api["Group API<br/>[account.ts]"]
end

node_user(("User"))
node_partner["Partner apps"]

node_user -->|"starts signup"| node_welcome
node_welcome -.->|"begins sign-in"| node_auth_routes
node_auth_routes -->|"authorizes"| node_oauth
node_auth_routes -->|"checks session"| node_session
node_oauth -->|"stores OAuth state"| node_redis
node_session -->|"stores sessions"| node_redis
node_oauth -->|"enables app identity"| node_partner
node_user -->|"manages identity"| node_profile_ui
node_profile_ui -.->|"uses profile data"| node_profile_records
node_user -->|"manages account"| node_settings
node_xrpc -->|"restores OAuth session"| node_oauth
node_xrpc -->|"checks identity"| node_session
node_xrpc -->|"resolves PDS"| node_atproto_identity
node_did_route -->|"resolves DID"| node_did_resolution
node_did_route -->|"checks session"| node_session
node_did_resolution -->|"uses DID utilities"| node_atproto_identity
node_did_resolution -->|"loads profile"| node_profile_records
node_indexer_proxy -->|"selects operations"| node_indexer_operations
node_indexer_proxy -->|"builds variables"| node_indexer_variables
node_search -.->|"discovers content"| node_explore
node_user -.->|"views endorsements"| node_endorsements
node_context_updates -->|"uses attachments"| node_context_records
node_context_updates -->|"uses activity references"| node_activity_uri
node_groups_ui -.->|"manages group account"| node_group_account
node_group_account -->|"updates account"| node_group_api

click node_welcome "https://github.com/hypercerts-org/certified-app/blob/main/src/app/welcome/page.tsx"
click node_auth_routes "https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/auth/login/route.ts"
click node_oauth "https://github.com/hypercerts-org/certified-app/blob/main/src/lib/auth/oauth-client.ts"
click node_session "https://github.com/hypercerts-org/certified-app/blob/main/src/lib/auth/session.ts"
click node_redis "https://github.com/hypercerts-org/certified-app/blob/main/src/lib/auth/stores.ts"
click node_profile_ui "https://github.com/hypercerts-org/certified-app/blob/main/src/app/profile/page.tsx"
click node_settings "https://github.com/hypercerts-org/certified-app/blob/main/src/app/settings/page.tsx"
click node_xrpc "https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/xrpc/%5B...method%5D/route.ts"
click node_did_resolution "https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/resolve-did/resolve-core.ts"
click node_did_route "https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/resolve-did/route.ts"
click node_atproto_identity "https://github.com/hypercerts-org/certified-app/blob/main/src/lib/atproto/did.ts"
click node_profile_records "https://github.com/hypercerts-org/certified-app/blob/main/src/lib/atproto/profile.ts"
click node_indexer_proxy "https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/indexer/route.ts"
click node_indexer_operations "https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/indexer/operations.ts"
click node_indexer_variables "https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/indexer/variables.ts"
click node_search "https://github.com/hypercerts-org/certified-app/blob/main/src/components/search/global-search.tsx"
click node_explore "https://github.com/hypercerts-org/certified-app/blob/main/src/components/explore-page/explore.tsx"
click node_endorsements "https://github.com/hypercerts-org/certified-app/blob/main/src/app/endorsements/page.tsx"
click node_context_updates "https://github.com/hypercerts-org/certified-app/blob/main/src/components/context/context-updates.tsx"
click node_context_records "https://github.com/hypercerts-org/certified-app/blob/main/src/lib/atproto/context-attachment.ts"
click node_activity_uri "https://github.com/hypercerts-org/certified-app/blob/main/src/lib/atproto/activity-uri.ts"
click node_groups_ui "https://github.com/hypercerts-org/certified-app/blob/main/src/app/groups/page.tsx"
click node_group_account "https://github.com/hypercerts-org/certified-app/blob/main/src/components/groups/group-account-manager.tsx"
click node_group_api "https://github.com/hypercerts-org/certified-app/blob/main/src/lib/groups/account.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_welcome,node_auth_routes,node_oauth,node_session,node_redis,node_profile_ui,node_settings,node_user toneBlue
class node_xrpc,node_did_resolution,node_did_route,node_atproto_identity,node_profile_records,node_indexer_proxy,node_indexer_operations,node_indexer_variables,node_context_records,node_activity_uri toneAmber
class node_search,node_explore,node_endorsements,node_context_updates toneMint
class node_groups_ui,node_group_account,node_group_api toneRose
class node_partner toneIndigo
```

## Components

### Identity and auth

- [Welcome and onboarding](https://github.com/hypercerts-org/certified-app/blob/main/src/app/welcome/page.tsx): `src/app/welcome/page.tsx`
- [OAuth routes](https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/auth/login/route.ts): `src/app/api/auth/login/route.ts`
- [OAuth client](https://github.com/hypercerts-org/certified-app/blob/main/src/lib/auth/oauth-client.ts): `src/lib/auth/oauth-client.ts`
- [Signed sessions](https://github.com/hypercerts-org/certified-app/blob/main/src/lib/auth/session.ts): `src/lib/auth/session.ts`
- [Redis auth stores](https://github.com/hypercerts-org/certified-app/blob/main/src/lib/auth/stores.ts): `src/lib/auth/stores.ts`
- [Profile dashboard](https://github.com/hypercerts-org/certified-app/blob/main/src/app/profile/page.tsx): `src/app/profile/page.tsx`
- [Account settings](https://github.com/hypercerts-org/certified-app/blob/main/src/app/settings/page.tsx): `src/app/settings/page.tsx`

### AT Protocol services

- [XRPC proxy](https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/xrpc/%5B...method%5D/route.ts): `src/app/api/xrpc/[...method]/route.ts`
- [DID resolution](https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/resolve-did/resolve-core.ts): `src/app/api/resolve-did/resolve-core.ts`
- [Resolution routes](https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/resolve-did/route.ts): `src/app/api/resolve-did/route.ts`
- [AT identity utilities](https://github.com/hypercerts-org/certified-app/blob/main/src/lib/atproto/did.ts): `src/lib/atproto/did.ts`
- [Profile records](https://github.com/hypercerts-org/certified-app/blob/main/src/lib/atproto/profile.ts): `src/lib/atproto/profile.ts`
- [Indexer API](https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/indexer/route.ts): `src/app/api/indexer/route.ts`
- [Indexer operations](https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/indexer/operations.ts): `src/app/api/indexer/operations.ts`
- [Indexer variables](https://github.com/hypercerts-org/certified-app/blob/main/src/app/api/indexer/variables.ts): `src/app/api/indexer/variables.ts`
- [Context attachments](https://github.com/hypercerts-org/certified-app/blob/main/src/lib/atproto/context-attachment.ts): `src/lib/atproto/context-attachment.ts`
- [Activity references](https://github.com/hypercerts-org/certified-app/blob/main/src/lib/atproto/activity-uri.ts): `src/lib/atproto/activity-uri.ts`

### Social features

- [Global search](https://github.com/hypercerts-org/certified-app/blob/main/src/components/search/global-search.tsx): `src/components/search/global-search.tsx`
- [Explore](https://github.com/hypercerts-org/certified-app/blob/main/src/components/explore-page/explore.tsx): `src/components/explore-page/explore.tsx`
- [Endorsements](https://github.com/hypercerts-org/certified-app/blob/main/src/app/endorsements/page.tsx): `src/app/endorsements/page.tsx`
- [Context updates](https://github.com/hypercerts-org/certified-app/blob/main/src/components/context/context-updates.tsx): `src/components/context/context-updates.tsx`

### Group management

- [Group management](https://github.com/hypercerts-org/certified-app/blob/main/src/app/groups/page.tsx): `src/app/groups/page.tsx`
- [Group account controls](https://github.com/hypercerts-org/certified-app/blob/main/src/components/groups/group-account-manager.tsx): `src/components/groups/group-account-manager.tsx`
- [Group API](https://github.com/hypercerts-org/certified-app/blob/main/src/lib/groups/account.ts): `src/lib/groups/account.ts`

### Other components

- **User**
- **Partner apps**

## Connections

- User → Welcome and onboarding: starts signup (evidence: `README.md`)
- Welcome and onboarding → OAuth routes: begins sign-in
- OAuth routes → OAuth client: authorizes (evidence: `src/app/api/auth/login/route.ts`)
- OAuth routes → Signed sessions: checks session (evidence: `src/app/api/auth/login/route.ts`)
- OAuth client → Redis auth stores: stores OAuth state (evidence: `src/lib/auth/oauth-client.ts`)
- Signed sessions → Redis auth stores: stores sessions (evidence: `src/lib/auth/session.ts`)
- OAuth client → Partner apps: enables app identity (evidence: `README.md`)
- User → Profile dashboard: manages identity (evidence: `README.md`)
- Profile dashboard → Profile records: uses profile data
- User → Account settings: manages account (evidence: `README.md`)
- XRPC proxy → OAuth client: restores OAuth session (evidence: `src/app/api/xrpc/[...method]/route.ts`)
- XRPC proxy → Signed sessions: checks identity (evidence: `src/app/api/xrpc/[...method]/route.ts`)
- XRPC proxy → AT identity utilities: resolves PDS (evidence: `src/app/api/xrpc/[...method]/route.ts`)
- Resolution routes → DID resolution: resolves DID (evidence: `src/app/api/resolve-did/route.ts`)
- Resolution routes → Signed sessions: checks session (evidence: `src/app/api/resolve-did/route.ts`)
- DID resolution → AT identity utilities: uses DID utilities (evidence: `src/app/api/resolve-did/resolve-core.ts`)
- DID resolution → Profile records: loads profile (evidence: `src/app/api/resolve-did/resolve-core.ts`)
- Indexer API → Indexer operations: selects operations (evidence: `src/app/api/indexer/route.ts`)
- Indexer API → Indexer variables: builds variables (evidence: `src/app/api/indexer/route.ts`)
- Global search → Explore: discovers content
- User → Endorsements: views endorsements
- Context updates → Context attachments: uses attachments (evidence: `src/components/context/context-updates.tsx`)
- Context updates → Activity references: uses activity references (evidence: `src/components/context/context-updates.tsx`)
- Group management → Group account controls: manages group account
- Group account controls → Group API: updates account (evidence: `src/components/groups/group-account-manager.tsx`)
