# 19010853/ithust-app architecture

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

- Interactive diagram: https://gitdiagram.com/19010853/ithust-app
- Repository: https://github.com/19010853/ithust-app

## Overview

IT HUST App is a microservices backend for a marketplace: users enter through the gateway, which forwards API requests to services for authentication, profiles, gigs, chat, orders, reviews, and notifications. The README describes the service boundaries and platform capabilities; sampled source confirms review persistence and fanout, and auth-to-user messaging. The graph preserves those documented product areas, but omits unverified internal call chains and deployment infrastructure.

Main entry points: [`server/1-gateway-service/src`](https://github.com/19010853/ithust-app/tree/main/server/1-gateway-service/src) (API gateway), [`server/3-auth-service/src`](https://github.com/19010853/ithust-app/tree/main/server/3-auth-service/src) (Authentication), [`server/8-review-service/src/services/review.service.ts`](https://github.com/19010853/ithust-app/blob/main/server/8-review-service/src/services/review.service.ts) (Reviews & ratings), [`server/5-gig-service/src`](https://github.com/19010853/ithust-app/tree/main/server/5-gig-service/src) (Gig catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_edge["API Edge"]
  node_gateway["API gateway"]
end

subgraph group_identity["Identity &amp; Profiles"]
  node_auth["Authentication"]
  node_profiles["Buyer &amp; seller profiles"]
  node_authdb[("Auth database<br/>[database.ts]")]
end

subgraph group_market["Marketplace"]
  node_gigs["Gig catalog"]
  node_gigsearch["Gig search<br/>[search.service.ts]"]
  node_elasticsearch[("Elasticsearch<br/>[elasticsearch.ts]")]
  node_orders["Orders &amp; lifecycle<br/>[order.service.ts]"]
  node_reviews["Reviews &amp; ratings<br/>[review.service.ts]"]
  node_reviewdb[("Review database<br/>[database.ts]")]
end

subgraph group_support["Messaging &amp; Notifications"]
  node_chat["Real-time chat"]
  node_notifications["Email notifications"]
  node_reviewqueue["Review fanout<br/>[review.producer.ts]"]
end

node_users(("Platform users"))

node_users -->|"request"| node_gateway
node_gateway -->|"forwards API"| node_auth
node_gateway -->|"forwards API"| node_profiles
node_gateway -->|"forwards API"| node_gigs
node_gateway -->|"forwards API"| node_chat
node_gateway -->|"forwards API"| node_orders
node_gateway -->|"forwards API"| node_reviews
node_auth -->|"reads/writes"| node_authdb
node_auth -->|"publishes buyer details"| node_profiles
node_gigs -->|"offers search"| node_gigsearch
node_gigsearch -->|"searches"| node_elasticsearch
node_reviews -->|"reads/writes"| node_reviewdb
node_reviews -->|"publishes review details"| node_reviewqueue
node_orders -.->|"uses notifications"| node_notifications

click node_gateway "https://github.com/19010853/ithust-app/tree/main/server/1-gateway-service/src"
click node_auth "https://github.com/19010853/ithust-app/tree/main/server/3-auth-service/src"
click node_profiles "https://github.com/19010853/ithust-app/tree/main/server/4-users-service/src"
click node_authdb "https://github.com/19010853/ithust-app/blob/main/server/3-auth-service/src/database.ts"
click node_gigs "https://github.com/19010853/ithust-app/tree/main/server/5-gig-service/src"
click node_gigsearch "https://github.com/19010853/ithust-app/blob/main/server/5-gig-service/src/services/search.service.ts"
click node_elasticsearch "https://github.com/19010853/ithust-app/blob/main/server/5-gig-service/src/elasticsearch.ts"
click node_orders "https://github.com/19010853/ithust-app/blob/main/server/7-order-service/src/services/order.service.ts"
click node_reviews "https://github.com/19010853/ithust-app/blob/main/server/8-review-service/src/services/review.service.ts"
click node_reviewdb "https://github.com/19010853/ithust-app/blob/main/server/8-review-service/src/database.ts"
click node_chat "https://github.com/19010853/ithust-app/tree/main/server/6-chat-service/src"
click node_notifications "https://github.com/19010853/ithust-app/tree/main/server/2-notification-service/src"
click node_reviewqueue "https://github.com/19010853/ithust-app/blob/main/server/8-review-service/src/queues/review.producer.ts"

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_gateway,node_users toneBlue
class node_auth,node_profiles,node_authdb toneAmber
class node_gigs,node_gigsearch,node_elasticsearch,node_orders,node_reviews,node_reviewdb toneMint
class node_chat,node_notifications,node_reviewqueue toneRose
```

## Components

### API Edge

- [API gateway](https://github.com/19010853/ithust-app/tree/main/server/1-gateway-service/src): `server/1-gateway-service/src`

### Identity & Profiles

- [Authentication](https://github.com/19010853/ithust-app/tree/main/server/3-auth-service/src): `server/3-auth-service/src`
- [Buyer & seller profiles](https://github.com/19010853/ithust-app/tree/main/server/4-users-service/src): `server/4-users-service/src`
- [Auth database](https://github.com/19010853/ithust-app/blob/main/server/3-auth-service/src/database.ts): `server/3-auth-service/src/database.ts`

### Marketplace

- [Gig catalog](https://github.com/19010853/ithust-app/tree/main/server/5-gig-service/src): `server/5-gig-service/src`
- [Gig search](https://github.com/19010853/ithust-app/blob/main/server/5-gig-service/src/services/search.service.ts): `server/5-gig-service/src/services/search.service.ts`
- [Elasticsearch](https://github.com/19010853/ithust-app/blob/main/server/5-gig-service/src/elasticsearch.ts): `server/5-gig-service/src/elasticsearch.ts`
- [Orders & lifecycle](https://github.com/19010853/ithust-app/blob/main/server/7-order-service/src/services/order.service.ts): `server/7-order-service/src/services/order.service.ts`
- [Reviews & ratings](https://github.com/19010853/ithust-app/blob/main/server/8-review-service/src/services/review.service.ts): `server/8-review-service/src/services/review.service.ts`
- [Review database](https://github.com/19010853/ithust-app/blob/main/server/8-review-service/src/database.ts): `server/8-review-service/src/database.ts`

### Messaging & Notifications

- [Real-time chat](https://github.com/19010853/ithust-app/tree/main/server/6-chat-service/src): `server/6-chat-service/src`
- [Email notifications](https://github.com/19010853/ithust-app/tree/main/server/2-notification-service/src): `server/2-notification-service/src`
- [Review fanout](https://github.com/19010853/ithust-app/blob/main/server/8-review-service/src/queues/review.producer.ts): `server/8-review-service/src/queues/review.producer.ts`

### Other components

- **Platform users**

## Connections

- Platform users → API gateway: request
- API gateway → Authentication: forwards API
- API gateway → Buyer & seller profiles: forwards API
- API gateway → Gig catalog: forwards API
- API gateway → Real-time chat: forwards API
- API gateway → Orders & lifecycle: forwards API
- API gateway → Reviews & ratings: forwards API (evidence: `server/1-gateway-service/src/services/api/review.service.ts`)
- Authentication → Auth database: reads/writes (evidence: `server/3-auth-service/src/services/auth.service.ts`)
- Authentication → Buyer & seller profiles: publishes buyer details (evidence: `server/3-auth-service/src/services/auth.service.ts`)
- Gig catalog → Gig search: offers search
- Gig search → Elasticsearch: searches (evidence: `server/5-gig-service/src/services/search.service.ts`)
- Reviews & ratings → Review database: reads/writes (evidence: `server/8-review-service/src/services/review.service.ts`)
- Reviews & ratings → Review fanout: publishes review details (evidence: `server/8-review-service/src/services/review.service.ts`)
- Orders & lifecycle → Email notifications: uses notifications
