# mariospeterman/veel-v2 architecture

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

- Interactive diagram: https://gitdiagram.com/mariospeterman/veel-v2
- Repository: https://github.com/mariospeterman/veel-v2

## Overview

WeVid is an 18+ creator-media PWA/dApp with wallet-based accounts, publishing and discovery, social and live experiences, noncustodial payments/access, and administration. A representative journey is wallet sign-in or onboarding, profile and age checks, then creating or viewing content and engaging or paying for access. The API registers domain routes and delegates work to repositories; a worker handles background jobs. The graph preserves documented MCP, moderation, analytics, and subscription capabilities. Some web-to-API wiring and unsampled subsystem internals are not shown, so those connections are omitted.

Main entry points: [`apps/api/src/app-routes.ts`](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/app-routes.ts) (Fastify API), [`apps/api/src/modules/mcp/mcp-routes.ts`](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/mcp/mcp-routes.ts) (MCP access), [`apps/api/src/modules/auth/wallet-auth-routes.ts`](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/auth/wallet-auth-routes.ts) (Wallet sign-in), [`apps/api/src/modules/content/content-core-routes.ts`](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/content/content-core-routes.ts) (Publishing and feed)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_pwa["WeVid PWA<br/>[app-shell.tsx]"]
  node_api["Fastify API<br/>[app-routes.ts]"]
end

subgraph group_identity["Identity and trust"]
  node_wallet_auth["Wallet sign-in"]
  node_auth_repo["Wallet auth records"]
  node_profiles["Profiles<br/>[profile-routes.ts]"]
  node_age["Age assurance<br/>[age-routes.ts]"]
end

subgraph group_creator["Creator and community"]
  node_content["Publishing and feed"]
  node_engagement["Social engagement"]
  node_discover["Discovery<br/>[discover-routes.ts]"]
  node_live["Live experiences<br/>[live-routes.ts]"]
  node_mcp["MCP access<br/>[mcp-routes.ts]"]
end

subgraph group_commerce["Access and settlement"]
  node_wallet["Wallet services<br/>[wallet-routes.ts]"]
  node_payments["Solana payments"]
  node_subscriptions["Memberships"]
  node_events["Event access<br/>[event-routes.ts]"]
end

subgraph group_operations["Platform operations"]
  node_admin["Admin and compliance<br/>[admin-routes.ts]"]
  node_analytics["Analytics"]
  node_worker["Background worker<br/>[index.ts]"]
end

node_visitor(("Member or creator"))
node_postgres[("Supabase Postgres")]

node_visitor -->|"uses"| node_pwa
node_visitor -->|"signs in"| node_wallet_auth
node_api -->|"registers"| node_wallet_auth
node_api -->|"registers"| node_profiles
node_api -->|"registers"| node_age
node_api -->|"registers"| node_content
node_api -->|"registers"| node_discover
node_api -->|"registers"| node_live
node_api -->|"registers"| node_mcp
node_api -->|"registers"| node_analytics
node_wallet_auth -->|"calls"| node_auth_repo
node_auth_repo -->|"writes"| node_postgres
node_content -.->|"reads and writes"| node_postgres
node_mcp -->|"runs tools"| node_admin
node_mcp -->|"runs tools"| node_content
node_payments -.->|"persists records"| node_postgres
node_subscriptions -->|"uses payment logic"| node_payments
node_api -->|"registers"| node_admin
node_worker -.->|"projects data"| node_postgres

click node_pwa "https://github.com/mariospeterman/veel-v2/blob/main/apps/web/app/app-shell.tsx"
click node_api "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/app-routes.ts"
click node_wallet_auth "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/auth/wallet-auth-routes.ts"
click node_auth_repo "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/auth/wallet-auth-repository.ts"
click node_profiles "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/profile/profile-routes.ts"
click node_age "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/age/age-routes.ts"
click node_content "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/content/content-core-routes.ts"
click node_engagement "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/engagement/engagement-routes.ts"
click node_discover "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/discover/discover-routes.ts"
click node_live "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/live/live-routes.ts"
click node_mcp "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/mcp/mcp-routes.ts"
click node_wallet "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/wallet/wallet-routes.ts"
click node_payments "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/payment/payment-intent-routes.ts"
click node_subscriptions "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/subscription/subscription-routes.ts"
click node_events "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/event/event-routes.ts"
click node_admin "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/admin/admin-routes.ts"
click node_analytics "https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/analytics/analytics-routes.ts"
click node_worker "https://github.com/mariospeterman/veel-v2/blob/main/apps/worker/src/index.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_pwa,node_api toneBlue
class node_wallet_auth,node_auth_repo,node_profiles,node_age,node_postgres toneAmber
class node_content,node_engagement,node_discover,node_live,node_mcp toneMint
class node_wallet,node_payments,node_subscriptions,node_events toneRose
class node_admin,node_analytics,node_worker,node_visitor toneIndigo
```

## Components

### Web experience

- [WeVid PWA](https://github.com/mariospeterman/veel-v2/blob/main/apps/web/app/app-shell.tsx): `apps/web/app/app-shell.tsx`
- [Fastify API](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/app-routes.ts): `apps/api/src/app-routes.ts`

### Identity and trust

- [Wallet sign-in](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/auth/wallet-auth-routes.ts): `apps/api/src/modules/auth/wallet-auth-routes.ts`
- [Wallet auth records](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/auth/wallet-auth-repository.ts): `apps/api/src/modules/auth/wallet-auth-repository.ts`
- [Profiles](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/profile/profile-routes.ts): `apps/api/src/modules/profile/profile-routes.ts`
- [Age assurance](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/age/age-routes.ts): `apps/api/src/modules/age/age-routes.ts`

### Creator and community

- [Publishing and feed](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/content/content-core-routes.ts): `apps/api/src/modules/content/content-core-routes.ts`
- [Social engagement](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/engagement/engagement-routes.ts): `apps/api/src/modules/engagement/engagement-routes.ts`
- [Discovery](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/discover/discover-routes.ts): `apps/api/src/modules/discover/discover-routes.ts`
- [Live experiences](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/live/live-routes.ts): `apps/api/src/modules/live/live-routes.ts`
- [MCP access](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/mcp/mcp-routes.ts): `apps/api/src/modules/mcp/mcp-routes.ts`

### Access and settlement

- [Wallet services](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/wallet/wallet-routes.ts): `apps/api/src/modules/wallet/wallet-routes.ts`
- [Solana payments](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/payment/payment-intent-routes.ts): `apps/api/src/modules/payment/payment-intent-routes.ts`
- [Memberships](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/subscription/subscription-routes.ts): `apps/api/src/modules/subscription/subscription-routes.ts`
- [Event access](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/event/event-routes.ts): `apps/api/src/modules/event/event-routes.ts`

### Platform operations

- [Admin and compliance](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/admin/admin-routes.ts): `apps/api/src/modules/admin/admin-routes.ts`
- [Analytics](https://github.com/mariospeterman/veel-v2/blob/main/apps/api/src/modules/analytics/analytics-routes.ts): `apps/api/src/modules/analytics/analytics-routes.ts`
- [Background worker](https://github.com/mariospeterman/veel-v2/blob/main/apps/worker/src/index.ts): `apps/worker/src/index.ts`

### Other components

- **Member or creator**
- **Supabase Postgres**

## Connections

- Member or creator → WeVid PWA: uses (evidence: `README.md`)
- Member or creator → Wallet sign-in: signs in (evidence: `README.md`)
- Fastify API → Wallet sign-in: registers (evidence: `apps/api/src/app-routes.ts`)
- Fastify API → Profiles: registers (evidence: `apps/api/src/app-routes.ts`)
- Fastify API → Age assurance: registers (evidence: `apps/api/src/app-routes.ts`)
- Fastify API → Publishing and feed: registers (evidence: `apps/api/src/app-routes.ts`)
- Fastify API → Discovery: registers (evidence: `apps/api/src/app-routes.ts`)
- Fastify API → Live experiences: registers (evidence: `apps/api/src/app-routes.ts`)
- Fastify API → MCP access: registers (evidence: `apps/api/src/app-routes.ts`)
- Fastify API → Analytics: registers (evidence: `apps/api/src/app-routes.ts`)
- Wallet sign-in → Wallet auth records: calls (evidence: `apps/api/src/modules/auth/wallet-auth-routes.ts`)
- Wallet auth records → Supabase Postgres: writes (evidence: `apps/api/src/modules/auth/wallet-auth-repository.ts`)
- Publishing and feed → Supabase Postgres: reads and writes
- MCP access → Admin and compliance: runs tools (evidence: `apps/api/src/modules/mcp/mcp-routes.ts`)
- MCP access → Publishing and feed: runs tools (evidence: `apps/api/src/modules/mcp/mcp-routes.ts`)
- Solana payments → Supabase Postgres: persists records
- Memberships → Solana payments: uses payment logic (evidence: `apps/api/src/modules/subscription/subscription-routes.ts`)
- Fastify API → Admin and compliance: registers (evidence: `apps/api/src/app-routes.ts`)
- Background worker → Supabase Postgres: projects data
