# isthisthelastone/money_nerds architecture

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

- Interactive diagram: https://gitdiagram.com/isthisthelastone/money_nerds
- Repository: https://github.com/isthisthelastone/money_nerds

## Overview

Money Nerds is a public community board for posts, replies, profiles, and direct support; visitors can browse without signing in. The main flow is: a person signs in, publishes a post with optional media and funding routes, and supporters send funds directly to the chosen recipient; verified transfers appear in activity and totals. The map separates authentication, community content, media, funding, and public discovery. README documents several integrations and capabilities whose exact runtime wiring was not sampled, so those links are omitted or marked unverified rather than inferred.

Main entry points: [`src/lib/auth/server.ts`](https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/auth/server.ts) (Session and profile sync), [`src/app/api/posts/route.ts`](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/posts/route.ts) (Post routes), [`src/app/api/comments/route.ts`](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/comments/route.ts) (Comment routes), [`src/components/features/Composer.tsx`](https://github.com/isthisthelastone/money_nerds/blob/main/src/components/features/Composer.tsx) (Post composer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and profiles"]
  node_sign_in["Sign-in experience"]
  node_auth_api["Authentication routes"]
  node_auth_server["Session and profile sync<br/>[server.ts]"]
  node_identity_link["External identity flows<br/>[external.ts]"]
  node_profile_pages["Public profile pages<br/>[page.tsx]"]
end

subgraph group_community["Community content"]
  node_board_ui["Board and post views<br/>[page.tsx]"]
  node_post_page["Post detail<br/>[page.tsx]"]
  node_composer["Post composer<br/>[Composer.tsx]"]
  node_posts_api["Post routes<br/>[route.ts]"]
  node_comments_api["Comment routes<br/>[route.ts]"]
  node_engagement_api["Likes and views<br/>[route.ts]"]
  node_data_store[("Supabase application data<br/>[admin.ts]")]
end

subgraph group_media["Media attachments"]
  node_media_ui["Media playback"]
  node_media_recording["Media recording<br/>[recording.ts]"]
  node_media_api["Media signing and validation<br/>[server.ts]"]
  node_media_store[("Supabase media storage<br/>[admin.ts]")]
end

subgraph group_funding["Funding and payouts"]
  node_funding_editor["Funding route editor"]
  node_funding_options["Funding route rules<br/>[options.ts]"]
  node_donate_ui["Donation experience<br/>[DonateButton.tsx]"]
  node_intent_api["Funding intents<br/>[route.ts]"]
  node_donation_api["Transfer verification<br/>[route.ts]"]
  node_payout_rules["Payout normalization<br/>[payouts.ts]"]
  node_funding_server["Funding route resolution<br/>[server.ts]"]
end

subgraph group_discovery["Public discovery"]
  node_public_pages["Guides and information<br/>[page.tsx]"]
  node_feed_route["RSS feed<br/>[route.ts]"]
  node_llms_route["LLM summaries<br/>[route.ts]"]
  node_public_store[("Public Supabase reads<br/>[public.ts]")]
end

node_person(("Visitor or member"))
node_solana_rpc["Solana network"]
node_supabase[("Supabase")]
node_clerk["Clerk"]
node_direct_wallets["Recipient wallets"]

node_person -->|"signs in"| node_sign_in
node_sign_in -.->|"starts auth"| node_auth_api
node_auth_api -->|"handles external auth"| node_identity_link
node_auth_api -->|"resolves session"| node_auth_server
node_auth_server -->|"syncs profiles"| node_supabase
node_auth_server -->|"reads identity"| node_clerk
node_person -->|"browses"| node_board_ui
node_person -->|"writes post"| node_composer
node_composer -.->|"submits post"| node_posts_api
node_posts_api -->|"requires session"| node_auth_server
node_posts_api -->|"validates attachments"| node_media_api
node_posts_api -->|"parses routes"| node_funding_options
node_posts_api -->|"writes posts"| node_data_store
node_person -->|"opens post"| node_post_page
node_post_page -.->|"loads replies"| node_comments_api
node_person -->|"replies"| node_comments_api
node_comments_api -->|"requires session"| node_auth_server
node_comments_api -->|"validates attachments"| node_media_api
node_comments_api -->|"writes comments"| node_data_store
node_person -->|"likes or views"| node_engagement_api
node_engagement_api -->|"requires session"| node_auth_server
node_engagement_api -->|"updates activity"| node_data_store
node_composer -->|"records media"| node_media_recording
node_composer -->|"configures routes"| node_funding_editor
node_media_ui -->|"plays attachments"| node_person
node_media_api -->|"stages uploads"| node_media_store
node_media_api -->|"uses storage"| node_supabase
node_funding_editor -->|"validates options"| node_funding_options
node_funding_options -->|"normalizes routes"| node_payout_rules
node_donate_ui -.->|"requests intent"| node_intent_api
node_intent_api -->|"resolves recipient"| node_funding_server
node_intent_api -->|"checks payout route"| node_payout_rules
node_person -->|"sends directly"| node_direct_wallets
node_donate_ui -.->|"submits transaction"| node_donation_api
node_donation_api -->|"verifies transfer"| node_solana_rpc
node_donation_api -->|"checks recipient"| node_payout_rules
node_donation_api -->|"records verified donation"| node_data_store
node_profile_pages -.->|"shows payout routes"| node_funding_server
node_funding_server -->|"loads routes"| node_supabase
node_person -->|"reads guidance"| node_public_pages
node_feed_route -->|"reads feed data"| node_public_store
node_public_store -->|"queries public data"| node_supabase
node_person -->|"subscribes"| node_feed_route
node_person -->|"reads summaries"| node_llms_route

click node_sign_in "https://github.com/isthisthelastone/money_nerds/blob/main/src/components/auth/SignInExperience.tsx"
click node_auth_api "https://github.com/isthisthelastone/money_nerds/tree/main/src/app/api/auth"
click node_auth_server "https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/auth/server.ts"
click node_identity_link "https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/auth/external.ts"
click node_profile_pages "https://github.com/isthisthelastone/money_nerds/blob/main/src/app/u/%5Bwallet%5D/page.tsx"
click node_board_ui "https://github.com/isthisthelastone/money_nerds/blob/main/src/app/page.tsx"
click node_post_page "https://github.com/isthisthelastone/money_nerds/blob/main/src/app/p/%5Bid%5D/page.tsx"
click node_composer "https://github.com/isthisthelastone/money_nerds/blob/main/src/components/features/Composer.tsx"
click node_posts_api "https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/posts/route.ts"
click node_comments_api "https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/comments/route.ts"
click node_engagement_api "https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/likes/route.ts"
click node_media_ui "https://github.com/isthisthelastone/money_nerds/blob/main/src/components/features/media/CircleVideoPlayer.tsx"
click node_media_recording "https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/media/recording.ts"
click node_media_api "https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/media/server.ts"
click node_media_store "https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/supabase/admin.ts"
click node_funding_editor "https://github.com/isthisthelastone/money_nerds/blob/main/src/components/features/FundingOptionsEditor.tsx"
click node_funding_options "https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/funding/options.ts"
click node_donate_ui "https://github.com/isthisthelastone/money_nerds/blob/main/src/components/features/DonateButton.tsx"
click node_intent_api "https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/donations/intent/route.ts"
click node_donation_api "https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/donations/route.ts"
click node_payout_rules "https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/funding/payouts.ts"
click node_funding_server "https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/funding/server.ts"
click node_data_store "https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/supabase/admin.ts"
click node_public_pages "https://github.com/isthisthelastone/money_nerds/blob/main/src/app/how-it-works/page.tsx"
click node_feed_route "https://github.com/isthisthelastone/money_nerds/blob/main/src/app/feed.xml/route.ts"
click node_llms_route "https://github.com/isthisthelastone/money_nerds/blob/main/src/app/llms.txt/route.ts"
click node_public_store "https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/supabase/public.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_sign_in,node_auth_api,node_auth_server,node_identity_link,node_profile_pages toneBlue
class node_board_ui,node_post_page,node_composer,node_posts_api,node_comments_api,node_engagement_api,node_data_store,node_supabase toneAmber
class node_media_ui,node_media_recording,node_media_api,node_media_store toneMint
class node_funding_editor,node_funding_options,node_donate_ui,node_intent_api,node_donation_api,node_payout_rules,node_funding_server toneRose
class node_public_pages,node_feed_route,node_llms_route,node_public_store,node_person,node_solana_rpc,node_clerk,node_direct_wallets toneIndigo
```

## Components

### Identity and profiles

- [Sign-in experience](https://github.com/isthisthelastone/money_nerds/blob/main/src/components/auth/SignInExperience.tsx): `src/components/auth/SignInExperience.tsx`
- [Authentication routes](https://github.com/isthisthelastone/money_nerds/tree/main/src/app/api/auth): `src/app/api/auth`
- [Session and profile sync](https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/auth/server.ts): `src/lib/auth/server.ts`
- [External identity flows](https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/auth/external.ts): `src/lib/auth/external.ts`
- [Public profile pages](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/u/%5Bwallet%5D/page.tsx): `src/app/u/[wallet]/page.tsx`

### Community content

- [Board and post views](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Post detail](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/p/%5Bid%5D/page.tsx): `src/app/p/[id]/page.tsx`
- [Post composer](https://github.com/isthisthelastone/money_nerds/blob/main/src/components/features/Composer.tsx): `src/components/features/Composer.tsx`
- [Post routes](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/posts/route.ts): `src/app/api/posts/route.ts`
- [Comment routes](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/comments/route.ts): `src/app/api/comments/route.ts`
- [Likes and views](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/likes/route.ts): `src/app/api/likes/route.ts`
- [Supabase application data](https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/supabase/admin.ts): `src/lib/supabase/admin.ts`

### Media attachments

- [Media playback](https://github.com/isthisthelastone/money_nerds/blob/main/src/components/features/media/CircleVideoPlayer.tsx): `src/components/features/media/CircleVideoPlayer.tsx`
- [Media recording](https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/media/recording.ts): `src/lib/media/recording.ts`
- [Media signing and validation](https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/media/server.ts): `src/lib/media/server.ts`
- [Supabase media storage](https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/supabase/admin.ts): `src/lib/supabase/admin.ts`

### Funding and payouts

- [Funding route editor](https://github.com/isthisthelastone/money_nerds/blob/main/src/components/features/FundingOptionsEditor.tsx): `src/components/features/FundingOptionsEditor.tsx`
- [Funding route rules](https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/funding/options.ts): `src/lib/funding/options.ts`
- [Donation experience](https://github.com/isthisthelastone/money_nerds/blob/main/src/components/features/DonateButton.tsx): `src/components/features/DonateButton.tsx`
- [Funding intents](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/donations/intent/route.ts): `src/app/api/donations/intent/route.ts`
- [Transfer verification](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/api/donations/route.ts): `src/app/api/donations/route.ts`
- [Payout normalization](https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/funding/payouts.ts): `src/lib/funding/payouts.ts`
- [Funding route resolution](https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/funding/server.ts): `src/lib/funding/server.ts`

### Public discovery

- [Guides and information](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/how-it-works/page.tsx): `src/app/how-it-works/page.tsx`
- [RSS feed](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/feed.xml/route.ts): `src/app/feed.xml/route.ts`
- [LLM summaries](https://github.com/isthisthelastone/money_nerds/blob/main/src/app/llms.txt/route.ts): `src/app/llms.txt/route.ts`
- [Public Supabase reads](https://github.com/isthisthelastone/money_nerds/blob/main/src/lib/supabase/public.ts): `src/lib/supabase/public.ts`

### Other components

- **Visitor or member**
- **Solana network**
- **Supabase**
- **Clerk**
- **Recipient wallets**

## Connections

- Visitor or member → Sign-in experience: signs in (evidence: `README.md`)
- Sign-in experience → Authentication routes: starts auth
- Authentication routes → External identity flows: handles external auth (evidence: `src/app/api/auth/telegram/route.ts`)
- Authentication routes → Session and profile sync: resolves session (evidence: `src/app/api/auth/session/route.ts`)
- Session and profile sync → Supabase: syncs profiles (evidence: `src/lib/auth/server.ts`)
- Session and profile sync → Clerk: reads identity (evidence: `src/lib/auth/server.ts`)
- Visitor or member → Board and post views: browses (evidence: `README.md`)
- Visitor or member → Post composer: writes post (evidence: `README.md`)
- Post composer → Post routes: submits post
- Post routes → Session and profile sync: requires session (evidence: `src/app/api/posts/route.ts`)
- Post routes → Media signing and validation: validates attachments (evidence: `src/app/api/posts/route.ts`)
- Post routes → Funding route rules: parses routes (evidence: `src/app/api/posts/route.ts`)
- Post routes → Supabase application data: writes posts (evidence: `src/app/api/posts/route.ts`)
- Visitor or member → Post detail: opens post (evidence: `README.md`)
- Post detail → Comment routes: loads replies
- Visitor or member → Comment routes: replies (evidence: `README.md`)
- Comment routes → Session and profile sync: requires session (evidence: `src/app/api/comments/route.ts`)
- Comment routes → Media signing and validation: validates attachments (evidence: `src/app/api/comments/route.ts`)
- Comment routes → Supabase application data: writes comments (evidence: `src/app/api/comments/route.ts`)
- Visitor or member → Likes and views: likes or views (evidence: `README.md`)
- Likes and views → Session and profile sync: requires session (evidence: `src/app/api/likes/route.ts`)
- Likes and views → Supabase application data: updates activity (evidence: `src/app/api/likes/route.ts`)
- Post composer → Media recording: records media (evidence: `src/components/features/Composer.tsx`)
- Post composer → Funding route editor: configures routes (evidence: `src/components/features/Composer.tsx`)
- Media playback → Visitor or member: plays attachments (evidence: `README.md`)
- Media signing and validation → Supabase media storage: stages uploads (evidence: `src/lib/media/server.ts`)
- Media signing and validation → Supabase: uses storage (evidence: `src/lib/media/server.ts`)
- Funding route editor → Funding route rules: validates options (evidence: `src/components/features/FundingOptionsEditor.tsx`)
- Funding route rules → Payout normalization: normalizes routes (evidence: `src/lib/funding/options.ts`)
- Donation experience → Funding intents: requests intent
- Funding intents → Funding route resolution: resolves recipient (evidence: `src/app/api/donations/intent/route.ts`)
- Funding intents → Payout normalization: checks payout route (evidence: `src/app/api/donations/intent/route.ts`)
- Visitor or member → Recipient wallets: sends directly (evidence: `README.md`)
- Donation experience → Transfer verification: submits transaction
- Transfer verification → Solana network: verifies transfer (evidence: `src/app/api/donations/route.ts`)
- Transfer verification → Payout normalization: checks recipient (evidence: `src/app/api/donations/route.ts`)
- Transfer verification → Supabase application data: records verified donation (evidence: `README.md`)
- Public profile pages → Funding route resolution: shows payout routes
- Funding route resolution → Supabase: loads routes (evidence: `src/lib/funding/server.ts`)
- Visitor or member → Guides and information: reads guidance (evidence: `README.md`)
- RSS feed → Public Supabase reads: reads feed data (evidence: `src/app/feed.xml/route.ts`)
- Public Supabase reads → Supabase: queries public data (evidence: `src/lib/supabase/public.ts`)
- Visitor or member → RSS feed: subscribes (evidence: `README.md`)
- Visitor or member → LLM summaries: reads summaries (evidence: `README.md`)
