# shehrozali6465372-ctrl/modern-living-hub architecture

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

- Interactive diagram: https://gitdiagram.com/shehrozali6465372-ctrl/modern-living-hub
- Repository: https://github.com/shehrozali6465372-ctrl/modern-living-hub

## Overview

Modern Living Hub is a static content and publishing site backed by a separately deployed Node/Express service. The principal documented flow is a user connecting Pinterest, completing OAuth through the backend, then using the Pinterest page to manage boards and publish pins. TikTok and YouTube have separate OAuth and publishing integrations; an affiliate scheduling capability is also visible in the tree and backend excerpt. Backend implementation details beyond the supplied excerpts are represented only where supported by documentation or indexed references.

Main entry points: [`server/src/server.js`](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/server/src/server.js) (Express API), [`index.html`](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/index.html) (Hub homepage), [`pinterest.html`](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/pinterest.html) (Pinterest workspace), [`tiktok.html`](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/tiktok.html) (TikTok workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Site and publishing UI"]
  node_home["Hub homepage<br/>[index.html]"]
  node_pinterest_ui["Pinterest workspace<br/>[pinterest.html]"]
  node_tiktok_ui["TikTok workspace<br/>[tiktok.html]"]
  node_youtube_ui["YouTube workspace<br/>[youtube.html]"]
  node_main_js["Core site behavior<br/>[main.js]"]
  node_pinterest_js["Pinterest client<br/>[pinterest.js]"]
  node_tiktok_js["TikTok client<br/>[tiktok.js]"]
  node_youtube_js["YouTube client<br/>[youtube.js]"]
end

subgraph group_backend["Backend and account flows"]
  node_api_server["Express API<br/>[server.js]"]
end

subgraph group_channels["Channel integrations"]
  node_pinterest_oauth["Pinterest OAuth and API<br/>[server.js]"]
  node_tiktok_api["TikTok OAuth and posting<br/>[tiktok.js]"]
  node_youtube_api["YouTube OAuth and uploads<br/>[youtube.js]"]
end

subgraph group_automation["Publishing automation"]
  node_scheduler["Affiliate scheduler"]
end

node_user(("Site visitor"))
node_pinterest_agent{{"Pinterest Agent"}}
node_pinterest{{"Pinterest"}}
node_tiktok{{"TikTok"}}
node_google{{"Google / YouTube"}}

node_user -->|"visits"| node_home
node_user -->|"manages pins"| node_pinterest_ui
node_user -.->|"publishes videos"| node_tiktok_ui
node_user -.->|"uploads videos"| node_youtube_ui
node_home -->|"opens workspace"| node_pinterest_ui
node_pinterest_ui -.->|"runs client"| node_pinterest_js
node_tiktok_ui -.->|"runs client"| node_tiktok_js
node_youtube_ui -.->|"runs client"| node_youtube_js
node_home -.->|"runs site logic"| node_main_js
node_pinterest_js -->|"calls backend"| node_api_server
node_tiktok_js -.->|"calls backend"| node_api_server
node_youtube_js -.->|"calls backend"| node_api_server
node_api_server -->|"handles OAuth and API"| node_pinterest_oauth
node_api_server -->|"mounts integration"| node_tiktok_api
node_api_server -->|"mounts integration"| node_youtube_api
node_pinterest_oauth -->|"authenticates and publishes"| node_pinterest
node_pinterest_oauth -->|"persists credentials"| node_pinterest_agent
node_tiktok_api -->|"authenticates and posts"| node_tiktok
node_youtube_api -->|"authenticates and uploads"| node_google
node_user -.->|"sets publishing schedule"| node_scheduler
node_scheduler -.->|"submits schedules"| node_api_server

click node_home "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/index.html"
click node_pinterest_ui "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/pinterest.html"
click node_tiktok_ui "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/tiktok.html"
click node_youtube_ui "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/youtube.html"
click node_main_js "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/assets/js/main.js"
click node_pinterest_js "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/assets/js/pinterest.js"
click node_tiktok_js "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/assets/js/tiktok.js"
click node_youtube_js "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/assets/js/youtube.js"
click node_api_server "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/server/src/server.js"
click node_pinterest_oauth "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/server/src/server.js"
click node_tiktok_api "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/server/src/tiktok.js"
click node_youtube_api "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/server/src/youtube.js"
click node_scheduler "https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/assets/js/affiliate-scheduler.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_home,node_pinterest_ui,node_tiktok_ui,node_youtube_ui,node_main_js,node_pinterest_js,node_tiktok_js,node_youtube_js toneBlue
class node_api_server toneAmber
class node_pinterest_oauth,node_tiktok_api,node_youtube_api toneMint
class node_scheduler toneRose
class node_user,node_pinterest_agent,node_pinterest,node_tiktok,node_google toneIndigo
```

## Components

### Site and publishing UI

- [Hub homepage](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/index.html): `index.html`
- [Pinterest workspace](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/pinterest.html): `pinterest.html`
- [TikTok workspace](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/tiktok.html): `tiktok.html`
- [YouTube workspace](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/youtube.html): `youtube.html`
- [Core site behavior](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/assets/js/main.js): `assets/js/main.js`
- [Pinterest client](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/assets/js/pinterest.js): `assets/js/pinterest.js`
- [TikTok client](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/assets/js/tiktok.js): `assets/js/tiktok.js`
- [YouTube client](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/assets/js/youtube.js): `assets/js/youtube.js`

### Backend and account flows

- [Express API](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/server/src/server.js): `server/src/server.js`

### Channel integrations

- [Pinterest OAuth and API](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/server/src/server.js): `server/src/server.js`
- [TikTok OAuth and posting](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/server/src/tiktok.js): `server/src/tiktok.js`
- [YouTube OAuth and uploads](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/server/src/youtube.js): `server/src/youtube.js`

### Publishing automation

- [Affiliate scheduler](https://github.com/shehrozali6465372-ctrl/modern-living-hub/blob/main/assets/js/affiliate-scheduler.js): `assets/js/affiliate-scheduler.js`

### Other components

- **Site visitor**
- **Pinterest Agent**
- **Pinterest**
- **TikTok**
- **Google / YouTube**

## Connections

- Site visitor → Hub homepage: visits (evidence: `README.md`)
- Site visitor → Pinterest workspace: manages pins (evidence: `README.md`)
- Site visitor → TikTok workspace: publishes videos
- Site visitor → YouTube workspace: uploads videos
- Hub homepage → Pinterest workspace: opens workspace (evidence: `README.md`)
- Pinterest workspace → Pinterest client: runs client
- TikTok workspace → TikTok client: runs client
- YouTube workspace → YouTube client: runs client
- Hub homepage → Core site behavior: runs site logic
- Pinterest client → Express API: calls backend (evidence: `README.md`)
- TikTok client → Express API: calls backend
- YouTube client → Express API: calls backend
- Express API → Pinterest OAuth and API: handles OAuth and API (evidence: `README.md`)
- Express API → TikTok OAuth and posting: mounts integration (evidence: `server/src/server.js`)
- Express API → YouTube OAuth and uploads: mounts integration (evidence: `server/src/server.js`)
- Pinterest OAuth and API → Pinterest: authenticates and publishes (evidence: `README.md`)
- Pinterest OAuth and API → Pinterest Agent: persists credentials
- TikTok OAuth and posting → TikTok: authenticates and posts
- YouTube OAuth and uploads → Google / YouTube: authenticates and uploads
- Site visitor → Affiliate scheduler: sets publishing schedule
- Affiliate scheduler → Express API: submits schedules
