# oscarjscom/desarrollo_de_soluciones_en_la_nube architecture

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

- Interactive diagram: https://gitdiagram.com/oscarjscom/desarrollo_de_soluciones_en_la_nube
- Repository: https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube

## Overview

This repository contains multiple cloud-course projects: the root README describes a Flask/yt-dlp social-video downloader, while `Semana 06` implements SecureDocs, a document-management API with JWT authentication and RBAC+ABAC authorization. SecureDocs requests pass through routers, authorization and domain services to relational data, with audit records for decisions. The graph includes documented downloader capabilities and the sampled SecureDocs modules. SecureDocs’ own README and several router/service implementations were not provided, so some subsystem links rely on SOURCE INDEX references rather than inspected call bodies.

Main entry points: [`Semana 06/app/main.py`](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/main.py) (API entry and startup), [`Semana 06/app/authorization/service.py`](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/authorization/service.py) (Authorization service), [`Semana 06/app/models.py`](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/models.py) (Domain data models), [`Semana 06/app/auth/dependencies.py`](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/auth/dependencies.py) (Token and context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_download["Video downloader"]
  node_video_app["Video web app<br/>[app.py]"]
  node_ytdlp["yt-dlp"]
end

subgraph group_api["SecureDocs API"]
  node_api_entry["API entry and startup<br/>[main.py]"]
  node_api_schemas["Request schemas<br/>[schemas.py]"]
end

subgraph group_identity["Identity and access"]
  node_auth_routes["Auth routes<br/>[auth.py]"]
  node_auth_dependencies["Token and context<br/>[dependencies.py]"]
  node_token_security["JWT and passwords<br/>[security.py]"]
  node_auth_service["Login service<br/>[auth.py]"]
  node_authorization["Authorization service<br/>[service.py]"]
  node_rbac["RBAC checks<br/>[rbac.py]"]
  node_abac_engine["ABAC engine<br/>[engine.py]"]
  node_abac_context["Authorization context<br/>[context.py]"]
  node_abac_policies["ABAC policies<br/>[policies.py]"]
end

subgraph group_records["Records and audit"]
  node_document_routes["Document routes<br/>[documentos.py]"]
  node_document_service["Document service<br/>[documentos.py]"]
  node_user_routes["User routes<br/>[usuarios.py]"]
  node_user_service["User service<br/>[usuarios.py]"]
  node_security_routes["Security administration<br/>[seguridad.py]"]
  node_audit_service["Audit service<br/>[auditoria.py]"]
  node_data_models["Domain data models<br/>[models.py]"]
  node_db_access["Database access<br/>[database.py]"]
end

node_visitor(("Browser user"))
node_social_platforms["Social platforms"]
node_securedocs_user(("API client"))
node_sql_database[("Relational database")]

node_visitor -->|"submits video URL"| node_video_app
node_video_app -->|"downloads with"| node_ytdlp
node_ytdlp -->|"fetches videos"| node_social_platforms
node_securedocs_user -.->|"sends requests"| node_api_entry
node_api_entry -->|"mounts routes"| node_auth_routes
node_api_entry -->|"mounts routes"| node_document_routes
node_api_entry -->|"mounts routes"| node_security_routes
node_api_entry -->|"mounts routes"| node_user_routes
node_api_entry -->|"initializes database"| node_db_access
node_api_entry -->|"seeds records"| node_data_models
node_auth_routes -->|"delegates login"| node_auth_service
node_auth_routes -->|"requires identity"| node_auth_dependencies
node_auth_dependencies -->|"decodes token"| node_token_security
node_auth_service -->|"uses token security"| node_token_security
node_document_routes -->|"delegates documents"| node_document_service
node_document_routes -->|"requires identity"| node_auth_dependencies
node_user_routes -->|"delegates users"| node_user_service
node_user_routes -->|"requires identity"| node_auth_dependencies
node_security_routes -->|"uses access service"| node_authorization
node_security_routes -->|"uses audit service"| node_audit_service
node_authorization -->|"checks permissions"| node_rbac
node_authorization -->|"evaluates policies"| node_abac_engine
node_authorization -->|"builds context"| node_abac_context
node_authorization -->|"records decisions"| node_audit_service
node_abac_engine -->|"evaluates context"| node_abac_context
node_abac_engine -->|"dispatches policies"| node_abac_policies
node_db_access -->|"connects to"| node_sql_database
node_data_models -->|"uses declarative base"| node_db_access
node_audit_service -->|"writes audit records"| node_data_models
node_document_service -->|"uses document models"| node_data_models
node_user_service -->|"uses user models"| node_data_models

click node_video_app "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/app.py"
click node_api_entry "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/main.py"
click node_api_schemas "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/schemas.py"
click node_auth_routes "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/routers/auth.py"
click node_auth_dependencies "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/auth/dependencies.py"
click node_token_security "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/auth/security.py"
click node_auth_service "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/services/auth.py"
click node_authorization "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/authorization/service.py"
click node_rbac "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/authorization/rbac.py"
click node_abac_engine "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/authorization/abac/engine.py"
click node_abac_context "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/authorization/abac/context.py"
click node_abac_policies "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/authorization/abac/policies.py"
click node_document_routes "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/routers/documentos.py"
click node_document_service "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/services/documentos.py"
click node_user_routes "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/routers/usuarios.py"
click node_user_service "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/services/usuarios.py"
click node_security_routes "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/routers/seguridad.py"
click node_audit_service "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/services/auditoria.py"
click node_data_models "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/models.py"
click node_db_access "https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/database.py"

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_video_app,node_ytdlp,node_visitor,node_securedocs_user toneBlue
class node_api_entry,node_api_schemas,node_sql_database toneAmber
class node_auth_routes,node_auth_dependencies,node_token_security,node_auth_service,node_authorization,node_rbac,node_abac_engine,node_abac_context,node_abac_policies toneMint
class node_document_routes,node_document_service,node_user_routes,node_user_service,node_security_routes,node_audit_service,node_data_models,node_db_access toneRose
class node_social_platforms toneIndigo
```

## Components

### Video downloader

- [Video web app](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/app.py): `app.py`
- **yt-dlp**

### SecureDocs API

- [API entry and startup](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/main.py): `Semana 06/app/main.py`
- [Request schemas](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/schemas.py): `Semana 06/app/schemas.py`

### Identity and access

- [Auth routes](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/routers/auth.py): `Semana 06/app/routers/auth.py`
- [Token and context](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/auth/dependencies.py): `Semana 06/app/auth/dependencies.py`
- [JWT and passwords](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/auth/security.py): `Semana 06/app/auth/security.py`
- [Login service](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/services/auth.py): `Semana 06/app/services/auth.py`
- [Authorization service](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/authorization/service.py): `Semana 06/app/authorization/service.py`
- [RBAC checks](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/authorization/rbac.py): `Semana 06/app/authorization/rbac.py`
- [ABAC engine](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/authorization/abac/engine.py): `Semana 06/app/authorization/abac/engine.py`
- [Authorization context](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/authorization/abac/context.py): `Semana 06/app/authorization/abac/context.py`
- [ABAC policies](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/authorization/abac/policies.py): `Semana 06/app/authorization/abac/policies.py`

### Records and audit

- [Document routes](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/routers/documentos.py): `Semana 06/app/routers/documentos.py`
- [Document service](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/services/documentos.py): `Semana 06/app/services/documentos.py`
- [User routes](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/routers/usuarios.py): `Semana 06/app/routers/usuarios.py`
- [User service](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/services/usuarios.py): `Semana 06/app/services/usuarios.py`
- [Security administration](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/routers/seguridad.py): `Semana 06/app/routers/seguridad.py`
- [Audit service](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/services/auditoria.py): `Semana 06/app/services/auditoria.py`
- [Domain data models](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/models.py): `Semana 06/app/models.py`
- [Database access](https://github.com/oscarjscom/desarrollo_de_soluciones_en_la_nube/blob/main/Semana%2006/app/database.py): `Semana 06/app/database.py`

### Other components

- **Browser user**
- **Social platforms**
- **API client**
- **Relational database**

## Connections

- Browser user → Video web app: submits video URL (evidence: `README.md`)
- Video web app → yt-dlp: downloads with (evidence: `README.md`)
- yt-dlp → Social platforms: fetches videos (evidence: `README.md`)
- API client → API entry and startup: sends requests
- API entry and startup → Auth routes: mounts routes (evidence: `Semana 06/app/main.py`)
- API entry and startup → Document routes: mounts routes (evidence: `Semana 06/app/main.py`)
- API entry and startup → Security administration: mounts routes (evidence: `Semana 06/app/main.py`)
- API entry and startup → User routes: mounts routes (evidence: `Semana 06/app/main.py`)
- API entry and startup → Database access: initializes database (evidence: `Semana 06/app/main.py`)
- API entry and startup → Domain data models: seeds records (evidence: `Semana 06/app/main.py`)
- Auth routes → Login service: delegates login (evidence: `Semana 06/app/routers/auth.py`)
- Auth routes → Token and context: requires identity (evidence: `Semana 06/app/routers/auth.py`)
- Token and context → JWT and passwords: decodes token (evidence: `Semana 06/app/auth/dependencies.py`)
- Login service → JWT and passwords: uses token security (evidence: `Semana 06/app/services/auth.py`)
- Document routes → Document service: delegates documents (evidence: `Semana 06/app/routers/documentos.py`)
- Document routes → Token and context: requires identity (evidence: `Semana 06/app/routers/documentos.py`)
- User routes → User service: delegates users (evidence: `Semana 06/app/routers/usuarios.py`)
- User routes → Token and context: requires identity (evidence: `Semana 06/app/routers/usuarios.py`)
- Security administration → Authorization service: uses access service (evidence: `Semana 06/app/routers/seguridad.py`)
- Security administration → Audit service: uses audit service (evidence: `Semana 06/app/routers/seguridad.py`)
- Authorization service → RBAC checks: checks permissions (evidence: `Semana 06/app/authorization/service.py`)
- Authorization service → ABAC engine: evaluates policies (evidence: `Semana 06/app/authorization/service.py`)
- Authorization service → Authorization context: builds context (evidence: `Semana 06/app/authorization/service.py`)
- Authorization service → Audit service: records decisions (evidence: `Semana 06/app/authorization/service.py`)
- ABAC engine → Authorization context: evaluates context (evidence: `Semana 06/app/authorization/abac/engine.py`)
- ABAC engine → ABAC policies: dispatches policies (evidence: `Semana 06/app/authorization/abac/engine.py`)
- Database access → Relational database: connects to (evidence: `Semana 06/app/database.py`)
- Domain data models → Database access: uses declarative base (evidence: `Semana 06/app/models.py`)
- Audit service → Domain data models: writes audit records (evidence: `Semana 06/app/services/auditoria.py`)
- Document service → Domain data models: uses document models (evidence: `Semana 06/app/services/documentos.py`)
- User service → Domain data models: uses user models (evidence: `Semana 06/app/services/usuarios.py`)
