# moaazsaadawydev-lab/skillup architecture

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

- Interactive diagram: https://gitdiagram.com/moaazsaadawydev-lab/skillup
- Repository: https://github.com/moaazsaadawydev-lab/skillup

## Overview

SkillUp is a NestJS microservices platform for educational services, with an API gateway as the public entry point. The principal implemented flow is client registration or media-URL request through the gateway to the users or media service; media bytes then go directly from the client to MinIO. User registration and verification are delegated through gateway providers, while documented outbox events drive asynchronous media processing and email notifications. Catalog, booking, and payment are documented scaffolds. Some service wiring and provider internals were not sampled, so those relationships are shown only where supported by the README or source index.

Main entry points: [`apps/users-service/src/users.service.ts`](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/users-service/src/users.service.ts) (Users Facade), [`apps/api-gateway/src/app.module.ts`](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/app.module.ts) (REST Gateway), [`apps/api-gateway/src/users/auth.service.ts`](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/users/auth.service.ts) (Auth Facade), [`apps/media-service/src/consumers/media-consumer.service.ts`](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/media-service/src/consumers/media-consumer.service.ts) (Media Consumer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_edge["Public Gateway"]
  node_gateway["REST Gateway<br/>[app.module.ts]"]
  node_auth_http["Auth Routes<br/>[auth.controller.ts]"]
  node_auth_facade["Auth Facade<br/>[auth.service.ts]"]
  node_registration["Registration Provider"]
  node_verification["Account Verification"]
  node_code_provider["Verification Codes"]
  node_media_http["Media Routes"]
  node_media_facade["Media Gateway Client<br/>[media.service.ts]"]
end

subgraph group_identity["Identity Service"]
  node_users_grpc["Users gRPC API"]
  node_users_facade["Users Facade<br/>[users.service.ts]"]
  node_user_providers["User Domain Providers"]
  node_user_db[("Users Database<br/>[database.module.ts]")]
  node_outbox["Outbox Worker<br/>[outbox.worker.ts]"]
end

subgraph group_media["Media Pipeline"]
  node_media_grpc["Media gRPC API"]
  node_media_core["Media Service<br/>[media.service.ts]"]
  node_minio[("MinIO Storage<br/>[minio.service.ts]")]
  node_media_consumer["Media Consumer"]
  node_image_processor["Image Processor"]
end

subgraph group_async["Events and Messaging"]
  node_rabbit["RabbitMQ Events"]
  node_notification_consumer["Notification Consumer"]
  node_mail["Mail Dispatcher<br/>[mail.service.ts]"]
end

subgraph group_platform["Other Services and State"]
  node_redis[("Redis State<br/>[redis.service.ts]")]
  node_catalog["Catalog Scaffold<br/>[app.module.ts]"]
  node_booking["Booking Scaffold<br/>[app.module.ts]"]
  node_payment["Payment Scaffold<br/>[app.module.ts]"]
  node_postgres[("PostgreSQL Services")]
  node_smtp["SMTP Provider"]
end

node_client(("Web and Mobile Clients"))

node_client -->|"sends REST"| node_gateway
node_gateway -->|"routes auth"| node_auth_http
node_auth_http -->|"calls"| node_auth_facade
node_auth_facade -->|"delegates registration"| node_registration
node_auth_facade -->|"delegates verification"| node_verification
node_auth_facade -->|"delegates code request"| node_code_provider
node_gateway -->|"routes gRPC"| node_users_grpc
node_users_grpc -->|"calls"| node_users_facade
node_users_facade -->|"delegates domain work"| node_user_providers
node_users_facade -.->|"persists user data"| node_user_db
node_users_facade -.->|"uses ephemeral state"| node_redis
node_users_facade -.->|"records events"| node_outbox
node_outbox -.->|"publishes events"| node_rabbit
node_gateway -->|"routes media"| node_media_http
node_media_http -->|"calls"| node_media_facade
node_media_facade -.->|"dispatches gRPC"| node_media_grpc
node_media_grpc -->|"calls"| node_media_core
node_media_core -->|"reads and writes"| node_minio
node_client -->|"uploads directly"| node_minio
node_rabbit -.->|"dispatches media event"| node_media_consumer
node_media_consumer -->|"processes image"| node_image_processor
node_media_consumer -->|"fetches and stores files"| node_minio
node_rabbit -.->|"dispatches email event"| node_notification_consumer
node_notification_consumer -->|"requests delivery"| node_mail
node_mail -->|"sends email"| node_smtp
node_client -.->|"requests courses"| node_catalog
node_client -.->|"requests reservations"| node_booking
node_client -.->|"requests billing"| node_payment
node_catalog -.->|"uses service database"| node_postgres
node_booking -.->|"uses service database"| node_postgres
node_payment -.->|"uses service database"| node_postgres

click node_gateway "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/app.module.ts"
click node_auth_http "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/users/auth.controller.ts"
click node_auth_facade "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/users/auth.service.ts"
click node_registration "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/users/providers/registration.provider.ts"
click node_verification "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/users/providers/account-verification.provider.ts"
click node_code_provider "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/users/providers/verification-code.provider.ts"
click node_media_http "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/media/media.controller.ts"
click node_media_facade "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/media/media.service.ts"
click node_users_grpc "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/users-service/src/users-grpc.controller.ts"
click node_users_facade "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/users-service/src/users.service.ts"
click node_user_providers "https://github.com/moaazsaadawydev-lab/skillup/tree/master/apps/users-service/src/providers"
click node_user_db "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/users-service/src/database/database.module.ts"
click node_outbox "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/users-service/src/outbox/outbox.worker.ts"
click node_media_grpc "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/media-service/src/media-grpc.controller.ts"
click node_media_core "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/media-service/src/media.service.ts"
click node_minio "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/media-service/src/storage/minio.service.ts"
click node_media_consumer "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/media-service/src/consumers/media-consumer.service.ts"
click node_image_processor "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/media-service/src/processors/image-processor.service.ts"
click node_rabbit "https://github.com/moaazsaadawydev-lab/skillup/blob/master/libs/shared/rabbitmq/src/event-publisher.service.ts"
click node_notification_consumer "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/notifications-service/src/consumers/notification-consumer.service.ts"
click node_mail "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/notifications-service/src/mail/mail.service.ts"
click node_redis "https://github.com/moaazsaadawydev-lab/skillup/blob/master/libs/shared/redis/src/redis.service.ts"
click node_catalog "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/catalog-service/src/app.module.ts"
click node_booking "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/booking-service/src/app.module.ts"
click node_payment "https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/payment-service/src/app.module.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_auth_http,node_auth_facade,node_registration,node_verification,node_code_provider,node_media_http,node_media_facade,node_client toneBlue
class node_users_grpc,node_users_facade,node_user_providers,node_user_db,node_outbox toneAmber
class node_media_grpc,node_media_core,node_minio,node_media_consumer,node_image_processor toneMint
class node_rabbit,node_notification_consumer,node_mail toneRose
class node_redis,node_catalog,node_booking,node_payment,node_postgres,node_smtp toneIndigo
```

## Components

### Public Gateway

- [REST Gateway](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/app.module.ts): `apps/api-gateway/src/app.module.ts`
- [Auth Routes](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/users/auth.controller.ts): `apps/api-gateway/src/users/auth.controller.ts`
- [Auth Facade](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/users/auth.service.ts): `apps/api-gateway/src/users/auth.service.ts`
- [Registration Provider](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/users/providers/registration.provider.ts): `apps/api-gateway/src/users/providers/registration.provider.ts`
- [Account Verification](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/users/providers/account-verification.provider.ts): `apps/api-gateway/src/users/providers/account-verification.provider.ts`
- [Verification Codes](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/users/providers/verification-code.provider.ts): `apps/api-gateway/src/users/providers/verification-code.provider.ts`
- [Media Routes](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/media/media.controller.ts): `apps/api-gateway/src/media/media.controller.ts`
- [Media Gateway Client](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/api-gateway/src/media/media.service.ts): `apps/api-gateway/src/media/media.service.ts`

### Identity Service

- [Users gRPC API](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/users-service/src/users-grpc.controller.ts): `apps/users-service/src/users-grpc.controller.ts`
- [Users Facade](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/users-service/src/users.service.ts): `apps/users-service/src/users.service.ts`
- [User Domain Providers](https://github.com/moaazsaadawydev-lab/skillup/tree/master/apps/users-service/src/providers): `apps/users-service/src/providers`
- [Users Database](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/users-service/src/database/database.module.ts): `apps/users-service/src/database/database.module.ts`
- [Outbox Worker](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/users-service/src/outbox/outbox.worker.ts): `apps/users-service/src/outbox/outbox.worker.ts`

### Media Pipeline

- [Media gRPC API](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/media-service/src/media-grpc.controller.ts): `apps/media-service/src/media-grpc.controller.ts`
- [Media Service](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/media-service/src/media.service.ts): `apps/media-service/src/media.service.ts`
- [MinIO Storage](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/media-service/src/storage/minio.service.ts): `apps/media-service/src/storage/minio.service.ts`
- [Media Consumer](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/media-service/src/consumers/media-consumer.service.ts): `apps/media-service/src/consumers/media-consumer.service.ts`
- [Image Processor](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/media-service/src/processors/image-processor.service.ts): `apps/media-service/src/processors/image-processor.service.ts`

### Events and Messaging

- [RabbitMQ Events](https://github.com/moaazsaadawydev-lab/skillup/blob/master/libs/shared/rabbitmq/src/event-publisher.service.ts): `libs/shared/rabbitmq/src/event-publisher.service.ts`
- [Notification Consumer](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/notifications-service/src/consumers/notification-consumer.service.ts): `apps/notifications-service/src/consumers/notification-consumer.service.ts`
- [Mail Dispatcher](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/notifications-service/src/mail/mail.service.ts): `apps/notifications-service/src/mail/mail.service.ts`

### Other Services and State

- [Redis State](https://github.com/moaazsaadawydev-lab/skillup/blob/master/libs/shared/redis/src/redis.service.ts): `libs/shared/redis/src/redis.service.ts`
- [Catalog Scaffold](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/catalog-service/src/app.module.ts): `apps/catalog-service/src/app.module.ts`
- [Booking Scaffold](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/booking-service/src/app.module.ts): `apps/booking-service/src/app.module.ts`
- [Payment Scaffold](https://github.com/moaazsaadawydev-lab/skillup/blob/master/apps/payment-service/src/app.module.ts): `apps/payment-service/src/app.module.ts`
- **PostgreSQL Services**
- **SMTP Provider**

### Other components

- **Web and Mobile Clients**

## Connections

- Web and Mobile Clients → REST Gateway: sends REST
- REST Gateway → Auth Routes: routes auth (evidence: `apps/api-gateway/src/app.module.ts`)
- Auth Routes → Auth Facade: calls (evidence: `apps/api-gateway/src/users/auth.controller.ts`)
- Auth Facade → Registration Provider: delegates registration (evidence: `apps/api-gateway/src/users/auth.service.ts`)
- Auth Facade → Account Verification: delegates verification (evidence: `apps/api-gateway/src/users/auth.service.ts`)
- Auth Facade → Verification Codes: delegates code request (evidence: `apps/api-gateway/src/users/auth.service.ts`)
- REST Gateway → Users gRPC API: routes gRPC
- Users gRPC API → Users Facade: calls (evidence: `apps/users-service/src/users-grpc.controller.ts`)
- Users Facade → User Domain Providers: delegates domain work (evidence: `apps/users-service/src/users.service.ts`)
- Users Facade → Users Database: persists user data
- Users Facade → Redis State: uses ephemeral state
- Users Facade → Outbox Worker: records events
- Outbox Worker → RabbitMQ Events: publishes events
- REST Gateway → Media Routes: routes media (evidence: `apps/api-gateway/src/app.module.ts`)
- Media Routes → Media Gateway Client: calls (evidence: `apps/api-gateway/src/media/media.controller.ts`)
- Media Gateway Client → Media gRPC API: dispatches gRPC
- Media gRPC API → Media Service: calls (evidence: `apps/media-service/src/media-grpc.controller.ts`)
- Media Service → MinIO Storage: reads and writes (evidence: `apps/media-service/src/media.service.ts`)
- Web and Mobile Clients → MinIO Storage: uploads directly
- RabbitMQ Events → Media Consumer: dispatches media event
- Media Consumer → Image Processor: processes image (evidence: `apps/media-service/src/consumers/media-consumer.service.ts`)
- Media Consumer → MinIO Storage: fetches and stores files (evidence: `apps/media-service/src/consumers/media-consumer.service.ts`)
- RabbitMQ Events → Notification Consumer: dispatches email event
- Notification Consumer → Mail Dispatcher: requests delivery (evidence: `apps/notifications-service/src/consumers/notification-consumer.service.ts`)
- Mail Dispatcher → SMTP Provider: sends email (evidence: `apps/notifications-service/src/mail/mail.service.ts`)
- Web and Mobile Clients → Catalog Scaffold: requests courses
- Web and Mobile Clients → Booking Scaffold: requests reservations
- Web and Mobile Clients → Payment Scaffold: requests billing
- Catalog Scaffold → PostgreSQL Services: uses service database
- Booking Scaffold → PostgreSQL Services: uses service database
- Payment Scaffold → PostgreSQL Services: uses service database
