# pablodev1904/prueba architecture

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

- Interactive diagram: https://gitdiagram.com/pablodev1904/prueba
- Repository: https://github.com/pablodev1904/prueba

## Overview

Tecflix is a distributed video-streaming product: people register or sign in, browse and manage a catalog, upload videos, and play them through HLS. The web app coordinates separate user, metadata, and streaming APIs. Streaming handles the original upload, quota operations, transcoding, and playback; metadata owns catalog information and visibility. The README also documents MongoDB-backed metadata and an OpenTelemetry/Prometheus/Grafana observability capability. Some service implementations were not sampled, so uncertain internal links are omitted.

Main entry points: [`Aplicacion_Web/src/AppRoutes.tsx`](https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/AppRoutes.tsx) (Web routes), [`src/VideoService.cpp`](https://github.com/pablodev1904/prueba/blob/main/src/VideoService.cpp) (Streaming API), [`Aplicacion_Web/src/api/createServices.ts`](https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/api/createServices.ts) (API services), [`tecflix-metadata/services/metadata-service/src/video_controller.cpp`](https://github.com/pablodev1904/prueba/blob/main/tecflix-metadata/services/metadata-service/src/video_controller.cpp) (Catalog API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_web_routes["Web routes<br/>[AppRoutes.tsx]"]
  node_web_auth["Authentication screens<br/>[LoginPage.tsx]"]
  node_web_catalog["Catalog and management<br/>[VideoListPage.tsx]"]
  node_web_upload["Upload workflow<br/>[UploadPage.tsx]"]
  node_web_player["Video playback"]
  node_web_services["API services<br/>[createServices.ts]"]
end

subgraph group_users["User service"]
  node_user_api["User API"]
  node_user_auth["Authentication domain<br/>[auth_service.cpp]"]
  node_user_storage[("User and quota storage")]
end

subgraph group_metadata["Metadata service"]
  node_metadata_api["Catalog API"]
  node_catalog_domain["Catalog service"]
  node_metadata_repo[("Metadata repository")]
end

subgraph group_streaming["Streaming service"]
  node_stream_api["Streaming API<br/>[VideoService.cpp]"]
  node_video_storage[("Video and HLS storage")]
  node_transcoder["FFmpeg transcoder"]
  node_quota_client["Quota client<br/>[QuotaClient.cpp]"]
end

subgraph group_ops["Observability"]
  node_telemetry["Telemetry instrumentation<br/>[telemetry.cpp]"]
  node_metrics_stack["Metrics dashboards"]
end

node_viewer(("Viewer"))
node_mongo[("MongoDB")]

node_viewer -->|"uses"| node_web_routes
node_web_routes -->|"routes to"| node_web_auth
node_web_routes -->|"routes to"| node_web_catalog
node_web_routes -->|"routes to"| node_web_upload
node_web_routes -->|"routes to"| node_web_player
node_web_services -->|"calls"| node_user_api
node_web_services -->|"calls"| node_metadata_api
node_web_services -->|"calls"| node_stream_api
node_user_api -->|"delegates to"| node_user_auth
node_metadata_api -->|"delegates to"| node_catalog_domain
node_metadata_repo -->|"reads and writes"| node_mongo
node_stream_api -->|"persists videos"| node_video_storage
node_stream_api -->|"transcodes with"| node_transcoder
node_stream_api -->|"reserves quota"| node_quota_client
node_stream_api -->|"checks visibility"| node_metadata_api
node_telemetry -->|"exports metrics"| node_metrics_stack

click node_web_routes "https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/AppRoutes.tsx"
click node_web_auth "https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/features/auth/LoginPage.tsx"
click node_web_catalog "https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/features/videos/VideoListPage.tsx"
click node_web_upload "https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/features/upload/UploadPage.tsx"
click node_web_player "https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/features/player/VideoDetailPage.tsx"
click node_web_services "https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/api/createServices.ts"
click node_user_api "https://github.com/pablodev1904/prueba/blob/main/Servicios/Servicio_Usuarios/src/user_controller.cpp"
click node_user_auth "https://github.com/pablodev1904/prueba/blob/main/Servicios/Servicio_Usuarios/src/domain/auth_service.cpp"
click node_user_storage "https://github.com/pablodev1904/prueba/blob/main/Servicios/Servicio_Usuarios/src/storage/postgres_user_repository.cpp"
click node_metadata_api "https://github.com/pablodev1904/prueba/blob/main/tecflix-metadata/services/metadata-service/src/video_controller.cpp"
click node_catalog_domain "https://github.com/pablodev1904/prueba/blob/main/tecflix-metadata/services/metadata-service/src/catalog_service.cpp"
click node_metadata_repo "https://github.com/pablodev1904/prueba/blob/main/tecflix-metadata/services/metadata-service/src/mongo_video_repository.cpp"
click node_stream_api "https://github.com/pablodev1904/prueba/blob/main/src/VideoService.cpp"
click node_video_storage "https://github.com/pablodev1904/prueba/blob/main/include/tecflix/UploadRecordStore.h"
click node_transcoder "https://github.com/pablodev1904/prueba/blob/main/src/FfmpegTranscoder.cpp"
click node_quota_client "https://github.com/pablodev1904/prueba/blob/main/src/QuotaClient.cpp"
click node_telemetry "https://github.com/pablodev1904/prueba/blob/main/observability/telemetry/src/telemetry.cpp"

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_web_routes,node_web_auth,node_web_catalog,node_web_upload,node_web_player,node_web_services,node_viewer toneBlue
class node_user_api,node_user_auth,node_user_storage,node_mongo toneAmber
class node_metadata_api,node_catalog_domain,node_metadata_repo toneMint
class node_stream_api,node_video_storage,node_transcoder,node_quota_client toneRose
class node_telemetry,node_metrics_stack toneIndigo
```

## Components

### Web application

- [Web routes](https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/AppRoutes.tsx): `Aplicacion_Web/src/AppRoutes.tsx`
- [Authentication screens](https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/features/auth/LoginPage.tsx): `Aplicacion_Web/src/features/auth/LoginPage.tsx`
- [Catalog and management](https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/features/videos/VideoListPage.tsx): `Aplicacion_Web/src/features/videos/VideoListPage.tsx`
- [Upload workflow](https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/features/upload/UploadPage.tsx): `Aplicacion_Web/src/features/upload/UploadPage.tsx`
- [Video playback](https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/features/player/VideoDetailPage.tsx): `Aplicacion_Web/src/features/player/VideoDetailPage.tsx`
- [API services](https://github.com/pablodev1904/prueba/blob/main/Aplicacion_Web/src/api/createServices.ts): `Aplicacion_Web/src/api/createServices.ts`

### User service

- [User API](https://github.com/pablodev1904/prueba/blob/main/Servicios/Servicio_Usuarios/src/user_controller.cpp): `Servicios/Servicio_Usuarios/src/user_controller.cpp`
- [Authentication domain](https://github.com/pablodev1904/prueba/blob/main/Servicios/Servicio_Usuarios/src/domain/auth_service.cpp): `Servicios/Servicio_Usuarios/src/domain/auth_service.cpp`
- [User and quota storage](https://github.com/pablodev1904/prueba/blob/main/Servicios/Servicio_Usuarios/src/storage/postgres_user_repository.cpp): `Servicios/Servicio_Usuarios/src/storage/postgres_user_repository.cpp`

### Metadata service

- [Catalog API](https://github.com/pablodev1904/prueba/blob/main/tecflix-metadata/services/metadata-service/src/video_controller.cpp): `tecflix-metadata/services/metadata-service/src/video_controller.cpp`
- [Catalog service](https://github.com/pablodev1904/prueba/blob/main/tecflix-metadata/services/metadata-service/src/catalog_service.cpp): `tecflix-metadata/services/metadata-service/src/catalog_service.cpp`
- [Metadata repository](https://github.com/pablodev1904/prueba/blob/main/tecflix-metadata/services/metadata-service/src/mongo_video_repository.cpp): `tecflix-metadata/services/metadata-service/src/mongo_video_repository.cpp`

### Streaming service

- [Streaming API](https://github.com/pablodev1904/prueba/blob/main/src/VideoService.cpp): `src/VideoService.cpp`
- [Video and HLS storage](https://github.com/pablodev1904/prueba/blob/main/include/tecflix/UploadRecordStore.h): `include/tecflix/UploadRecordStore.h`
- [FFmpeg transcoder](https://github.com/pablodev1904/prueba/blob/main/src/FfmpegTranscoder.cpp): `src/FfmpegTranscoder.cpp`
- [Quota client](https://github.com/pablodev1904/prueba/blob/main/src/QuotaClient.cpp): `src/QuotaClient.cpp`

### Observability

- [Telemetry instrumentation](https://github.com/pablodev1904/prueba/blob/main/observability/telemetry/src/telemetry.cpp): `observability/telemetry/src/telemetry.cpp`
- **Metrics dashboards**

### Other components

- **Viewer**
- **MongoDB**

## Connections

- Viewer → Web routes: uses (evidence: `README.md`)
- Web routes → Authentication screens: routes to (evidence: `Aplicacion_Web/src/AppRoutes.tsx`)
- Web routes → Catalog and management: routes to (evidence: `Aplicacion_Web/src/AppRoutes.tsx`)
- Web routes → Upload workflow: routes to (evidence: `Aplicacion_Web/src/AppRoutes.tsx`)
- Web routes → Video playback: routes to (evidence: `Aplicacion_Web/src/AppRoutes.tsx`)
- API services → User API: calls (evidence: `README.md`)
- API services → Catalog API: calls (evidence: `README.md`)
- API services → Streaming API: calls (evidence: `README.md`)
- User API → Authentication domain: delegates to (evidence: `Servicios/Servicio_Usuarios/src/user_controller.cpp`)
- Catalog API → Catalog service: delegates to (evidence: `tecflix-metadata/services/metadata-service/src/video_controller.cpp`)
- Metadata repository → MongoDB: reads and writes (evidence: `README.md`)
- Streaming API → Video and HLS storage: persists videos
- Streaming API → FFmpeg transcoder: transcodes with
- Streaming API → Quota client: reserves quota
- Streaming API → Catalog API: checks visibility
- Telemetry instrumentation → Metrics dashboards: exports metrics (evidence: `README.md`)
