# zayrix-bit/xmo architecture

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

## Overview

XMO is an adult video discovery and streaming platform. The user confirms age, browses or searches video and category listings, selects a video, and watches its stream; creator pages provide another discovery path. The backend serves the frontend’s REST and media requests while scraping mirror domains through a rotating proxy pool. The frontend modules are evidenced by excerpts and the source index; backend internals are summarized from the README architecture, not inspected source.

Main entry points: [`frontend/src/App.jsx`](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/App.jsx) (App shell), [`frontend/src/services/api.js`](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/services/api.js) (API client), [`server.js`](https://github.com/zayrix-bit/xmo/blob/main/server.js) (Express API and scraper), [`frontend/src/pages/Home.jsx`](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/pages/Home.jsx) (Browse and search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_app["App shell<br/>[App.jsx]"]
  node_age["Age gate"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_footer["Category footer<br/>[Footer.jsx]"]
  node_disclaimer["Disclaimer page<br/>[Disclaimer.jsx]"]
end

subgraph group_discovery["Content discovery"]
  node_home["Browse and search<br/>[Home.jsx]"]
  node_creator["Creator listings<br/>[Creator.jsx]"]
  node_watch["Video player<br/>[Watch.jsx]"]
  node_preview["Hover preview<br/>[HoverPreview.jsx]"]
  node_categories["Category state"]
end

subgraph group_backend["Scraping and delivery"]
  node_api["API client<br/>[api.js]"]
  node_server["Express API and scraper<br/>[server.js]"]
  node_cache[("Memory cache<br/>[server.js]")]
  node_proxy["Proxy rotation pool<br/>[server.js]"]
  node_stream["HLS and media proxy<br/>[server.js]"]
end

subgraph group_network["Upstream network"]
  node_mirrors["Video mirrors"]
  node_outbound["Outbound proxies"]
end

node_visitor(("Viewer"))

node_visitor -->|"confirms age"| node_age
node_app -->|"shows gate"| node_age
node_app -->|"renders"| node_navbar
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_watch
node_app -->|"routes to"| node_creator
node_app -->|"routes to"| node_disclaimer
node_app -->|"renders"| node_footer
node_home -->|"requests listings"| node_api
node_creator -->|"requests creator"| node_api
node_watch -->|"requests video"| node_api
node_categories -->|"loads categories"| node_api
node_footer -->|"reads categories"| node_categories
node_home -->|"reads categories"| node_categories
node_home -->|"renders previews"| node_preview
node_creator -->|"renders previews"| node_preview
node_watch -->|"renders previews"| node_preview
node_api -->|"calls REST API"| node_server
node_server -->|"uses cache"| node_cache
node_server -->|"dispatches requests"| node_proxy
node_server -->|"proxies media"| node_stream
node_proxy -->|"rotates through"| node_outbound
node_proxy -->|"scrapes"| node_mirrors
node_mirrors -->|"returns streams"| node_server
node_stream -->|"serves proxied media"| node_api

click node_app "https://github.com/zayrix-bit/xmo/blob/main/frontend/src/App.jsx"
click node_age "https://github.com/zayrix-bit/xmo/blob/main/frontend/src/components/AgeVerification.jsx"
click node_navbar "https://github.com/zayrix-bit/xmo/blob/main/frontend/src/components/Navbar.jsx"
click node_footer "https://github.com/zayrix-bit/xmo/blob/main/frontend/src/components/Footer.jsx"
click node_home "https://github.com/zayrix-bit/xmo/blob/main/frontend/src/pages/Home.jsx"
click node_creator "https://github.com/zayrix-bit/xmo/blob/main/frontend/src/pages/Creator.jsx"
click node_watch "https://github.com/zayrix-bit/xmo/blob/main/frontend/src/pages/Watch.jsx"
click node_disclaimer "https://github.com/zayrix-bit/xmo/blob/main/frontend/src/pages/Disclaimer.jsx"
click node_preview "https://github.com/zayrix-bit/xmo/blob/main/frontend/src/components/HoverPreview.jsx"
click node_categories "https://github.com/zayrix-bit/xmo/blob/main/frontend/src/context/CategoriesContext.jsx"
click node_api "https://github.com/zayrix-bit/xmo/blob/main/frontend/src/services/api.js"
click node_server "https://github.com/zayrix-bit/xmo/blob/main/server.js"
click node_cache "https://github.com/zayrix-bit/xmo/blob/main/server.js"
click node_proxy "https://github.com/zayrix-bit/xmo/blob/main/server.js"
click node_stream "https://github.com/zayrix-bit/xmo/blob/main/server.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_app,node_age,node_navbar,node_footer,node_disclaimer,node_visitor toneBlue
class node_home,node_creator,node_watch,node_preview,node_categories toneAmber
class node_api,node_server,node_cache,node_proxy,node_stream toneMint
class node_mirrors,node_outbound toneRose
```

## Components

### Frontend experience

- [App shell](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Age gate](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/components/AgeVerification.jsx): `frontend/src/components/AgeVerification.jsx`
- [Navigation](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [Category footer](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/components/Footer.jsx): `frontend/src/components/Footer.jsx`
- [Disclaimer page](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/pages/Disclaimer.jsx): `frontend/src/pages/Disclaimer.jsx`

### Content discovery

- [Browse and search](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Creator listings](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/pages/Creator.jsx): `frontend/src/pages/Creator.jsx`
- [Video player](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/pages/Watch.jsx): `frontend/src/pages/Watch.jsx`
- [Hover preview](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/components/HoverPreview.jsx): `frontend/src/components/HoverPreview.jsx`
- [Category state](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/context/CategoriesContext.jsx): `frontend/src/context/CategoriesContext.jsx`

### Scraping and delivery

- [API client](https://github.com/zayrix-bit/xmo/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Express API and scraper](https://github.com/zayrix-bit/xmo/blob/main/server.js): `server.js`
- [Memory cache](https://github.com/zayrix-bit/xmo/blob/main/server.js): `server.js`
- [Proxy rotation pool](https://github.com/zayrix-bit/xmo/blob/main/server.js): `server.js`
- [HLS and media proxy](https://github.com/zayrix-bit/xmo/blob/main/server.js): `server.js`

### Upstream network

- **Video mirrors**
- **Outbound proxies**

### Other components

- **Viewer**

## Connections

- Viewer → Age gate: confirms age
- App shell → Age gate: shows gate (evidence: `frontend/src/App.jsx`)
- App shell → Navigation: renders (evidence: `frontend/src/App.jsx`)
- App shell → Browse and search: routes to (evidence: `frontend/src/App.jsx`)
- App shell → Video player: routes to (evidence: `frontend/src/App.jsx`)
- App shell → Creator listings: routes to (evidence: `frontend/src/App.jsx`)
- App shell → Disclaimer page: routes to (evidence: `frontend/src/App.jsx`)
- App shell → Category footer: renders (evidence: `frontend/src/App.jsx`)
- Browse and search → API client: requests listings (evidence: `frontend/src/pages/Home.jsx`)
- Creator listings → API client: requests creator (evidence: `frontend/src/pages/Creator.jsx`)
- Video player → API client: requests video (evidence: `frontend/src/pages/Watch.jsx`)
- Category state → API client: loads categories (evidence: `frontend/src/context/CategoriesContext.jsx`)
- Category footer → Category state: reads categories (evidence: `frontend/src/components/Footer.jsx`)
- Browse and search → Category state: reads categories (evidence: `frontend/src/pages/Home.jsx`)
- Browse and search → Hover preview: renders previews (evidence: `frontend/src/pages/Home.jsx`)
- Creator listings → Hover preview: renders previews (evidence: `frontend/src/pages/Creator.jsx`)
- Video player → Hover preview: renders previews (evidence: `frontend/src/pages/Watch.jsx`)
- API client → Express API and scraper: calls REST API (evidence: `README.md`)
- Express API and scraper → Memory cache: uses cache (evidence: `README.md`)
- Express API and scraper → Proxy rotation pool: dispatches requests (evidence: `README.md`)
- Express API and scraper → HLS and media proxy: proxies media (evidence: `README.md`)
- Proxy rotation pool → Outbound proxies: rotates through (evidence: `README.md`)
- Proxy rotation pool → Video mirrors: scrapes (evidence: `README.md`)
- Video mirrors → Express API and scraper: returns streams (evidence: `README.md`)
- HLS and media proxy → API client: serves proxied media (evidence: `README.md`)
