# twerif/workzora-be architecture

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

- Interactive diagram: https://gitdiagram.com/twerif/workzora-be
- Repository: https://github.com/twerif/workzora-be

## Overview

Workzora is a freelance-work marketplace: users discover projects and posts, clients publish work, freelancers communicate and manage payment milestones, and administrators oversee categories, content, and identity verification. The API gateway exposes HTTP endpoints and dispatches requests to NestJS services; selected service controllers then delegate to domain services. The tree also shows an admin panel and separate search, bidding, email, and payment-data services. Evidence is limited: README content is empty, and most service implementations and admin-panel request flows were not sampled, so uncertain wiring is omitted.

Main entry points: [`api-gateway/src/main.ts`](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/main.ts) (HTTP API), [`api-gateway/src/projects/projects.controller.ts`](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/projects/projects.controller.ts) (Project routes), [`api-gateway/src/chat/chat.controller.ts`](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/chat/chat.controller.ts) (Chat routes), [`api-gateway/src/posts/posts.controller.ts`](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/posts/posts.controller.ts) (Post routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User Interfaces"]
  node_admin_panel["Admin panel"]
end

subgraph group_gateway["API Gateway"]
  node_gateway_api["HTTP API<br/>[main.ts]"]
  node_auth_api["Authentication routes<br/>[auth.controller.ts]"]
  node_project_api["Project routes"]
  node_chat_api["Chat routes<br/>[chat.controller.ts]"]
  node_posts_api["Post routes"]
  node_kyc_api["KYC routes<br/>[kyc.controller.ts]"]
  node_escrow_api["Escrow routes"]
end

subgraph group_marketplace["Marketplace Services"]
  node_project_service["Projects and categories"]
  node_posts_service["Posts"]
  node_bids_service["Bids"]
  node_search_service["Search"]
  node_chat_service["Chat and messages"]
end

subgraph group_trust["Trust And Payments"]
  node_auth_service["Authentication"]
  node_user_service["User profiles"]
  node_kyc_service["Identity verification"]
  node_escrow_service["Escrow invoices"]
  node_payment_data["Payment data"]
end

subgraph group_support["Platform Services"]
  node_cloudinary["Cloudinary uploads"]
  node_email_service["Email delivery"]
end

node_marketplace_users(("Marketplace users"))
node_admin_user(("Administrator"))
node_monobank["Monobank"]

node_marketplace_users -->|"manage records"| node_admin_panel
node_admin_user -->|"administers"| node_admin_panel
node_marketplace_users -->|"use marketplace"| node_gateway_api
node_gateway_api -->|"routes requests"| node_auth_api
node_gateway_api -->|"routes requests"| node_project_api
node_gateway_api -->|"routes requests"| node_chat_api
node_gateway_api -->|"routes requests"| node_posts_api
node_gateway_api -->|"routes requests"| node_kyc_api
node_gateway_api -->|"routes requests"| node_escrow_api
node_auth_api -->|"dispatches auth"| node_auth_service
node_auth_api -->|"dispatches users"| node_user_service
node_project_api -->|"dispatches projects"| node_project_service
node_project_api -->|"searches projects"| node_search_service
node_project_api -->|"fetches profiles"| node_user_service
node_chat_api -->|"dispatches chat"| node_chat_service
node_chat_api -->|"fetches senders"| node_user_service
node_chat_api -->|"uploads attachments"| node_cloudinary
node_posts_api -->|"dispatches posts"| node_posts_service
node_posts_api -->|"searches posts"| node_search_service
node_posts_api -->|"uploads images"| node_cloudinary
node_kyc_api -->|"dispatches verification"| node_kyc_service
node_kyc_api -->|"uploads documents"| node_cloudinary
node_escrow_api -->|"dispatches invoices"| node_escrow_service
node_escrow_service -.->|"handles payments"| node_monobank
node_project_service -->|"hosts chat"| node_chat_service

click node_admin_panel "https://github.com/twerif/workzora-be/tree/main/admin-panel/src"
click node_gateway_api "https://github.com/twerif/workzora-be/blob/main/api-gateway/src/main.ts"
click node_auth_api "https://github.com/twerif/workzora-be/blob/main/api-gateway/src/auth/auth.controller.ts"
click node_project_api "https://github.com/twerif/workzora-be/blob/main/api-gateway/src/projects/projects.controller.ts"
click node_chat_api "https://github.com/twerif/workzora-be/blob/main/api-gateway/src/chat/chat.controller.ts"
click node_posts_api "https://github.com/twerif/workzora-be/blob/main/api-gateway/src/posts/posts.controller.ts"
click node_kyc_api "https://github.com/twerif/workzora-be/blob/main/api-gateway/src/kyc/kyc.controller.ts"
click node_escrow_api "https://github.com/twerif/workzora-be/blob/main/api-gateway/src/escrow/escrow.controller.ts"
click node_project_service "https://github.com/twerif/workzora-be/tree/main/project-service/src"
click node_posts_service "https://github.com/twerif/workzora-be/tree/main/posts-service/src"
click node_bids_service "https://github.com/twerif/workzora-be/tree/main/bids-service/src"
click node_search_service "https://github.com/twerif/workzora-be/tree/main/search-service/src"
click node_chat_service "https://github.com/twerif/workzora-be/tree/main/project-service/src/chat"
click node_auth_service "https://github.com/twerif/workzora-be/tree/main/auth-service/src"
click node_user_service "https://github.com/twerif/workzora-be/tree/main/user-service/src/users"
click node_kyc_service "https://github.com/twerif/workzora-be/tree/main/kyc-service/src/accout-verification"
click node_escrow_service "https://github.com/twerif/workzora-be/tree/main/escrow/src/invoices"
click node_payment_data "https://github.com/twerif/workzora-be/tree/main/user-service/src/payment-data"
click node_cloudinary "https://github.com/twerif/workzora-be/blob/main/api-gateway/src/cloudinary/cloudinary/cloudinary.service.ts"
click node_email_service "https://github.com/twerif/workzora-be/tree/main/email-service/src/sender"

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_admin_panel,node_marketplace_users toneBlue
class node_gateway_api,node_auth_api,node_project_api,node_chat_api,node_posts_api,node_kyc_api,node_escrow_api toneAmber
class node_project_service,node_posts_service,node_bids_service,node_search_service,node_chat_service toneMint
class node_auth_service,node_user_service,node_kyc_service,node_escrow_service,node_payment_data toneRose
class node_cloudinary,node_email_service,node_admin_user,node_monobank toneIndigo
```

## Components

### User Interfaces

- [Admin panel](https://github.com/twerif/workzora-be/tree/main/admin-panel/src): `admin-panel/src`

### API Gateway

- [HTTP API](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/main.ts): `api-gateway/src/main.ts`
- [Authentication routes](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/auth/auth.controller.ts): `api-gateway/src/auth/auth.controller.ts`
- [Project routes](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/projects/projects.controller.ts): `api-gateway/src/projects/projects.controller.ts`
- [Chat routes](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/chat/chat.controller.ts): `api-gateway/src/chat/chat.controller.ts`
- [Post routes](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/posts/posts.controller.ts): `api-gateway/src/posts/posts.controller.ts`
- [KYC routes](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/kyc/kyc.controller.ts): `api-gateway/src/kyc/kyc.controller.ts`
- [Escrow routes](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/escrow/escrow.controller.ts): `api-gateway/src/escrow/escrow.controller.ts`

### Marketplace Services

- [Projects and categories](https://github.com/twerif/workzora-be/tree/main/project-service/src): `project-service/src`
- [Posts](https://github.com/twerif/workzora-be/tree/main/posts-service/src): `posts-service/src`
- [Bids](https://github.com/twerif/workzora-be/tree/main/bids-service/src): `bids-service/src`
- [Search](https://github.com/twerif/workzora-be/tree/main/search-service/src): `search-service/src`
- [Chat and messages](https://github.com/twerif/workzora-be/tree/main/project-service/src/chat): `project-service/src/chat`

### Trust And Payments

- [Authentication](https://github.com/twerif/workzora-be/tree/main/auth-service/src): `auth-service/src`
- [User profiles](https://github.com/twerif/workzora-be/tree/main/user-service/src/users): `user-service/src/users`
- [Identity verification](https://github.com/twerif/workzora-be/tree/main/kyc-service/src/accout-verification): `kyc-service/src/accout-verification`
- [Escrow invoices](https://github.com/twerif/workzora-be/tree/main/escrow/src/invoices): `escrow/src/invoices`
- [Payment data](https://github.com/twerif/workzora-be/tree/main/user-service/src/payment-data): `user-service/src/payment-data`

### Platform Services

- [Cloudinary uploads](https://github.com/twerif/workzora-be/blob/main/api-gateway/src/cloudinary/cloudinary/cloudinary.service.ts): `api-gateway/src/cloudinary/cloudinary/cloudinary.service.ts`
- [Email delivery](https://github.com/twerif/workzora-be/tree/main/email-service/src/sender): `email-service/src/sender`

### Other components

- **Marketplace users**
- **Administrator**
- **Monobank**

## Connections

- Marketplace users → Admin panel: manage records
- Administrator → Admin panel: administers
- Marketplace users → HTTP API: use marketplace
- HTTP API → Authentication routes: routes requests
- HTTP API → Project routes: routes requests
- HTTP API → Chat routes: routes requests
- HTTP API → Post routes: routes requests
- HTTP API → KYC routes: routes requests
- HTTP API → Escrow routes: routes requests
- Authentication routes → Authentication: dispatches auth
- Authentication routes → User profiles: dispatches users
- Project routes → Projects and categories: dispatches projects
- Project routes → Search: searches projects
- Project routes → User profiles: fetches profiles
- Chat routes → Chat and messages: dispatches chat
- Chat routes → User profiles: fetches senders
- Chat routes → Cloudinary uploads: uploads attachments
- Post routes → Posts: dispatches posts
- Post routes → Search: searches posts
- Post routes → Cloudinary uploads: uploads images
- KYC routes → Identity verification: dispatches verification
- KYC routes → Cloudinary uploads: uploads documents
- Escrow routes → Escrow invoices: dispatches invoices
- Escrow invoices → Monobank: handles payments
- Projects and categories → Chat and messages: hosts chat
