# dragonrichi/testvseti architecture

> Architecture diagram of the GitHub repository dragonrichi/testvseti, 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/dragonrichi/testvseti
- Repository: https://github.com/dragonrichi/testvseti

## Overview

Vseti is a location-aware social application with profiles, posts and comments, publication/tracking radars, nearby geo chats, and direct messaging. The tree indicates a user workflow from social pages into domain-specific components and actions, with Supabase-backed services for authentication, data, realtime updates, and media. Sampled code confirms several client-to-action calls and media-storage paths; most page wiring and domain action implementations were not sampled, so those connections are left out rather than inferred.

Main entry points: [`app/api/profile-media/route.ts`](https://github.com/dragonrichi/testvseti/blob/main/app/api/profile-media/route.ts) (Profile media API), [`lib/supabase/client.ts`](https://github.com/dragonrichi/testvseti/blob/main/lib/supabase/client.ts) (Supabase client), [`components/Settings/useProfileEditForm.ts`](https://github.com/dragonrichi/testvseti/blob/main/components/Settings/useProfileEditForm.ts) (Profile editing), [`components/GeoChat/useGeoChatMessageSubmit.ts`](https://github.com/dragonrichi/testvseti/blob/main/components/GeoChat/useGeoChatMessageSubmit.ts) (Message submission)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_social_pages["Social pages"]
  node_social_layout["Social layout<br/>[SocialLayout.tsx]"]
  node_auth["Authentication UI<br/>[AuthForm.tsx]"]
end

subgraph group_social["Social content"]
  node_feed["Feed UI<br/>[GeoFeed.tsx]"]
  node_feed_paging["Feed pagination"]
  node_post_profile["Posts and profiles<br/>[ProfileFeed.tsx]"]
  node_comments["Comments"]
  node_radars["Radars<br/>[RadarFeed.tsx]"]
  node_profile_edit["Profile editing"]
  node_comment_action["Reply loading action"]
  node_profile_action["Profile update action<br/>[updateProfile.ts]"]
end

subgraph group_location["Location features"]
  node_geo_pages["Geo chat pages"]
  node_geo_room["Geo chat room<br/>[GeoChatRoom.tsx]"]
  node_geo_submit["Message submission"]
  node_geo_realtime["Live chat updates"]
  node_geo_media["Chat media"]
  node_geo_action["Geo message action"]
end

subgraph group_messaging["Messaging"]
  node_direct_pages["Direct-message pages"]
  node_direct_search["Conversation search"]
  node_unread["Unread tracking"]
  node_direct_action["Conversation action"]
  node_message_search_action["Message search action"]
end

subgraph group_services["Backend services"]
  node_media_route["Profile media API<br/>[route.ts]"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
  node_supabase_server["Supabase server client<br/>[server.ts]"]
  node_supabase_admin["Supabase admin client<br/>[admin.ts]"]
end

node_user(("User"))
node_supabase[("Supabase")]

node_user -->|"visits"| node_social_pages
node_social_pages -->|"renders"| node_social_layout
node_user -->|"signs in"| node_auth
node_feed_paging -->|"supplies pages"| node_feed
node_comments -->|"loads replies"| node_comment_action
node_geo_submit -->|"sends messages"| node_geo_action
node_geo_submit -->|"uploads media"| node_geo_media
node_geo_realtime -->|"refreshes messages"| node_geo_action
node_geo_realtime -->|"subscribes"| node_supabase_client
node_direct_search -->|"searches messages"| node_message_search_action
node_unread -->|"loads conversations"| node_direct_action
node_unread -->|"subscribes"| node_supabase_client
node_profile_edit -->|"updates profile"| node_profile_action
node_profile_edit -->|"uploads media"| node_media_route
node_media_route -->|"authenticates"| node_supabase_server
node_media_route -->|"manages storage"| node_supabase_admin
node_supabase_client -->|"connects"| node_supabase
node_supabase_server -->|"connects"| node_supabase
node_supabase_admin -->|"connects"| node_supabase

click node_social_pages "https://github.com/dragonrichi/testvseti/tree/main/app/(social)"
click node_social_layout "https://github.com/dragonrichi/testvseti/blob/main/components/Layout/SocialLayout.tsx"
click node_auth "https://github.com/dragonrichi/testvseti/blob/main/components/Auth/AuthForm.tsx"
click node_feed "https://github.com/dragonrichi/testvseti/blob/main/components/Feed/GeoFeed.tsx"
click node_feed_paging "https://github.com/dragonrichi/testvseti/blob/main/components/Feed/useInfinitePostFeed.ts"
click node_post_profile "https://github.com/dragonrichi/testvseti/blob/main/components/Profile/ProfileFeed.tsx"
click node_comments "https://github.com/dragonrichi/testvseti/blob/main/components/Profile/CommentsSection.tsx"
click node_radars "https://github.com/dragonrichi/testvseti/blob/main/components/Radar/RadarFeed.tsx"
click node_geo_pages "https://github.com/dragonrichi/testvseti/tree/main/app/(social)/geochats"
click node_geo_room "https://github.com/dragonrichi/testvseti/blob/main/components/GeoChat/GeoChatRoom.tsx"
click node_geo_submit "https://github.com/dragonrichi/testvseti/blob/main/components/GeoChat/useGeoChatMessageSubmit.ts"
click node_geo_realtime "https://github.com/dragonrichi/testvseti/blob/main/components/GeoChat/useGeoChatRealtime.ts"
click node_geo_media "https://github.com/dragonrichi/testvseti/blob/main/lib/geochats/uploadGeoChatMedia.ts"
click node_direct_pages "https://github.com/dragonrichi/testvseti/tree/main/app/(social)/messages"
click node_direct_search "https://github.com/dragonrichi/testvseti/blob/main/components/Messages/useDirectConversationSearch.ts"
click node_unread "https://github.com/dragonrichi/testvseti/blob/main/components/Messages/useUnreadDirectMessagesCount.ts"
click node_profile_edit "https://github.com/dragonrichi/testvseti/blob/main/components/Settings/useProfileEditForm.ts"
click node_media_route "https://github.com/dragonrichi/testvseti/blob/main/app/api/profile-media/route.ts"
click node_supabase_client "https://github.com/dragonrichi/testvseti/blob/main/lib/supabase/client.ts"
click node_supabase_server "https://github.com/dragonrichi/testvseti/blob/main/lib/supabase/server.ts"
click node_supabase_admin "https://github.com/dragonrichi/testvseti/blob/main/lib/supabase/admin.ts"
click node_comment_action "https://github.com/dragonrichi/testvseti/blob/main/actions/getCommentReplies.ts"
click node_direct_action "https://github.com/dragonrichi/testvseti/blob/main/actions/getDirectConversations.ts"
click node_message_search_action "https://github.com/dragonrichi/testvseti/blob/main/actions/searchDirectMessages.ts"
click node_geo_action "https://github.com/dragonrichi/testvseti/blob/main/actions/getGeoChatMessages.ts"
click node_profile_action "https://github.com/dragonrichi/testvseti/blob/main/actions/updateProfile.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_social_pages,node_social_layout,node_auth,node_user toneBlue
class node_feed,node_feed_paging,node_post_profile,node_comments,node_radars,node_profile_edit,node_comment_action,node_profile_action,node_supabase toneAmber
class node_geo_pages,node_geo_room,node_geo_submit,node_geo_realtime,node_geo_media,node_geo_action toneMint
class node_direct_pages,node_direct_search,node_unread,node_direct_action,node_message_search_action toneRose
class node_media_route,node_supabase_client,node_supabase_server,node_supabase_admin toneIndigo
```

## Components

### App experience

- [Social pages](https://github.com/dragonrichi/testvseti/tree/main/app/(social)): `app/(social)`
- [Social layout](https://github.com/dragonrichi/testvseti/blob/main/components/Layout/SocialLayout.tsx): `components/Layout/SocialLayout.tsx`
- [Authentication UI](https://github.com/dragonrichi/testvseti/blob/main/components/Auth/AuthForm.tsx): `components/Auth/AuthForm.tsx`

### Social content

- [Feed UI](https://github.com/dragonrichi/testvseti/blob/main/components/Feed/GeoFeed.tsx): `components/Feed/GeoFeed.tsx`
- [Feed pagination](https://github.com/dragonrichi/testvseti/blob/main/components/Feed/useInfinitePostFeed.ts): `components/Feed/useInfinitePostFeed.ts`
- [Posts and profiles](https://github.com/dragonrichi/testvseti/blob/main/components/Profile/ProfileFeed.tsx): `components/Profile/ProfileFeed.tsx`
- [Comments](https://github.com/dragonrichi/testvseti/blob/main/components/Profile/CommentsSection.tsx): `components/Profile/CommentsSection.tsx`
- [Radars](https://github.com/dragonrichi/testvseti/blob/main/components/Radar/RadarFeed.tsx): `components/Radar/RadarFeed.tsx`
- [Profile editing](https://github.com/dragonrichi/testvseti/blob/main/components/Settings/useProfileEditForm.ts): `components/Settings/useProfileEditForm.ts`
- [Reply loading action](https://github.com/dragonrichi/testvseti/blob/main/actions/getCommentReplies.ts): `actions/getCommentReplies.ts`
- [Profile update action](https://github.com/dragonrichi/testvseti/blob/main/actions/updateProfile.ts): `actions/updateProfile.ts`

### Location features

- [Geo chat pages](https://github.com/dragonrichi/testvseti/tree/main/app/(social)/geochats): `app/(social)/geochats`
- [Geo chat room](https://github.com/dragonrichi/testvseti/blob/main/components/GeoChat/GeoChatRoom.tsx): `components/GeoChat/GeoChatRoom.tsx`
- [Message submission](https://github.com/dragonrichi/testvseti/blob/main/components/GeoChat/useGeoChatMessageSubmit.ts): `components/GeoChat/useGeoChatMessageSubmit.ts`
- [Live chat updates](https://github.com/dragonrichi/testvseti/blob/main/components/GeoChat/useGeoChatRealtime.ts): `components/GeoChat/useGeoChatRealtime.ts`
- [Chat media](https://github.com/dragonrichi/testvseti/blob/main/lib/geochats/uploadGeoChatMedia.ts): `lib/geochats/uploadGeoChatMedia.ts`
- [Geo message action](https://github.com/dragonrichi/testvseti/blob/main/actions/getGeoChatMessages.ts): `actions/getGeoChatMessages.ts`

### Messaging

- [Direct-message pages](https://github.com/dragonrichi/testvseti/tree/main/app/(social)/messages): `app/(social)/messages`
- [Conversation search](https://github.com/dragonrichi/testvseti/blob/main/components/Messages/useDirectConversationSearch.ts): `components/Messages/useDirectConversationSearch.ts`
- [Unread tracking](https://github.com/dragonrichi/testvseti/blob/main/components/Messages/useUnreadDirectMessagesCount.ts): `components/Messages/useUnreadDirectMessagesCount.ts`
- [Conversation action](https://github.com/dragonrichi/testvseti/blob/main/actions/getDirectConversations.ts): `actions/getDirectConversations.ts`
- [Message search action](https://github.com/dragonrichi/testvseti/blob/main/actions/searchDirectMessages.ts): `actions/searchDirectMessages.ts`

### Backend services

- [Profile media API](https://github.com/dragonrichi/testvseti/blob/main/app/api/profile-media/route.ts): `app/api/profile-media/route.ts`
- [Supabase client](https://github.com/dragonrichi/testvseti/blob/main/lib/supabase/client.ts): `lib/supabase/client.ts`
- [Supabase server client](https://github.com/dragonrichi/testvseti/blob/main/lib/supabase/server.ts): `lib/supabase/server.ts`
- [Supabase admin client](https://github.com/dragonrichi/testvseti/blob/main/lib/supabase/admin.ts): `lib/supabase/admin.ts`

### Other components

- **User**
- **Supabase**

## Connections

- User → Social pages: visits
- Social pages → Social layout: renders
- User → Authentication UI: signs in
- Feed pagination → Feed UI: supplies pages
- Comments → Reply loading action: loads replies
- Message submission → Geo message action: sends messages
- Message submission → Chat media: uploads media
- Live chat updates → Geo message action: refreshes messages
- Live chat updates → Supabase client: subscribes
- Conversation search → Message search action: searches messages
- Unread tracking → Conversation action: loads conversations
- Unread tracking → Supabase client: subscribes
- Profile editing → Profile update action: updates profile
- Profile editing → Profile media API: uploads media
- Profile media API → Supabase server client: authenticates
- Profile media API → Supabase admin client: manages storage
- Supabase client → Supabase: connects
- Supabase server client → Supabase: connects
- Supabase admin client → Supabase: connects
