# omnivyse/chatli architecture

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

- Interactive diagram: https://gitdiagram.com/omnivyse/chatli
- Repository: https://github.com/omnivyse/chatli

## Overview

Chatli is a social networking and messaging product with web and React Native clients backed by an Express service. The user journey starts at login or registration, then branches into a social feed, profiles, chat, events/clips, and notifications; the clients communicate with the server for account and product data. The server exposes domain routes and persists records in MongoDB, with push delivery as an external integration. Some connections are documented only by the source index or app entry excerpts; unverified client-to-server links are dashed.

Main entry points: [`server/server.js`](https://github.com/omnivyse/chatli/blob/main/server/server.js) (HTTP and socket server), [`mobile-app/src/services/api.js`](https://github.com/omnivyse/chatli/blob/main/mobile-app/src/services/api.js) (Mobile API client), [`src/services/api.js`](https://github.com/omnivyse/chatli/blob/main/src/services/api.js) (Web API client), [`mobile-app/App.js`](https://github.com/omnivyse/chatli/blob/main/mobile-app/App.js) (Mobile app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Client apps"]
  node_mobile_app["Mobile app<br/>[App.js]"]
  node_web_app["Web app<br/>[App.js]"]
  node_mobile_auth["Mobile sign-in<br/>[LoginScreen.js]"]
  node_web_auth["Web sign-in<br/>[Login.js]"]
  node_mobile_api["Mobile API client<br/>[api.js]"]
  node_web_api["Web API client<br/>[api.js]"]
end

subgraph group_social["Social features"]
  node_mobile_feed["Mobile feed<br/>[PostFeedScreen.js]"]
  node_mobile_post["Post creation"]
  node_mobile_profile["Profiles and search"]
  node_web_feed["Web feed<br/>[PostFeed.js]"]
  node_web_profile["Web profiles"]
  node_events_clips["Events and clips<br/>[ClipsScreen.js]"]
end

subgraph group_messaging["Messaging"]
  node_mobile_chat["Mobile chat<br/>[ChatScreen.js]"]
  node_web_chat["Web chat<br/>[ChatWindow.js]"]
end

subgraph group_server["Server domains"]
  node_server["HTTP and socket server<br/>[server.js]"]
  node_auth_routes["Account routes<br/>[auth.js]"]
  node_post_routes["Post routes<br/>[posts.js]"]
  node_chat_routes["Chat routes<br/>[chats.js]"]
  node_event_routes["Event routes<br/>[events.js]"]
  node_notification_routes["Notification routes<br/>[notifications.js]"]
  node_admin_routes["Admin and analytics<br/>[admin.js]"]
end

subgraph group_platform["Platform services"]
  node_user_model[("User records<br/>[User.js]")]
  node_post_model[("Post records<br/>[Post.js]")]
  node_chat_model[("Chat records<br/>[Chat.js]")]
  node_notification_model[("Notification records<br/>[Notification.js]")]
  node_mobile_push["Mobile push handling"]
  node_push_service["Push delivery"]
end

node_person(("User"))
node_expo_push["Expo push service"]

node_person -->|"uses"| node_mobile_app
node_person -->|"uses"| node_web_app
node_mobile_app -->|"routes to"| node_mobile_auth
node_mobile_app -->|"renders"| node_mobile_chat
node_web_app -->|"renders"| node_web_auth
node_web_app -->|"renders"| node_web_feed
node_web_app -->|"renders"| node_web_chat
node_mobile_auth -.->|"requests"| node_mobile_api
node_web_auth -.->|"requests"| node_web_api
node_mobile_feed -.->|"requests"| node_mobile_api
node_mobile_post -.->|"requests"| node_mobile_api
node_mobile_profile -->|"requests"| node_mobile_api
node_web_feed -.->|"requests"| node_web_api
node_web_profile -->|"requests"| node_web_api
node_mobile_chat -.->|"requests"| node_mobile_api
node_web_chat -.->|"requests"| node_web_api
node_events_clips -.->|"requests"| node_mobile_api
node_mobile_api -.->|"calls API"| node_server
node_web_api -->|"calls API"| node_server
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_post_routes
node_server -->|"mounts"| node_chat_routes
node_server -->|"mounts"| node_event_routes
node_server -->|"mounts"| node_notification_routes
node_server -->|"mounts"| node_admin_routes
node_auth_routes -->|"reads and writes"| node_user_model
node_post_routes -->|"reads and writes"| node_post_model
node_post_routes -->|"reads"| node_user_model
node_chat_routes -.->|"uses"| node_chat_model
node_notification_routes -.->|"uses"| node_notification_model
node_mobile_app -->|"initializes"| node_mobile_push
node_mobile_push -->|"updates token"| node_mobile_api
node_push_service -->|"sends"| node_expo_push
node_auth_routes -->|"notifies"| node_push_service

click node_mobile_app "https://github.com/omnivyse/chatli/blob/main/mobile-app/App.js"
click node_web_app "https://github.com/omnivyse/chatli/blob/main/src/App.js"
click node_mobile_auth "https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/LoginScreen.js"
click node_web_auth "https://github.com/omnivyse/chatli/blob/main/src/components/Login.js"
click node_mobile_feed "https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/PostFeedScreen.js"
click node_mobile_post "https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/CreatePostScreen.js"
click node_mobile_profile "https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/UserProfileScreen.js"
click node_web_feed "https://github.com/omnivyse/chatli/blob/main/src/components/PostFeed.js"
click node_web_profile "https://github.com/omnivyse/chatli/blob/main/src/components/UserProfileModal.js"
click node_mobile_chat "https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/ChatScreen.js"
click node_web_chat "https://github.com/omnivyse/chatli/blob/main/src/components/ChatWindow.js"
click node_events_clips "https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/ClipsScreen.js"
click node_mobile_api "https://github.com/omnivyse/chatli/blob/main/mobile-app/src/services/api.js"
click node_web_api "https://github.com/omnivyse/chatli/blob/main/src/services/api.js"
click node_server "https://github.com/omnivyse/chatli/blob/main/server/server.js"
click node_auth_routes "https://github.com/omnivyse/chatli/blob/main/server/routes/auth.js"
click node_post_routes "https://github.com/omnivyse/chatli/blob/main/server/routes/posts.js"
click node_chat_routes "https://github.com/omnivyse/chatli/blob/main/server/routes/chats.js"
click node_event_routes "https://github.com/omnivyse/chatli/blob/main/server/routes/events.js"
click node_notification_routes "https://github.com/omnivyse/chatli/blob/main/server/routes/notifications.js"
click node_admin_routes "https://github.com/omnivyse/chatli/blob/main/server/routes/admin.js"
click node_user_model "https://github.com/omnivyse/chatli/blob/main/server/models/User.js"
click node_post_model "https://github.com/omnivyse/chatli/blob/main/server/models/Post.js"
click node_chat_model "https://github.com/omnivyse/chatli/blob/main/server/models/Chat.js"
click node_notification_model "https://github.com/omnivyse/chatli/blob/main/server/models/Notification.js"
click node_mobile_push "https://github.com/omnivyse/chatli/blob/main/mobile-app/src/services/pushNotificationService.js"
click node_push_service "https://github.com/omnivyse/chatli/blob/main/server/services/pushNotificationService.js"

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_mobile_app,node_web_app,node_mobile_auth,node_web_auth,node_mobile_api,node_web_api,node_person toneBlue
class node_mobile_feed,node_mobile_post,node_mobile_profile,node_web_feed,node_web_profile,node_events_clips toneAmber
class node_mobile_chat,node_web_chat toneMint
class node_server,node_auth_routes,node_post_routes,node_chat_routes,node_event_routes,node_notification_routes,node_admin_routes toneRose
class node_user_model,node_post_model,node_chat_model,node_notification_model,node_mobile_push,node_push_service,node_expo_push toneIndigo
```

## Components

### Client apps

- [Mobile app](https://github.com/omnivyse/chatli/blob/main/mobile-app/App.js): `mobile-app/App.js`
- [Web app](https://github.com/omnivyse/chatli/blob/main/src/App.js): `src/App.js`
- [Mobile sign-in](https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/LoginScreen.js): `mobile-app/src/screens/LoginScreen.js`
- [Web sign-in](https://github.com/omnivyse/chatli/blob/main/src/components/Login.js): `src/components/Login.js`
- [Mobile API client](https://github.com/omnivyse/chatli/blob/main/mobile-app/src/services/api.js): `mobile-app/src/services/api.js`
- [Web API client](https://github.com/omnivyse/chatli/blob/main/src/services/api.js): `src/services/api.js`

### Social features

- [Mobile feed](https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/PostFeedScreen.js): `mobile-app/src/screens/PostFeedScreen.js`
- [Post creation](https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/CreatePostScreen.js): `mobile-app/src/screens/CreatePostScreen.js`
- [Profiles and search](https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/UserProfileScreen.js): `mobile-app/src/screens/UserProfileScreen.js`
- [Web feed](https://github.com/omnivyse/chatli/blob/main/src/components/PostFeed.js): `src/components/PostFeed.js`
- [Web profiles](https://github.com/omnivyse/chatli/blob/main/src/components/UserProfileModal.js): `src/components/UserProfileModal.js`
- [Events and clips](https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/ClipsScreen.js): `mobile-app/src/screens/ClipsScreen.js`

### Messaging

- [Mobile chat](https://github.com/omnivyse/chatli/blob/main/mobile-app/src/screens/ChatScreen.js): `mobile-app/src/screens/ChatScreen.js`
- [Web chat](https://github.com/omnivyse/chatli/blob/main/src/components/ChatWindow.js): `src/components/ChatWindow.js`

### Server domains

- [HTTP and socket server](https://github.com/omnivyse/chatli/blob/main/server/server.js): `server/server.js`
- [Account routes](https://github.com/omnivyse/chatli/blob/main/server/routes/auth.js): `server/routes/auth.js`
- [Post routes](https://github.com/omnivyse/chatli/blob/main/server/routes/posts.js): `server/routes/posts.js`
- [Chat routes](https://github.com/omnivyse/chatli/blob/main/server/routes/chats.js): `server/routes/chats.js`
- [Event routes](https://github.com/omnivyse/chatli/blob/main/server/routes/events.js): `server/routes/events.js`
- [Notification routes](https://github.com/omnivyse/chatli/blob/main/server/routes/notifications.js): `server/routes/notifications.js`
- [Admin and analytics](https://github.com/omnivyse/chatli/blob/main/server/routes/admin.js): `server/routes/admin.js`

### Platform services

- [User records](https://github.com/omnivyse/chatli/blob/main/server/models/User.js): `server/models/User.js`
- [Post records](https://github.com/omnivyse/chatli/blob/main/server/models/Post.js): `server/models/Post.js`
- [Chat records](https://github.com/omnivyse/chatli/blob/main/server/models/Chat.js): `server/models/Chat.js`
- [Notification records](https://github.com/omnivyse/chatli/blob/main/server/models/Notification.js): `server/models/Notification.js`
- [Mobile push handling](https://github.com/omnivyse/chatli/blob/main/mobile-app/src/services/pushNotificationService.js): `mobile-app/src/services/pushNotificationService.js`
- [Push delivery](https://github.com/omnivyse/chatli/blob/main/server/services/pushNotificationService.js): `server/services/pushNotificationService.js`

### Other components

- **User**
- **Expo push service**

## Connections

- User → Mobile app: uses (evidence: `mobile-app/App.js`)
- User → Web app: uses (evidence: `src/App.js`)
- Mobile app → Mobile sign-in: routes to (evidence: `mobile-app/App.js`)
- Mobile app → Mobile chat: renders (evidence: `mobile-app/App.js`)
- Web app → Web sign-in: renders (evidence: `src/App.js`)
- Web app → Web feed: renders (evidence: `src/App.js`)
- Web app → Web chat: renders (evidence: `src/App.js`)
- Mobile sign-in → Mobile API client: requests
- Web sign-in → Web API client: requests
- Mobile feed → Mobile API client: requests
- Post creation → Mobile API client: requests
- Profiles and search → Mobile API client: requests
- Web feed → Web API client: requests
- Web profiles → Web API client: requests (evidence: `src/components/UserSearchModal.js`)
- Mobile chat → Mobile API client: requests
- Web chat → Web API client: requests
- Events and clips → Mobile API client: requests
- Mobile API client → HTTP and socket server: calls API
- Web API client → HTTP and socket server: calls API (evidence: `src/services/api.js`)
- HTTP and socket server → Account routes: mounts (evidence: `server/server.js`)
- HTTP and socket server → Post routes: mounts (evidence: `server/server.js`)
- HTTP and socket server → Chat routes: mounts (evidence: `server/server.js`)
- HTTP and socket server → Event routes: mounts (evidence: `server/server.js`)
- HTTP and socket server → Notification routes: mounts (evidence: `server/server.js`)
- HTTP and socket server → Admin and analytics: mounts (evidence: `server/server.js`)
- Account routes → User records: reads and writes (evidence: `server/routes/auth.js`)
- Post routes → Post records: reads and writes (evidence: `server/routes/posts.js`)
- Post routes → User records: reads (evidence: `server/routes/posts.js`)
- Chat routes → Chat records: uses
- Notification routes → Notification records: uses
- Mobile app → Mobile push handling: initializes (evidence: `mobile-app/App.js`)
- Mobile push handling → Mobile API client: updates token (evidence: `mobile-app/src/services/pushNotificationService.js`)
- Push delivery → Expo push service: sends (evidence: `server/services/pushNotificationService.js`)
- Account routes → Push delivery: notifies (evidence: `server/routes/auth.js`)
