2026-01-08 04:00:56 +00:00
|
|
|
@startuml components
|
|
|
|
|
!theme plain
|
|
|
|
|
skinparam componentStyle uml2
|
|
|
|
|
skinparam packageStyle rectangle
|
|
|
|
|
skinparam componentBackgroundColor #F8F9FA
|
|
|
|
|
skinparam componentBorderColor #495057
|
|
|
|
|
skinparam packageBackgroundColor #FFFFFF
|
|
|
|
|
skinparam packageBorderColor #DEE2E6
|
|
|
|
|
|
|
|
|
|
title Sistema de Registro de Estudiantes - Arquitectura de Componentes
|
|
|
|
|
|
|
|
|
|
package "Frontend (Angular 21)" as frontend {
|
|
|
|
|
[App Component] as app
|
2026-01-09 12:43:35 +00:00
|
|
|
|
|
|
|
|
package "Features" {
|
|
|
|
|
package "Auth" {
|
|
|
|
|
[Login Page] as loginPage
|
|
|
|
|
[Register Page] as registerPage
|
|
|
|
|
[Reset Password] as resetPage
|
|
|
|
|
[Activate Account] as activatePage
|
|
|
|
|
}
|
|
|
|
|
package "Dashboard" {
|
|
|
|
|
[Student Dashboard] as studentDash
|
|
|
|
|
[Admin Dashboard] as adminDash
|
|
|
|
|
}
|
|
|
|
|
package "Students" {
|
|
|
|
|
[Student List] as studentList
|
|
|
|
|
[Student Form] as studentForm
|
|
|
|
|
}
|
|
|
|
|
package "Enrollment" {
|
|
|
|
|
[Enrollment Page] as enrollPage
|
|
|
|
|
[Classmates Page] as classmates
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-01-08 04:00:56 +00:00
|
|
|
|
|
|
|
|
package "Core" {
|
|
|
|
|
[Apollo Client] as apollo
|
2026-01-09 12:43:35 +00:00
|
|
|
[Auth Service] as authSvc
|
2026-01-08 04:00:56 +00:00
|
|
|
[Student Service] as studentSvc
|
|
|
|
|
[Enrollment Service] as enrollSvc
|
|
|
|
|
[Connectivity Service] as connSvc
|
|
|
|
|
[Error Handler] as errorHandler
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-09 12:43:35 +00:00
|
|
|
package "Guards" {
|
|
|
|
|
[Auth Guard] as authGuard
|
|
|
|
|
[Admin Guard] as adminGuard
|
|
|
|
|
[Guest Guard] as guestGuard
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-08 04:00:56 +00:00
|
|
|
package "Shared" {
|
|
|
|
|
[Connectivity Overlay] as overlay
|
|
|
|
|
[Loading Spinner] as spinner
|
|
|
|
|
[Confirm Dialog] as dialog
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
package "Backend (.NET 10)" as backend {
|
|
|
|
|
|
|
|
|
|
package "Host" as host {
|
|
|
|
|
[Program.cs] as program
|
|
|
|
|
[DI Container] as di
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
package "Adapters" as adapters {
|
|
|
|
|
package "Driving (Primary)" {
|
|
|
|
|
[GraphQL API\n(HotChocolate)] as graphql
|
|
|
|
|
[Query] as query
|
|
|
|
|
[Mutation] as mutation
|
2026-01-09 12:43:35 +00:00
|
|
|
[Auth Types] as authTypes
|
|
|
|
|
[Student Types] as studentTypes
|
2026-01-08 04:00:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
package "Driven (Secondary)" {
|
|
|
|
|
[Repositories] as repos
|
|
|
|
|
[DataLoaders] as loaders
|
|
|
|
|
[DbContext] as dbContext
|
2026-01-09 12:43:35 +00:00
|
|
|
[JWT Service] as jwtSvc
|
|
|
|
|
[Password Service] as passSvc
|
2026-01-08 04:00:56 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
package "Application" as application {
|
2026-01-09 12:43:35 +00:00
|
|
|
package "Auth" {
|
|
|
|
|
[Login Command] as loginCmd
|
|
|
|
|
[Register Command] as registerCmd
|
|
|
|
|
[Reset Password] as resetCmd
|
|
|
|
|
}
|
|
|
|
|
package "Students" {
|
|
|
|
|
[Student Commands] as studentCmds
|
|
|
|
|
[Student Queries] as studentQs
|
|
|
|
|
}
|
|
|
|
|
package "Enrollments" {
|
|
|
|
|
[Enroll Commands] as enrollCmds
|
|
|
|
|
[Classmates Query] as classmatesQ
|
|
|
|
|
}
|
2026-01-08 04:00:56 +00:00
|
|
|
[Validators] as validators
|
|
|
|
|
[DTOs] as dtos
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
package "Domain" as domain {
|
2026-01-09 12:43:35 +00:00
|
|
|
[User Entity] as userEntity
|
|
|
|
|
[Student Entity] as studentEntity
|
|
|
|
|
[Subject Entity] as subjectEntity
|
|
|
|
|
[Enrollment Entity] as enrollEntity
|
2026-01-08 04:00:56 +00:00
|
|
|
[Value Objects] as valueObjects
|
|
|
|
|
[Domain Services] as domainSvc
|
|
|
|
|
[Ports (Interfaces)] as ports
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
database "SQL Server 2022" as sqlserver {
|
2026-01-09 12:43:35 +00:00
|
|
|
[Users Table] as tblUsers
|
|
|
|
|
[Students Table] as tblStudents
|
|
|
|
|
[Subjects Table] as tblSubjects
|
|
|
|
|
[Professors Table] as tblProf
|
|
|
|
|
[Enrollments Table] as tblEnroll
|
2026-01-08 04:00:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cloud "Browser" as browser
|
|
|
|
|
|
|
|
|
|
' Conexiones Frontend
|
|
|
|
|
browser --> app
|
2026-01-09 12:43:35 +00:00
|
|
|
app --> loginPage
|
|
|
|
|
app --> registerPage
|
|
|
|
|
app --> studentDash
|
|
|
|
|
app --> adminDash
|
2026-01-08 04:00:56 +00:00
|
|
|
app --> studentList
|
|
|
|
|
app --> enrollPage
|
|
|
|
|
app --> overlay
|
|
|
|
|
|
2026-01-09 12:43:35 +00:00
|
|
|
loginPage --> authSvc
|
|
|
|
|
registerPage --> authSvc
|
|
|
|
|
resetPage --> authSvc
|
|
|
|
|
activatePage --> authSvc
|
|
|
|
|
studentDash --> studentSvc
|
|
|
|
|
adminDash --> studentSvc
|
2026-01-08 04:00:56 +00:00
|
|
|
studentList --> studentSvc
|
|
|
|
|
enrollPage --> enrollSvc
|
|
|
|
|
classmates --> enrollSvc
|
|
|
|
|
overlay --> connSvc
|
|
|
|
|
|
2026-01-09 12:43:35 +00:00
|
|
|
authSvc --> apollo
|
2026-01-08 04:00:56 +00:00
|
|
|
studentSvc --> apollo
|
|
|
|
|
enrollSvc --> apollo
|
2026-01-09 12:43:35 +00:00
|
|
|
|
|
|
|
|
' Guards
|
|
|
|
|
authGuard ..> authSvc
|
|
|
|
|
adminGuard ..> authSvc
|
|
|
|
|
guestGuard ..> authSvc
|
2026-01-08 04:00:56 +00:00
|
|
|
|
|
|
|
|
' Conexiones Backend
|
2026-01-09 12:43:35 +00:00
|
|
|
apollo --> graphql : HTTP/GraphQL\n+ JWT Header
|
2026-01-08 04:00:56 +00:00
|
|
|
|
|
|
|
|
graphql --> query
|
|
|
|
|
graphql --> mutation
|
2026-01-09 12:43:35 +00:00
|
|
|
graphql --> authTypes
|
|
|
|
|
|
|
|
|
|
mutation --> loginCmd
|
|
|
|
|
mutation --> registerCmd
|
|
|
|
|
mutation --> resetCmd
|
|
|
|
|
mutation --> studentCmds
|
|
|
|
|
mutation --> enrollCmds
|
|
|
|
|
query --> studentQs
|
|
|
|
|
query --> classmatesQ
|
|
|
|
|
|
|
|
|
|
loginCmd --> jwtSvc
|
|
|
|
|
loginCmd --> passSvc
|
|
|
|
|
registerCmd --> passSvc
|
|
|
|
|
studentCmds --> domainSvc
|
|
|
|
|
enrollCmds --> domainSvc
|
|
|
|
|
|
|
|
|
|
domainSvc --> studentEntity
|
2026-01-08 04:00:56 +00:00
|
|
|
domainSvc --> valueObjects
|
|
|
|
|
|
|
|
|
|
repos --> dbContext
|
|
|
|
|
loaders --> dbContext
|
|
|
|
|
dbContext --> sqlserver
|
|
|
|
|
|
|
|
|
|
' Implementación de puertos
|
|
|
|
|
repos ..|> ports : implements
|
2026-01-09 12:43:35 +00:00
|
|
|
jwtSvc ..|> ports : implements
|
2026-01-08 04:00:56 +00:00
|
|
|
|
|
|
|
|
note right of domain
|
|
|
|
|
<b>Regla de Dependencia:</b>
|
|
|
|
|
Domain no depende
|
|
|
|
|
de capas externas
|
|
|
|
|
end note
|
|
|
|
|
|
|
|
|
|
note bottom of graphql
|
|
|
|
|
Endpoints:
|
|
|
|
|
- /graphql
|
|
|
|
|
- /health
|
2026-01-09 12:43:35 +00:00
|
|
|
Auth: JWT Bearer
|
|
|
|
|
end note
|
|
|
|
|
|
|
|
|
|
note right of jwtSvc
|
|
|
|
|
HMAC-SHA256
|
|
|
|
|
Configurable expiration
|
2026-01-08 04:00:56 +00:00
|
|
|
end note
|
|
|
|
|
|
|
|
|
|
@enduml
|