# jingyuzhang-scu/helpme architecture

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

- Interactive diagram: https://gitdiagram.com/jingyuzhang-scu/helpme
- Repository: https://github.com/jingyuzhang-scu/helpme

## Overview

HelpMe is a location-based help and service marketplace, with a user-facing Ionic app and a separate admin app. The principal user journey is discovering help or events and proceeding toward provider interaction, orders, and reviews; chat supports communication around that activity. The tree also shows location, translation, verification, uploads, and staff management capabilities. Sampled code confirms authentication and review behavior plus parts of chat persistence. Other backend routes and UI components are represented by their paths, but their wiring is not inferred where source was not sampled.

Main entry points: [`src/app/components/tabs/tabs.routes.ts`](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/components/tabs/tabs.routes.ts) (Tab navigation), [`adminAngular/src/app/app.routes.ts`](https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/app.routes.ts) (Admin routes), [`src/app/app.routes.ts`](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/app.routes.ts) (User routes), [`Node/chatHandler.js`](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/chatHandler.js) (Chat handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_user_app["User app"]
  node_mobile["Ionic app<br/>[app.component.ts]"]
  node_user_routes["User routes<br/>[app.routes.ts]"]
  node_tabs["Tab navigation<br/>[tabs.routes.ts]"]
  node_search["Help search<br/>[search.page.ts]"]
  node_events["Events and listings"]
  node_location["Location picker"]
  node_orders["Order activity"]
  node_profile["User profile"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_chat_ui["Chat screens"]
  node_translation["Translation"]
end

subgraph group_admin_app["Admin app"]
  node_admin_app["Admin console<br/>[app.component.ts]"]
  node_admin_routes["Admin routes<br/>[app.routes.ts]"]
  node_verification["Post verification"]
  node_staff["Staff management"]
  node_admin_orders["Order management"]
  node_admin_events["Event management"]
end

subgraph group_api["Backend API"]
  node_api_server["HTTP API<br/>[index.js]"]
  node_auth_api["Auth endpoints<br/>[auth.js]"]
  node_market_api["Marketplace endpoints<br/>[event.js]"]
  node_location_api["Location endpoints<br/>[location.js]"]
  node_order_api["Order endpoints<br/>[order.js]"]
  node_review_api["Review endpoints<br/>[review.js]"]
  node_upload_api["Upload endpoints<br/>[upload.js]"]
  node_verify_api["Verification endpoints<br/>[verify.js]"]
  node_translation_api["Translation endpoint<br/>[translation.js]"]
  node_user_api["User endpoints<br/>[user.js]"]
  node_chat_api["Chat endpoints<br/>[chat.js]"]
end

subgraph group_chat["Chat system"]
  node_socket["Realtime chat<br/>[socketInstance.js]"]
  node_chat_handler["Chat handling<br/>[chatHandler.js]"]
end

subgraph group_data["Persistence"]
  node_sql[("Marketplace database<br/>[help_me_db.js]")]
  node_mongo[("Chat database<br/>[Message.js]")]
end

node_user(("Marketplace user"))
node_admin(("Admin staff"))

node_user -->|"uses"| node_mobile
node_mobile -->|"routes through"| node_user_routes
node_user_routes -->|"loads tabs"| node_tabs
node_tabs -->|"loads tab"| node_search
node_tabs -->|"loads tab"| node_events
node_tabs -->|"loads tab"| node_orders
node_tabs -->|"loads tab"| node_profile
node_user_routes -->|"routes to"| node_chat_ui
node_user_routes -->|"routes to"| node_auth
node_admin -->|"uses"| node_admin_app
node_admin_app -->|"routes through"| node_admin_routes
node_admin_routes -->|"routes to"| node_verification
node_admin_routes -->|"routes to"| node_staff
node_admin_routes -->|"routes to"| node_admin_orders
node_admin_routes -->|"routes to"| node_admin_events
node_auth -->|"requests API"| node_api_server
node_review_api -->|"queries and writes"| node_sql
node_review_api -->|"sends notice"| node_chat_handler
node_chat_handler -->|"stores messages"| node_mongo
node_chat_handler -->|"reads user/event data"| node_sql
node_chat_handler -->|"uses socket"| node_socket

click node_mobile "https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/app.component.ts"
click node_user_routes "https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/app.routes.ts"
click node_tabs "https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/components/tabs/tabs.routes.ts"
click node_search "https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/pages/search/search.page.ts"
click node_events "https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/components/tab4-events-panel/tab4-events-panel.component.ts"
click node_location "https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/components/location-picker/location-picker.component.ts"
click node_orders "https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/components/tab4-orders-panel/tab4-orders-panel.component.ts"
click node_profile "https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/components/tab4-profile-card/tab4-profile-card.component.ts"
click node_auth "https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/services/auth.service.ts"
click node_chat_ui "https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/pages/chat-detail/chat-detail.page.ts"
click node_translation "https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/services/translate.service.ts"
click node_admin_app "https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/app.component.ts"
click node_admin_routes "https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/app.routes.ts"
click node_verification "https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/Components/list-verify-post/list-verify-post.component.ts"
click node_staff "https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/Components/staff-management/staff-management.component.ts"
click node_admin_orders "https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/Components/order-management/order-management.component.ts"
click node_admin_events "https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/Components/event-management/event-management.component.ts"
click node_api_server "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/index.js"
click node_auth_api "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/auth.js"
click node_market_api "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/event.js"
click node_location_api "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/location.js"
click node_order_api "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/order.js"
click node_review_api "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/review.js"
click node_upload_api "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/upload.js"
click node_verify_api "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/verify.js"
click node_translation_api "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/translation.js"
click node_user_api "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/user.js"
click node_chat_api "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/chat.js"
click node_socket "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/socketInstance.js"
click node_chat_handler "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/chatHandler.js"
click node_sql "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/help_me_db.js"
click node_mongo "https://github.com/jingyuzhang-scu/helpme/blob/main/Node/models/Message.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,node_user_routes,node_tabs,node_search,node_events,node_location,node_orders,node_profile,node_auth,node_chat_ui,node_translation,node_user toneBlue
class node_admin_app,node_admin_routes,node_verification,node_staff,node_admin_orders,node_admin_events toneAmber
class node_api_server,node_auth_api,node_market_api,node_location_api,node_order_api,node_review_api,node_upload_api,node_verify_api,node_translation_api,node_user_api,node_chat_api toneMint
class node_socket,node_chat_handler toneRose
class node_sql,node_mongo,node_admin toneIndigo
```

## Components

### User app

- [Ionic app](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/app.component.ts): `src/app/app.component.ts`
- [User routes](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Tab navigation](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/components/tabs/tabs.routes.ts): `src/app/components/tabs/tabs.routes.ts`
- [Help search](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/pages/search/search.page.ts): `src/app/pages/search/search.page.ts`
- [Events and listings](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/components/tab4-events-panel/tab4-events-panel.component.ts): `src/app/components/tab4-events-panel/tab4-events-panel.component.ts`
- [Location picker](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/components/location-picker/location-picker.component.ts): `src/app/components/location-picker/location-picker.component.ts`
- [Order activity](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/components/tab4-orders-panel/tab4-orders-panel.component.ts): `src/app/components/tab4-orders-panel/tab4-orders-panel.component.ts`
- [User profile](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/components/tab4-profile-card/tab4-profile-card.component.ts): `src/app/components/tab4-profile-card/tab4-profile-card.component.ts`
- [Authentication](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/services/auth.service.ts): `src/app/services/auth.service.ts`
- [Chat screens](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/pages/chat-detail/chat-detail.page.ts): `src/app/pages/chat-detail/chat-detail.page.ts`
- [Translation](https://github.com/jingyuzhang-scu/helpme/blob/main/src/app/services/translate.service.ts): `src/app/services/translate.service.ts`

### Admin app

- [Admin console](https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/app.component.ts): `adminAngular/src/app/app.component.ts`
- [Admin routes](https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/app.routes.ts): `adminAngular/src/app/app.routes.ts`
- [Post verification](https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/Components/list-verify-post/list-verify-post.component.ts): `adminAngular/src/app/Components/list-verify-post/list-verify-post.component.ts`
- [Staff management](https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/Components/staff-management/staff-management.component.ts): `adminAngular/src/app/Components/staff-management/staff-management.component.ts`
- [Order management](https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/Components/order-management/order-management.component.ts): `adminAngular/src/app/Components/order-management/order-management.component.ts`
- [Event management](https://github.com/jingyuzhang-scu/helpme/blob/main/adminAngular/src/app/Components/event-management/event-management.component.ts): `adminAngular/src/app/Components/event-management/event-management.component.ts`

### Backend API

- [HTTP API](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/index.js): `Node/index.js`
- [Auth endpoints](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/auth.js): `Node/routes/auth.js`
- [Marketplace endpoints](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/event.js): `Node/routes/event.js`
- [Location endpoints](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/location.js): `Node/routes/location.js`
- [Order endpoints](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/order.js): `Node/routes/order.js`
- [Review endpoints](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/review.js): `Node/routes/review.js`
- [Upload endpoints](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/upload.js): `Node/routes/upload.js`
- [Verification endpoints](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/verify.js): `Node/routes/verify.js`
- [Translation endpoint](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/translation.js): `Node/routes/translation.js`
- [User endpoints](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/user.js): `Node/routes/user.js`
- [Chat endpoints](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/routes/chat.js): `Node/routes/chat.js`

### Chat system

- [Realtime chat](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/socketInstance.js): `Node/socketInstance.js`
- [Chat handling](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/chatHandler.js): `Node/chatHandler.js`

### Persistence

- [Marketplace database](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/help_me_db.js): `Node/help_me_db.js`
- [Chat database](https://github.com/jingyuzhang-scu/helpme/blob/main/Node/models/Message.js): `Node/models/Message.js`

### Other components

- **Marketplace user**
- **Admin staff**

## Connections

- Marketplace user → Ionic app: uses
- Ionic app → User routes: routes through
- User routes → Tab navigation: loads tabs
- Tab navigation → Help search: loads tab
- Tab navigation → Events and listings: loads tab
- Tab navigation → Order activity: loads tab
- Tab navigation → User profile: loads tab
- User routes → Chat screens: routes to
- User routes → Authentication: routes to
- Admin staff → Admin console: uses
- Admin console → Admin routes: routes through
- Admin routes → Post verification: routes to
- Admin routes → Staff management: routes to
- Admin routes → Order management: routes to
- Admin routes → Event management: routes to
- Authentication → HTTP API: requests API
- Review endpoints → Marketplace database: queries and writes
- Review endpoints → Chat handling: sends notice
- Chat handling → Chat database: stores messages
- Chat handling → Marketplace database: reads user/event data
- Chat handling → Realtime chat: uses socket
