# andregnicoletti/rinha-de-backend-2025 architecture

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

- Interactive diagram: https://gitdiagram.com/andregnicoletti/rinha-de-backend-2025
- Repository: https://github.com/andregnicoletti/rinha-de-backend-2025

## Overview

This repository hosts the Rinha de Backend 2025 challenge and its k6 evaluation harness, not a single submitted payment backend. The intended product workflow is a client submitting payments to a backend that chooses between two payment processors; the harness drives that workflow, configures processor conditions, checks summaries and emits scoring data. The sampled runtime files support the harness flow, while participant implementations are represented as submissions and are not mapped. The graph omits unverified internal stages of those backends.

Main entry points: [`rinha-test/requests.js`](https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/rinha-test/requests.js) (HTTP requests), [`rinha-test/rinha.js`](https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/rinha-test/rinha.js) (Score and consistency), [`INSTRUCOES.md`](https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/INSTRUCOES.md) (Challenge rules), [`PREVIA_RESULTADOS.md`](https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/PREVIA_RESULTADOS.md) (Evaluation results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_challenge["Challenge"]
  node_challenge_spec["Challenge rules<br/>[INSTRUCOES.md]"]
end

subgraph group_evaluation["Evaluation harness"]
  node_load_scenarios["Load scenarios<br/>[rinha.js]"]
  node_test_http["HTTP requests<br/>[requests.js]"]
  node_score_check["Score and consistency<br/>[rinha.js]"]
  node_results["Evaluation results"]
end

subgraph group_services["Payment services"]
  node_backend["Submitted backend"]
  node_default_pp["Default processor"]
  node_fallback_pp["Fallback processor"]
end

node_participant(("Participant"))

node_participant -.->|"follows rules"| node_challenge_spec
node_load_scenarios -->|"calls"| node_test_http
node_test_http -->|"posts payments"| node_backend
node_test_http -->|"configures and reads"| node_default_pp
node_test_http -->|"configures and reads"| node_fallback_pp
node_load_scenarios -->|"checks and scores"| node_score_check
node_score_check -->|"requests summaries"| node_test_http
node_score_check -.->|"writes participant output"| node_results

click node_challenge_spec "https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/INSTRUCOES.md"
click node_load_scenarios "https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/rinha-test/rinha.js"
click node_test_http "https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/rinha-test/requests.js"
click node_score_check "https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/rinha-test/rinha.js"
click node_results "https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/PREVIA_RESULTADOS.md"
click node_backend "https://github.com/andregnicoletti/rinha-de-backend-2025/tree/main/participantes"

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_challenge_spec toneBlue
class node_load_scenarios,node_test_http,node_score_check,node_results toneAmber
class node_backend,node_default_pp,node_fallback_pp toneMint
class node_participant toneIndigo
```

## Components

### Challenge

- [Challenge rules](https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/INSTRUCOES.md): `INSTRUCOES.md`

### Evaluation harness

- [Load scenarios](https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/rinha-test/rinha.js): `rinha-test/rinha.js`
- [HTTP requests](https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/rinha-test/requests.js): `rinha-test/requests.js`
- [Score and consistency](https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/rinha-test/rinha.js): `rinha-test/rinha.js`
- [Evaluation results](https://github.com/andregnicoletti/rinha-de-backend-2025/blob/main/PREVIA_RESULTADOS.md): `PREVIA_RESULTADOS.md`

### Payment services

- [Submitted backend](https://github.com/andregnicoletti/rinha-de-backend-2025/tree/main/participantes): `participantes`
- **Default processor**
- **Fallback processor**

### Other components

- **Participant**

## Connections

- Participant → Challenge rules: follows rules (evidence: `README.md`)
- Load scenarios → HTTP requests: calls (evidence: `rinha-test/rinha.js`)
- HTTP requests → Submitted backend: posts payments (evidence: `rinha-test/requests.js`)
- HTTP requests → Default processor: configures and reads (evidence: `rinha-test/requests.js`)
- HTTP requests → Fallback processor: configures and reads (evidence: `rinha-test/requests.js`)
- Load scenarios → Score and consistency: checks and scores (evidence: `rinha-test/rinha.js`)
- Score and consistency → HTTP requests: requests summaries (evidence: `rinha-test/rinha.js`)
- Score and consistency → Evaluation results: writes participant output
