# villarroel-argenis/quinielavinccler architecture

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

- Interactive diagram: https://gitdiagram.com/villarroel-argenis/quinielavinccler
- Repository: https://github.com/villarroel-argenis/quinielavinccler

## Overview

Quiniela Vinccler is an employee-facing FIFA 2026 prediction pool: users register, link a physical entry sheet, fill in predictions across tournament stages, and compete on a points ranking. Administrators issue batches and PDFs, manage users/configuration, enter official results, and recalculate winners and scores. The graph reflects documented flows and sampled references; some admin and ranking implementations were not excerpted, so their connections are based on README statements or are omitted where ownership is unclear.

Main entry points: [`QuinielaVinccler.UI.Web/Data/AppDbContext.cs`](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Data/AppDbContext.cs) (Pool database), [`QuinielaVinccler.UI.Web/Components/Pages/Admin.razor.cs`](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/Admin.razor.cs) (Admin portal), [`QuinielaVinccler.UI.Web/Components/Pages/Auth/Login.razor.cs`](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/Auth/Login.razor.cs) (Login and register), [`QuinielaVinccler.UI.Web/Components/Pages/PlanillaDetalle.razor.cs`](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/PlanillaDetalle.razor.cs) (Tournament predictions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["User journey"]
  node_login["Login and register<br/>[Login.razor.cs]"]
  node_sheets["My entry sheets"]
  node_predictions["Tournament predictions"]
  node_ranking["Points ranking<br/>[Ranking.razor.cs]"]
end

subgraph group_admin["Administration"]
  node_adminui["Admin portal<br/>[Admin.razor.cs]"]
  node_batchui["Batch management"]
  node_resultsui["Official results"]
  node_configui["Pool configuration"]
  node_userui["User management"]
end

subgraph group_services["Business services"]
  node_planillasvc["Entry sheet service<br/>[PlanillaService.cs]"]
  node_predsvc["Prediction service"]
  node_score["Scoring service"]
  node_winners["Winners service"]
  node_batchsvc["Batch service<br/>[LoteService.cs]"]
  node_pdf["Printable sheet PDFs<br/>[PdfService.cs]"]
end

subgraph group_auth["Authentication"]
  node_authservice["Credential service<br/>[AuthService.cs]"]
  node_pending["Pending login bridge"]
  node_authapi["Cookie auth endpoints<br/>[AuthEndpoints.cs]"]
end

subgraph group_data["Domain data"]
  node_db[("Pool database<br/>[AppDbContext.cs]")]
  node_models["Tournament and pool records<br/>[Planilla.cs]"]
  node_finalpred["Final-stage predictions<br/>[PrediccionFinal.cs]"]
end

node_employee(("Employee"))

node_employee -->|"registers or signs in"| node_login
node_login -->|"checks credentials"| node_authservice
node_login -->|"stages principal"| node_pending
node_pending -->|"provides token"| node_authapi
node_authapi -->|"sets cookie"| node_employee
node_employee -->|"links physical code"| node_sheets
node_sheets -.->|"manages sheets"| node_planillasvc
node_planillasvc -->|"reads and writes"| node_db
node_employee -->|"enters picks"| node_predictions
node_predictions -->|"saves predictions"| node_predsvc
node_predsvc -->|"persists picks"| node_db
node_predictions -->|"covers tournament stages"| node_models
node_models -->|"includes final picks"| node_finalpred
node_employee -->|"views standings"| node_ranking
node_ranking -.->|"loads ranked sheets"| node_planillasvc
node_adminui -.->|"opens batch tools"| node_batchui
node_batchui -.->|"creates batches"| node_batchsvc
node_batchsvc -.->|"stores batches"| node_db
node_batchui -.->|"requests printable sheets"| node_pdf
node_resultsui -->|"requests recalculation"| node_score
node_resultsui -->|"loads and updates results"| node_db
node_adminui -.->|"manages settings"| node_configui
node_adminui -.->|"manages accounts"| node_userui
node_score -->|"reads results and scores"| node_db
node_winners -.->|"reads winner data"| node_db
node_db -->|"stores entities"| node_models

click node_login "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/Auth/Login.razor.cs"
click node_sheets "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/MisPlanillas.razor.cs"
click node_predictions "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/PlanillaDetalle.razor.cs"
click node_ranking "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/Ranking.razor.cs"
click node_adminui "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/Admin.razor.cs"
click node_batchui "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Admin/LoteComponent.razor.cs"
click node_resultsui "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Admin/ResultadosComponent.razor.cs"
click node_configui "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Admin/ConfiguracionComponent.razor.cs"
click node_userui "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Admin/UsuariosComponent.razor.cs"
click node_authservice "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/AuthService.cs"
click node_pending "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/PendingLoginService.cs"
click node_authapi "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Endpoints/AuthEndpoints.cs"
click node_planillasvc "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/PlanillaService.cs"
click node_predsvc "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/PredictionService.cs"
click node_score "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/PuntuacionService.cs"
click node_winners "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/GanadoresService.cs"
click node_batchsvc "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/LoteService.cs"
click node_pdf "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/PdfService.cs"
click node_db "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Data/AppDbContext.cs"
click node_models "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Data/Models/Planilla.cs"
click node_finalpred "https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Data/Models/PrediccionFinal.cs"

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_login,node_sheets,node_predictions,node_ranking toneBlue
class node_adminui,node_batchui,node_resultsui,node_configui,node_userui toneAmber
class node_planillasvc,node_predsvc,node_score,node_winners,node_batchsvc,node_pdf toneMint
class node_authservice,node_pending,node_authapi toneRose
class node_db,node_models,node_finalpred,node_employee toneIndigo
```

## Components

### User journey

- [Login and register](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/Auth/Login.razor.cs): `QuinielaVinccler.UI.Web/Components/Pages/Auth/Login.razor.cs`
- [My entry sheets](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/MisPlanillas.razor.cs): `QuinielaVinccler.UI.Web/Components/Pages/MisPlanillas.razor.cs`
- [Tournament predictions](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/PlanillaDetalle.razor.cs): `QuinielaVinccler.UI.Web/Components/Pages/PlanillaDetalle.razor.cs`
- [Points ranking](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/Ranking.razor.cs): `QuinielaVinccler.UI.Web/Components/Pages/Ranking.razor.cs`

### Administration

- [Admin portal](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Pages/Admin.razor.cs): `QuinielaVinccler.UI.Web/Components/Pages/Admin.razor.cs`
- [Batch management](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Admin/LoteComponent.razor.cs): `QuinielaVinccler.UI.Web/Components/Admin/LoteComponent.razor.cs`
- [Official results](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Admin/ResultadosComponent.razor.cs): `QuinielaVinccler.UI.Web/Components/Admin/ResultadosComponent.razor.cs`
- [Pool configuration](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Admin/ConfiguracionComponent.razor.cs): `QuinielaVinccler.UI.Web/Components/Admin/ConfiguracionComponent.razor.cs`
- [User management](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Components/Admin/UsuariosComponent.razor.cs): `QuinielaVinccler.UI.Web/Components/Admin/UsuariosComponent.razor.cs`

### Business services

- [Entry sheet service](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/PlanillaService.cs): `QuinielaVinccler.UI.Web/Services/PlanillaService.cs`
- [Prediction service](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/PredictionService.cs): `QuinielaVinccler.UI.Web/Services/PredictionService.cs`
- [Scoring service](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/PuntuacionService.cs): `QuinielaVinccler.UI.Web/Services/PuntuacionService.cs`
- [Winners service](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/GanadoresService.cs): `QuinielaVinccler.UI.Web/Services/GanadoresService.cs`
- [Batch service](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/LoteService.cs): `QuinielaVinccler.UI.Web/Services/LoteService.cs`
- [Printable sheet PDFs](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/PdfService.cs): `QuinielaVinccler.UI.Web/Services/PdfService.cs`

### Authentication

- [Credential service](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/AuthService.cs): `QuinielaVinccler.UI.Web/Services/AuthService.cs`
- [Pending login bridge](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Services/PendingLoginService.cs): `QuinielaVinccler.UI.Web/Services/PendingLoginService.cs`
- [Cookie auth endpoints](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Endpoints/AuthEndpoints.cs): `QuinielaVinccler.UI.Web/Endpoints/AuthEndpoints.cs`

### Domain data

- [Pool database](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Data/AppDbContext.cs): `QuinielaVinccler.UI.Web/Data/AppDbContext.cs`
- [Tournament and pool records](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Data/Models/Planilla.cs): `QuinielaVinccler.UI.Web/Data/Models/Planilla.cs`
- [Final-stage predictions](https://github.com/villarroel-argenis/quinielavinccler/blob/master/QuinielaVinccler.UI.Web/Data/Models/PrediccionFinal.cs): `QuinielaVinccler.UI.Web/Data/Models/PrediccionFinal.cs`

### Other components

- **Employee**

## Connections

- Employee → Login and register: registers or signs in (evidence: `README.md`)
- Login and register → Credential service: checks credentials (evidence: `QuinielaVinccler.UI.Web/Components/Pages/Auth/Login.razor.cs`)
- Login and register → Pending login bridge: stages principal (evidence: `README.md`)
- Pending login bridge → Cookie auth endpoints: provides token (evidence: `README.md`)
- Cookie auth endpoints → Employee: sets cookie (evidence: `README.md`)
- Employee → My entry sheets: links physical code (evidence: `README.md`)
- My entry sheets → Entry sheet service: manages sheets
- Entry sheet service → Pool database: reads and writes (evidence: `QuinielaVinccler.UI.Web/Services/PlanillaService.cs`)
- Employee → Tournament predictions: enters picks (evidence: `README.md`)
- Tournament predictions → Prediction service: saves predictions (evidence: `QuinielaVinccler.UI.Web/Components/Pages/PlanillaDetalle.razor.cs`)
- Prediction service → Pool database: persists picks (evidence: `QuinielaVinccler.UI.Web/Services/PredictionService.cs`)
- Tournament predictions → Tournament and pool records: covers tournament stages (evidence: `README.md`)
- Tournament and pool records → Final-stage predictions: includes final picks (evidence: `QuinielaVinccler.UI.Web/Data/Models/Planilla.cs`)
- Employee → Points ranking: views standings (evidence: `README.md`)
- Points ranking → Entry sheet service: loads ranked sheets
- Admin portal → Batch management: opens batch tools
- Batch management → Batch service: creates batches (evidence: `QuinielaVinccler.UI.Web/Components/Admin/LoteComponent.razor.cs`)
- Batch service → Pool database: stores batches (evidence: `QuinielaVinccler.UI.Web/Services/LoteService.cs`)
- Batch management → Printable sheet PDFs: requests printable sheets
- Official results → Scoring service: requests recalculation (evidence: `QuinielaVinccler.UI.Web/Components/Admin/ResultadosComponent.razor.cs`)
- Official results → Pool database: loads and updates results (evidence: `QuinielaVinccler.UI.Web/Components/Admin/ResultadosComponent.razor.cs`)
- Admin portal → Pool configuration: manages settings
- Admin portal → User management: manages accounts
- Scoring service → Pool database: reads results and scores (evidence: `QuinielaVinccler.UI.Web/Services/PuntuacionService.cs`)
- Winners service → Pool database: reads winner data (evidence: `QuinielaVinccler.UI.Web/Services/GanadoresService.cs`)
- Pool database → Tournament and pool records: stores entities (evidence: `QuinielaVinccler.UI.Web/Data/AppDbContext.cs`)
