# bnlucas/bump architecture

> Architecture diagram of the GitHub repository bnlucas/bump, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bnlucas/bump
- Repository: https://github.com/bnlucas/bump

## Overview

Bump is a mobile-first dating and community app. A user signs up or signs in, completes a consent-gated profile, discovers people and swipes; an allowed connection opens a Herald chat. Communities provides a parallel consent- and topic-filtered feed with posts, comments, and likes. Profile preferences and affinities support matching. The map follows documented routes and storage responsibilities; unsampled route wiring is omitted where its caller is not established.

Main entry points: [`src/lib/simbee.ts`](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/simbee.ts) (Simbee client), [`src/app/(tabs)/communities/feed.tsx`](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/(tabs)/communities/feed.tsx) (Communities feed), [`src/app/(tabs)/profile/profile-editor.tsx`](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/(tabs)/profile/profile-editor.tsx) (Profile editor), [`src/lib/match.ts`](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/match.ts) (Matching and consent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_auth_ui["Auth form<br/>[auth-form.tsx]"]
  node_onboarding_ui["Onboarding<br/>[flow.tsx]"]
  node_discover_ui["Discover deck<br/>[swipe-deck.tsx]"]
  node_chat_ui["Chat room<br/>[chat-room.tsx]"]
  node_communities_ui["Communities feed<br/>[feed.tsx]"]
  node_profile_ui["Profile editor<br/>[profile-editor.tsx]"]
end

subgraph group_api["API routes"]
  node_auth_routes["Auth routes<br/>[route.ts]"]
  node_profile_route["Profile route<br/>[route.ts]"]
  node_preferences_route["Preferences route<br/>[route.ts]"]
  node_swipe_route["Swipe route<br/>[route.ts]"]
  node_posts_route["Posts route<br/>[route.ts]"]
  node_comments_route["Comments route<br/>[route.ts]"]
  node_photo_route["Photo route<br/>[route.ts]"]
  node_notify_route["DM notify route<br/>[route.ts]"]
end

subgraph group_domain["Domain logic"]
  node_match_logic["Matching and consent<br/>[match.ts]"]
  node_profile_logic["Profile logic<br/>[profile.ts]"]
  node_post_logic["Post logic<br/>[posts.ts]"]
  node_photo_logic["Photo logic<br/>[photos.ts]"]
  node_notify_logic["Notification logic<br/>[notifications.ts]"]
end

subgraph group_platforms["Backend platforms"]
  node_sigil["Sigil identity<br/>[sigil.ts]"]
  node_simbee_client["Simbee client<br/>[simbee.ts]"]
  node_shroudb["ShrouDB storage<br/>[shroudb.ts]"]
  node_herald["Herald messaging<br/>[herald-admin.ts]"]
  node_courier["ShrouDB courier<br/>[notifications.ts]"]
end

subgraph group_state["App state"]
  node_context_logic["Active context<br/>[context.ts]"]
end

node_user(("User"))

node_user -->|"uses"| node_auth_ui
node_user -->|"discovers"| node_discover_ui
node_user -->|"browses"| node_communities_ui
node_user -->|"edits"| node_profile_ui
node_auth_ui -->|"submits credentials"| node_auth_routes
node_auth_routes -->|"creates sessions"| node_sigil
node_auth_routes -->|"creates user"| node_simbee_client
node_onboarding_ui -->|"updates profile"| node_profile_route
node_profile_ui -->|"loads and saves"| node_profile_route
node_profile_ui -->|"saves preferences"| node_preferences_route
node_profile_route -->|"delegates"| node_profile_logic
node_profile_logic -->|"updates envelope"| node_sigil
node_profile_logic -->|"updates traits"| node_simbee_client
node_preferences_route -->|"reads and writes"| node_simbee_client
node_discover_ui -->|"sets active context"| node_context_logic
node_communities_ui -->|"shares context"| node_context_logic
node_discover_ui -->|"submits swipe"| node_swipe_route
node_swipe_route -->|"records and opens"| node_match_logic
node_match_logic -->|"checks consent and matches"| node_simbee_client
node_match_logic -->|"opens stream"| node_herald
node_chat_ui -->|"realtime messaging"| node_herald
node_communities_ui -->|"loads and creates posts"| node_posts_route
node_communities_ui -->|"loads and creates comments"| node_comments_route
node_posts_route -->|"delegates"| node_post_logic
node_comments_route -->|"delegates"| node_post_logic
node_post_logic -->|"stores content metadata"| node_simbee_client
node_post_logic -->|"stores post bodies"| node_shroudb
node_communities_ui -.->|"likes posts"| node_simbee_client
node_profile_ui -->|"manages photos"| node_photo_route
node_photo_route -->|"delegates"| node_photo_logic
node_photo_logic -->|"stores photo blobs"| node_shroudb
node_notify_route -->|"checks membership and presence"| node_herald
node_notify_route -->|"checks permission"| node_match_logic
node_notify_route -->|"requests delivery"| node_notify_logic
node_notify_logic -->|"sends notification"| node_courier

click node_auth_ui "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/auth/auth-form.tsx"
click node_onboarding_ui "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/onboarding/flow.tsx"
click node_discover_ui "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/(tabs)/discover/swipe-deck.tsx"
click node_chat_ui "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/(tabs)/chat/%5BstreamId%5D/chat-room.tsx"
click node_communities_ui "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/(tabs)/communities/feed.tsx"
click node_profile_ui "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/(tabs)/profile/profile-editor.tsx"
click node_auth_routes "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/auth/signup/route.ts"
click node_profile_route "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/profile/me/route.ts"
click node_preferences_route "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/profile/preferences/route.ts"
click node_swipe_route "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/discover/swipe/route.ts"
click node_posts_route "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/communities/posts/route.ts"
click node_comments_route "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/communities/comments/route.ts"
click node_photo_route "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/profile/photos/route.ts"
click node_notify_route "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/notify/dm/route.ts"
click node_match_logic "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/match.ts"
click node_profile_logic "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/profile.ts"
click node_post_logic "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/posts.ts"
click node_photo_logic "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/photos.ts"
click node_notify_logic "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/notifications.ts"
click node_context_logic "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/context.ts"
click node_sigil "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/sigil.ts"
click node_simbee_client "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/simbee.ts"
click node_shroudb "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/shroudb.ts"
click node_herald "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/herald-admin.ts"
click node_courier "https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/notifications.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_auth_ui,node_onboarding_ui,node_discover_ui,node_chat_ui,node_communities_ui,node_profile_ui,node_user toneBlue
class node_auth_routes,node_profile_route,node_preferences_route,node_swipe_route,node_posts_route,node_comments_route,node_photo_route,node_notify_route toneAmber
class node_match_logic,node_profile_logic,node_post_logic,node_photo_logic,node_notify_logic toneMint
class node_sigil,node_simbee_client,node_shroudb,node_herald,node_courier toneRose
class node_context_logic toneIndigo
```

## Components

### App experience

- [Auth form](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/auth/auth-form.tsx): `src/app/auth/auth-form.tsx`
- [Onboarding](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/onboarding/flow.tsx): `src/app/onboarding/flow.tsx`
- [Discover deck](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/(tabs)/discover/swipe-deck.tsx): `src/app/(tabs)/discover/swipe-deck.tsx`
- [Chat room](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/(tabs)/chat/%5BstreamId%5D/chat-room.tsx): `src/app/(tabs)/chat/[streamId]/chat-room.tsx`
- [Communities feed](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/(tabs)/communities/feed.tsx): `src/app/(tabs)/communities/feed.tsx`
- [Profile editor](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/(tabs)/profile/profile-editor.tsx): `src/app/(tabs)/profile/profile-editor.tsx`

### API routes

- [Auth routes](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/auth/signup/route.ts): `src/app/api/auth/signup/route.ts`
- [Profile route](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/profile/me/route.ts): `src/app/api/profile/me/route.ts`
- [Preferences route](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/profile/preferences/route.ts): `src/app/api/profile/preferences/route.ts`
- [Swipe route](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/discover/swipe/route.ts): `src/app/api/discover/swipe/route.ts`
- [Posts route](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/communities/posts/route.ts): `src/app/api/communities/posts/route.ts`
- [Comments route](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/communities/comments/route.ts): `src/app/api/communities/comments/route.ts`
- [Photo route](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/profile/photos/route.ts): `src/app/api/profile/photos/route.ts`
- [DM notify route](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/app/api/notify/dm/route.ts): `src/app/api/notify/dm/route.ts`

### Domain logic

- [Matching and consent](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/match.ts): `src/lib/match.ts`
- [Profile logic](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/profile.ts): `src/lib/profile.ts`
- [Post logic](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/posts.ts): `src/lib/posts.ts`
- [Photo logic](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/photos.ts): `src/lib/photos.ts`
- [Notification logic](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/notifications.ts): `src/lib/notifications.ts`

### Backend platforms

- [Sigil identity](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/sigil.ts): `src/lib/sigil.ts`
- [Simbee client](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/simbee.ts): `src/lib/simbee.ts`
- [ShrouDB storage](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/shroudb.ts): `src/lib/shroudb.ts`
- [Herald messaging](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/herald-admin.ts): `src/lib/herald-admin.ts`
- [ShrouDB courier](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/notifications.ts): `src/lib/notifications.ts`

### App state

- [Active context](https://github.com/bnlucas/bump/blob/claude/mobile-dating-community-app-bBgPC/src/lib/context.ts): `src/lib/context.ts`

### Other components

- **User**

## Connections

- User → Auth form: uses
- User → Discover deck: discovers
- User → Communities feed: browses
- User → Profile editor: edits
- Auth form → Auth routes: submits credentials
- Auth routes → Sigil identity: creates sessions
- Auth routes → Simbee client: creates user
- Onboarding → Profile route: updates profile
- Profile editor → Profile route: loads and saves
- Profile editor → Preferences route: saves preferences
- Profile route → Profile logic: delegates
- Profile logic → Sigil identity: updates envelope
- Profile logic → Simbee client: updates traits
- Preferences route → Simbee client: reads and writes
- Discover deck → Active context: sets active context
- Communities feed → Active context: shares context
- Discover deck → Swipe route: submits swipe
- Swipe route → Matching and consent: records and opens
- Matching and consent → Simbee client: checks consent and matches
- Matching and consent → Herald messaging: opens stream
- Chat room → Herald messaging: realtime messaging
- Communities feed → Posts route: loads and creates posts
- Communities feed → Comments route: loads and creates comments
- Posts route → Post logic: delegates
- Comments route → Post logic: delegates
- Post logic → Simbee client: stores content metadata
- Post logic → ShrouDB storage: stores post bodies
- Communities feed → Simbee client: likes posts
- Profile editor → Photo route: manages photos
- Photo route → Photo logic: delegates
- Photo logic → ShrouDB storage: stores photo blobs
- DM notify route → Herald messaging: checks membership and presence
- DM notify route → Matching and consent: checks permission
- DM notify route → Notification logic: requests delivery
- Notification logic → ShrouDB courier: sends notification
