# ryancheung0428/steup-growth architecture

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

- Interactive diagram: https://gitdiagram.com/ryancheung0428/steup-growth
- Repository: https://github.com/ryancheung0428/steup-growth

## Overview

Steup Growth is a multimodal chat assistant with authenticated chat, media analysis, document retrieval, video reporting, and browser-based pose detection. Its principal workflow runs from the React chat interface through Flask HTTP or Socket.IO entry points to the ADK agent layer, with optional RAG context and cloud-backed files. Separate product paths support video analysis and pose assessment; administration manages users and the knowledge base. README relationships are documented at a high level; unsampled modules are included where the README or source index establishes their role, without inferring detailed internal calls.

Main entry points: [`app/video_access_routes.py`](https://github.com/ryancheung0428/steup-growth/blob/main/app/video_access_routes.py) (Video access), [`app/models.py`](https://github.com/ryancheung0428/steup-growth/blob/main/app/models.py) (Application database), [`app/__init__.py`](https://github.com/ryancheung0428/steup-growth/blob/main/app/__init__.py) (Flask app), [`frontend/src/App.jsx`](https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/App.jsx) (React app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_spa["React app<br/>[App.jsx]"]
  node_auth_ui["Auth state<br/>[AuthContext.jsx]"]
  node_settings_ui["User settings"]
  node_chat_ui["Chat interface<br/>[ChatPage.jsx]"]
  node_pose_ui["Pose detection UI<br/>[PoseDetection.jsx]"]
  node_pose_runtime["Pose runtime"]
end

subgraph group_backend["Backend services"]
  node_flask["Flask app<br/>[__init__.py]"]
  node_auth_api["Authentication API<br/>[auth.py]"]
  node_chat_routes["HTTP API routes<br/>[routes.py]"]
  node_socket["Realtime chat events<br/>[socket_events.py]"]
  node_admin["Admin services<br/>[admin_routes.py]"]
  node_video_routes["Video access"]
end

subgraph group_ai_media["AI and media"]
  node_agent["Chat agents<br/>[chat_agent.py]"]
  node_video_agent["Video analysis agent"]
  node_video_processor["Video processing<br/>[video_processor.py]"]
  node_reports["Report generation"]
  node_pose_assessment["Pose assessment<br/>[pose_assessment.py]"]
end

subgraph group_knowledge["Knowledge retrieval"]
  node_rag_processor["Document ingestion<br/>[processor.py]"]
  node_chunker["Document chunking<br/>[chunker.py]"]
  node_embeddings["Embedding service<br/>[embeddings.py]"]
  node_retriever["Similarity retrieval<br/>[retriever.py]"]
end

subgraph group_platform["Data and integrations"]
  node_db[("Application database<br/>[models.py]")]
  node_gcs[("Cloud file storage<br/>[gcp_bucket.py]")]
  node_vertex{{"Vertex AI"}}
  node_firebase{{"Firebase Auth"}}
end

node_user(("User"))

node_user -->|"uses"| node_spa
node_spa -->|"provides auth"| node_auth_ui
node_spa -->|"routes to"| node_chat_ui
node_spa -->|"routes to"| node_pose_ui
node_chat_ui -->|"sends requests"| node_chat_routes
node_chat_ui -->|"streams chat"| node_socket
node_auth_ui -.->|"authenticates"| node_auth_api
node_settings_ui -->|"loads profile"| node_chat_routes
node_flask -->|"registers"| node_chat_routes
node_flask -->|"registers"| node_auth_api
node_flask -->|"registers"| node_admin
node_flask -->|"registers"| node_video_routes
node_chat_routes -->|"dispatches chat"| node_agent
node_socket -.->|"dispatches chat"| node_agent
node_agent -->|"searches context"| node_retriever
node_retriever -->|"embeds query"| node_embeddings
node_embeddings -->|"requests embeddings"| node_vertex
node_retriever -->|"queries vectors"| node_db
node_admin -->|"queues documents"| node_rag_processor
node_rag_processor -->|"chunks documents"| node_chunker
node_rag_processor -->|"creates vectors"| node_embeddings
node_rag_processor -->|"stores document data"| node_db
node_admin -->|"stores documents"| node_gcs
node_video_routes -->|"processes video"| node_video_processor
node_video_routes -->|"analyzes video"| node_video_agent
node_video_routes -->|"generates reports"| node_reports
node_video_routes -->|"stores media"| node_gcs
node_video_routes -->|"stores records"| node_db
node_pose_ui -.->|"runs detection"| node_pose_runtime
node_pose_ui -->|"submits assessment"| node_pose_assessment
node_pose_assessment -.->|"stores assessments"| node_db
node_auth_api -->|"reads user data"| node_db
node_auth_api -.->|"supports provider"| node_firebase

click node_spa "https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/contexts/AuthContext.jsx"
click node_settings_ui "https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/contexts/SettingsContext.jsx"
click node_chat_ui "https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/pages/ChatPage.jsx"
click node_pose_ui "https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/pages/PoseDetection.jsx"
click node_pose_runtime "https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/lib/poseDetectionRuntime.js"
click node_flask "https://github.com/ryancheung0428/steup-growth/blob/main/app/__init__.py"
click node_auth_api "https://github.com/ryancheung0428/steup-growth/blob/main/app/auth.py"
click node_chat_routes "https://github.com/ryancheung0428/steup-growth/blob/main/app/routes.py"
click node_socket "https://github.com/ryancheung0428/steup-growth/blob/main/app/socket_events.py"
click node_admin "https://github.com/ryancheung0428/steup-growth/blob/main/app/admin_routes.py"
click node_video_routes "https://github.com/ryancheung0428/steup-growth/blob/main/app/video_access_routes.py"
click node_agent "https://github.com/ryancheung0428/steup-growth/blob/main/app/agent/chat_agent.py"
click node_video_agent "https://github.com/ryancheung0428/steup-growth/blob/main/app/agent/video_analysis_agent.py"
click node_video_processor "https://github.com/ryancheung0428/steup-growth/blob/main/app/video_processor.py"
click node_reports "https://github.com/ryancheung0428/steup-growth/blob/main/app/report_generator.py"
click node_pose_assessment "https://github.com/ryancheung0428/steup-growth/blob/main/app/pose_detection/pose_assessment.py"
click node_rag_processor "https://github.com/ryancheung0428/steup-growth/blob/main/app/rag/processor.py"
click node_chunker "https://github.com/ryancheung0428/steup-growth/blob/main/app/rag/chunker.py"
click node_embeddings "https://github.com/ryancheung0428/steup-growth/blob/main/app/rag/embeddings.py"
click node_retriever "https://github.com/ryancheung0428/steup-growth/blob/main/app/rag/retriever.py"
click node_db "https://github.com/ryancheung0428/steup-growth/blob/main/app/models.py"
click node_gcs "https://github.com/ryancheung0428/steup-growth/blob/main/app/gcp_bucket.py"

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_spa,node_auth_ui,node_settings_ui,node_chat_ui,node_pose_ui,node_pose_runtime,node_user toneBlue
class node_flask,node_auth_api,node_chat_routes,node_socket,node_admin,node_video_routes toneAmber
class node_agent,node_video_agent,node_video_processor,node_reports,node_pose_assessment toneMint
class node_rag_processor,node_chunker,node_embeddings,node_retriever toneRose
class node_db,node_gcs,node_vertex,node_firebase toneIndigo
```

## Components

### Web client

- [React app](https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth state](https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/contexts/AuthContext.jsx): `frontend/src/contexts/AuthContext.jsx`
- [User settings](https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/contexts/SettingsContext.jsx): `frontend/src/contexts/SettingsContext.jsx`
- [Chat interface](https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/pages/ChatPage.jsx): `frontend/src/pages/ChatPage.jsx`
- [Pose detection UI](https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/pages/PoseDetection.jsx): `frontend/src/pages/PoseDetection.jsx`
- [Pose runtime](https://github.com/ryancheung0428/steup-growth/blob/main/frontend/src/lib/poseDetectionRuntime.js): `frontend/src/lib/poseDetectionRuntime.js`

### Backend services

- [Flask app](https://github.com/ryancheung0428/steup-growth/blob/main/app/__init__.py): `app/__init__.py`
- [Authentication API](https://github.com/ryancheung0428/steup-growth/blob/main/app/auth.py): `app/auth.py`
- [HTTP API routes](https://github.com/ryancheung0428/steup-growth/blob/main/app/routes.py): `app/routes.py`
- [Realtime chat events](https://github.com/ryancheung0428/steup-growth/blob/main/app/socket_events.py): `app/socket_events.py`
- [Admin services](https://github.com/ryancheung0428/steup-growth/blob/main/app/admin_routes.py): `app/admin_routes.py`
- [Video access](https://github.com/ryancheung0428/steup-growth/blob/main/app/video_access_routes.py): `app/video_access_routes.py`

### AI and media

- [Chat agents](https://github.com/ryancheung0428/steup-growth/blob/main/app/agent/chat_agent.py): `app/agent/chat_agent.py`
- [Video analysis agent](https://github.com/ryancheung0428/steup-growth/blob/main/app/agent/video_analysis_agent.py): `app/agent/video_analysis_agent.py`
- [Video processing](https://github.com/ryancheung0428/steup-growth/blob/main/app/video_processor.py): `app/video_processor.py`
- [Report generation](https://github.com/ryancheung0428/steup-growth/blob/main/app/report_generator.py): `app/report_generator.py`
- [Pose assessment](https://github.com/ryancheung0428/steup-growth/blob/main/app/pose_detection/pose_assessment.py): `app/pose_detection/pose_assessment.py`

### Knowledge retrieval

- [Document ingestion](https://github.com/ryancheung0428/steup-growth/blob/main/app/rag/processor.py): `app/rag/processor.py`
- [Document chunking](https://github.com/ryancheung0428/steup-growth/blob/main/app/rag/chunker.py): `app/rag/chunker.py`
- [Embedding service](https://github.com/ryancheung0428/steup-growth/blob/main/app/rag/embeddings.py): `app/rag/embeddings.py`
- [Similarity retrieval](https://github.com/ryancheung0428/steup-growth/blob/main/app/rag/retriever.py): `app/rag/retriever.py`

### Data and integrations

- [Application database](https://github.com/ryancheung0428/steup-growth/blob/main/app/models.py): `app/models.py`
- [Cloud file storage](https://github.com/ryancheung0428/steup-growth/blob/main/app/gcp_bucket.py): `app/gcp_bucket.py`
- **Vertex AI**
- **Firebase Auth**

### Other components

- **User**

## Connections

- User → React app: uses (evidence: `README.md`)
- React app → Auth state: provides auth (evidence: `frontend/src/App.jsx`)
- React app → Chat interface: routes to (evidence: `frontend/src/App.jsx`)
- React app → Pose detection UI: routes to (evidence: `frontend/src/App.jsx`)
- Chat interface → HTTP API routes: sends requests (evidence: `README.md`)
- Chat interface → Realtime chat events: streams chat (evidence: `README.md`)
- Auth state → Authentication API: authenticates
- User settings → HTTP API routes: loads profile (evidence: `frontend/src/contexts/SettingsContext.jsx`)
- Flask app → HTTP API routes: registers (evidence: `app/__init__.py`)
- Flask app → Authentication API: registers (evidence: `app/__init__.py`)
- Flask app → Admin services: registers (evidence: `app/__init__.py`)
- Flask app → Video access: registers (evidence: `app/__init__.py`)
- HTTP API routes → Chat agents: dispatches chat (evidence: `app/routes.py`)
- Realtime chat events → Chat agents: dispatches chat
- Chat agents → Similarity retrieval: searches context (evidence: `app/agent/chat_agent.py`)
- Similarity retrieval → Embedding service: embeds query (evidence: `app/rag/retriever.py`)
- Embedding service → Vertex AI: requests embeddings (evidence: `app/rag/embeddings.py`)
- Similarity retrieval → Application database: queries vectors (evidence: `app/rag/retriever.py`)
- Admin services → Document ingestion: queues documents (evidence: `app/admin_routes.py`)
- Document ingestion → Document chunking: chunks documents (evidence: `app/rag/processor.py`)
- Document ingestion → Embedding service: creates vectors (evidence: `app/rag/processor.py`)
- Document ingestion → Application database: stores document data (evidence: `app/rag/processor.py`)
- Admin services → Cloud file storage: stores documents (evidence: `app/admin_routes.py`)
- Video access → Video processing: processes video (evidence: `app/video_access_routes.py`)
- Video access → Video analysis agent: analyzes video (evidence: `app/video_access_routes.py`)
- Video access → Report generation: generates reports (evidence: `app/video_access_routes.py`)
- Video access → Cloud file storage: stores media (evidence: `app/video_access_routes.py`)
- Video access → Application database: stores records (evidence: `app/video_access_routes.py`)
- Pose detection UI → Pose runtime: runs detection
- Pose detection UI → Pose assessment: submits assessment
- Pose assessment → Application database: stores assessments
- Authentication API → Application database: reads user data (evidence: `app/auth.py`)
- Authentication API → Firebase Auth: supports provider (evidence: `README.md`)
