Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

83 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏦 Banking Challenges Monorepo

Technical challenges simulating real-world Brazilian financial market problems
Clean Architecture β€’ Domain-Driven Design β€’ High Performance

Build pnpm Node TypeScript Tests License


πŸ‡§πŸ‡· DescriΓ§Γ£o / πŸ‡¬πŸ‡§ Description

πŸ‡§πŸ‡·

Banking Challenges Γ© um monorepo contendo 14 desafios tΓ©cnicos que simulam problemas reais e complexos do mercado financeiro brasileiro. Este projeto foi desenhado sob os mais rΓ­gidos padrΓ΅es de Clean Architecture (desacoplamento total de frameworks nas camadas de negΓ³cio) e Domain-Driven Design (DDD) para demonstrar proficiΓͺncia em engenharia financeira moderna:

  • SPI (Sistema de Pagamentos InstantΓ’neos): SimulaΓ§Γ£o do fluxo de liquidaΓ§Γ£o do Banco Central (padrΓ£o ISO 20022 / XML).
  • DICT (DiretΓ³rio de Identificadores): DiretΓ³rio do Pix para registro e resoluΓ§Γ£o de chaves em tempo real.
  • ISO 8583: Motor de empacotamento/desempacotamento de mensagens de cartΓ΅es de crΓ©dito/dΓ©bito.
  • Ledger BancΓ‘rio: Livro-razΓ£o financeiro de partidas dobradas integrado a GraphQL e Relay.
  • Open Finance: Motor de consentimento baseado em OAuth 2.0.
  • Workflow Engine: AutomaΓ§Γ£o bΓ‘sica de tarefas distribuΓ­das (estilo n8n/Zapier) integrada via WebSockets.

πŸ‡¬πŸ‡§

Banking Challenges is a production-ready monorepo containing 14 technical challenges simulating real-world Brazilian fintech problems. Built with a strict focus on Clean Architecture (full framework decoupling in core business layers) and Domain-Driven Design (DDD):

  • SPI (Instant Payments System): Central Bank settlement simulator utilizing ISO 20022 XML standards.
  • DICT (Directory of Account Identifiers): Real-time Pix directory key registration and lookup engine.
  • ISO 8583: Credit/debit card financial network messaging packer and unpacker.
  • Bank Ledger: Transactional double-entry ledger with GraphQL and Relay interfaces.
  • Open Finance: Consent engine utilizing OAuth 2.0 protocols.
  • Workflow Engine: Distributed task automator (like n8n/Zapier) running via WebSockets.

πŸ“ Architecture Overview / VisΓ£o Geral da Arquitetura

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           Banking Challenges Monorepo                         β”‚
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                          Infrastructure                              β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”‚  β”‚
β”‚  β”‚  β”‚ MongoDB  β”‚  β”‚  Redis   β”‚  β”‚PostgreSQLβ”‚  β”‚  MinIO   β”‚             β”‚  β”‚
β”‚  β”‚  β”‚  (7)     β”‚  β”‚ (7-alpine)β”‚  β”‚(16-alpine)β”‚  β”‚(S3-compat)β”‚             β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                         Backend Services                             β”‚  β”‚
β”‚  β”‚                                                                       β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚  β”‚
β”‚  β”‚  β”‚  Ledger    β”‚  β”‚ SPI Simulatorβ”‚  β”‚DICT Simulatorβ”‚                  β”‚  β”‚
β”‚  β”‚  β”‚ (GraphQL)  β”‚  β”‚(ISO 20022)   β”‚  β”‚  (REST)      β”‚                  β”‚  β”‚
β”‚  β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€                  β”‚  β”‚
β”‚  β”‚  β”‚ ISO 8583   β”‚  β”‚   Workflow   β”‚  β”‚Open Finance  β”‚                  β”‚  β”‚
β”‚  β”‚  β”‚ Simulator  β”‚  β”‚   Engine     β”‚  β”‚  Simulator   β”‚                  β”‚  β”‚
β”‚  β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€                  β”‚  β”‚
β”‚  β”‚  β”‚   NFS-e    β”‚  β”‚    Report    β”‚  β”‚ Leaky Bucket β”‚                  β”‚  β”‚
β”‚  β”‚  β”‚ Integrationβ”‚  β”‚    System    β”‚  β”‚(Rate Limiter)β”‚                  β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                         Frontend Applications                         β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                    β”‚  β”‚
β”‚  β”‚  β”‚    Landing Page     β”‚  β”‚     KYC System      β”‚                    β”‚  β”‚
β”‚  β”‚  β”‚   (Next.js 14)      β”‚  β”‚    (Vite + React)   β”‚                    β”‚  β”‚
β”‚  β”‚  β”‚   + Storybook       β”‚  β”‚    + Zustand        β”‚                    β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                      Documentation (VitePress)                       β”‚  β”‚
β”‚  β”‚  Provides RFCs, Architecture Decision Records (ADRs) and diagrams    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack / Pilha TecnolΓ³gica

Category Technologies Focus
Monorepo Turborepo, pnpm workspaces, TypeScript 5.4 Project isolation & parallel builds
Backend Frameworks Node.js (20+), Koa, Fastify, Express Chosen based on service performance needs
GraphQL graphql-js, graphql-relay, DataLoader Ledger manipulation and query batching
Databases MongoDB 7 (Replica Set), PostgreSQL 16, Redis 7 Event sourcing, transaction logging, caching
Protocols & Formats ISO 20022 (XML), ISO 8583 (Binary), SOAP/XML High fidelity financial integration
Frontend Next.js 14 (App Router), React 18, Zustand, Radix UI Responsive interfaces & state sync
Testing Jest, Vitest, Testing Library Test-Driven Development (TDD) cycle

πŸ“‚ Project Structure / Estrutura do Projeto

banking-stack/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ backend/
β”‚   β”‚   β”œβ”€β”€ ledger/               # Double-entry ledger API (GraphQL/Relay/MongoDB)
β”‚   β”‚   β”œβ”€β”€ spi-simulator/        # SPI instant payment settlement (ISO 20022 XML)
β”‚   β”‚   β”œβ”€β”€ dict-simulator/       # Pix directory lookup & registry (REST/MongoDB)
β”‚   β”‚   β”œβ”€β”€ iso8583/              # Credit card transaction network packet parser (TCP)
β”‚   β”‚   β”œβ”€β”€ workflow-engine/      # Distributed state automation engine (WebSockets/Redis)
β”‚   β”‚   β”œβ”€β”€ open-finance/         # Open Finance consent flows (OAuth 2.0/REST)
β”‚   β”‚   β”œβ”€β”€ nfse/                 # Brazilian electronic service invoices (SOAP/XML)
β”‚   β”‚   β”œβ”€β”€ report-system/        # Microservice compiling reports to S3 (PostgreSQL/MinIO)
β”‚   β”‚   └── leaky-bucket/         # Distributed API rate limiter (GraphQL/Redis)
β”‚   β”‚
β”‚   β”œβ”€β”€ frontend/
β”‚   β”‚   β”œβ”€β”€ landing-page/         # Next.js 14 landing page & shared design system
β”‚   β”‚   β”œβ”€β”€ kyc-system/           # React 18 / Zustand frontend for identity validation
β”‚   β”‚   └── shared-ui/            # Reusable UI component library (Radix/Tailwind)
β”‚   β”‚
β”‚   └── docs/                     # Documentation hub (VitePress + Mermaid)

🧩 Challenges / Desafios

# Challenge (EN / PT) Status Core Stack Documentation
01 CRUD Bank Ledger / Ledger BancΓ‘rio βœ… Completed Koa, GraphQL, Relay, MongoDB docs
02 SPI Simulator / Simulador SPI/ICOM βœ… Completed Fastify, ISO 20022, XML Parser docs
03 DICT Simulator / Simulador DICT βœ… Completed Fastify, REST API, MongoDB docs
04 ISO 8583 Simulator / Simulador ISO 8583 βœ… Completed Fastify, raw TCP sockets, binary docs
05 Workflow Engine / Automador de Processos βœ… Completed Fastify, WebSockets, Redis pub/sub docs
06 Open Finance / Consentimento Pix βœ… Completed Fastify, OAuth 2.0, REST, certs docs
07 NFS-e Integration / IntegraΓ§Γ£o Nota Fiscal βœ… Completed Fastify, SOAP, XML signatures docs
08 Report System / GeraΓ§Γ£o de RelatΓ³rios βœ… Completed Fastify, PostgreSQL, MinIO SDK docs
09 Leaky Bucket / Limitador de Banda βœ… Completed Fastify, GraphQL, Redis hashing docs
10 Landing Page + DS / Landing Page e DS βœ… Completed Next.js 14, Radix UI, Storybook docs
11 KYC System / VerificaΓ§Γ£o cadastral βœ… Completed Vite, React, Zustand, Zod schema docs
12 DevOps Proxmox / Infraestrutura Proxmox βœ… Completed Proxmox VE, LXC containers, Docker docs
13 CI/CD Pipeline / AutomaΓ§Γ£o de entrega βœ… Completed GitHub Actions, Turborepo cache docs
14 Architecture RFC / DecisΓ΅es de Arquitetura βœ… Completed VitePress, Markdown, Mermaid, ADRs docs

πŸš€ Quick Start / InΓ­cio RΓ‘pido

Prerequisites

  • Node.js (>=20.0.0)
  • pnpm (>=9.0.0)
  • Docker & Docker Compose

Commands

# 1. Clone & install dependencies
git clone https://github.com/mateussiqueira/banking-stack.git
cd banking-stack
pnpm install

# 2. Environment config & initial script setup
cp .env.example .env
make setup

# 3. Spin up MongoDB, Redis, PostgreSQL, and MinIO locally
make infra-up

# 4. Run all services in development mode (using Turborepo)
make dev

# 5. Run full test suite (Jest/Vitest)
make test

# 6. Verify linting & type checks
make lint
make typecheck

πŸ“š Technical Documentation / DocumentaΓ§Γ£o TΓ©cnica

The monorepo features a comprehensive VitePress documentation suite containing Architecture Decision Records (ADRs) and detailed guides:


πŸ“„ License / LicenΓ§a

Distributed under the MIT License. See LICENSE for more details.

Releases

Packages

Contributors

Languages