A comprehensive fund accounting ABOR (Accounting Book of Records) system for the Brazilian investment fund market. Implements Brazilian regulatory requirements (CVM 175, ANBIMA, etc.).
Core Ledger is an enterprise-grade monorepo containing:
- Web Application - Angular 21 frontend with modern signals-based architecture
- REST API - .NET 10 backend with Clean Architecture
- Background Worker - .NET 10 service for async processing via RabbitMQ
- ETL Pipeline - Meltano-based data integration for B3 financial instruments
- E2E Tests - Playwright test suite with Brazilian financial test data
core-ledger/
├── apps/
│ ├── core-ledger-ui/ # Angular 21 frontend
│ ├── core-ledger-api/ # .NET 10 Web API
│ ├── core-ledger-worker/ # .NET 10 Background Worker
│ └── core-ledger-e2e/ # Playwright E2E tests
├── libs/
│ ├── api-client/ # Generated TypeScript API client (NSwag)
│ └── core-ledger-dotnet/ # Shared .NET libraries
│ ├── CoreLedger.Domain/
│ ├── CoreLedger.Application/
│ ├── CoreLedger.Infrastructure/
│ ├── CoreLedger.UnitTests/
│ └── CoreLedger.IntegrationTests/
├── tools/
│ └── etl/ # Meltano ETL pipeline
├── docs/ # Documentation
│ ├── aidebug/ # AI debugging research
│ ├── design-system/ # CSS/SCSS architecture
│ ├── specs/api/ # API specifications
│ ├── specs/ui/ # UI specifications
│ ├── testing/ # Testing documentation
│ ├── etl/ # ETL documentation
│ └── compliance/ # Compliance documentation
├── CoreLedger.sln # Root .NET solution
├── nx.json # Nx workspace configuration
└── package.json # Root package.json
- Node.js >= 20.9.0
- npm >= 11.6.2
- .NET SDK 10.0
- Docker (for infrastructure services)
npm install
dotnet restore CoreLedger.slnnpm run docker:up
# Starts: PostgreSQL (5432), Redis (6379), RabbitMQ (5672/15672)# Terminal 1: Start the API
nx serve core-ledger-api
# Terminal 2: Start the UI
nx serve core-ledger-ui
# Open http://localhost:4200 (login: admin / any password)# Serve applications
nx serve core-ledger-ui # Angular dev server (http://localhost:4200)
nx serve core-ledger-ui -c local-auth # With Auth0 authentication
nx serve core-ledger-api # .NET API (http://localhost:5071)
nx serve core-ledger-worker # .NET Worker
# Build
nx build core-ledger-ui # Build Angular
nx build core-ledger-api # Build .NET API
nx run-many -t build # Build all projects
# Test
nx test core-ledger-ui # Angular unit tests (Vitest)
nx test core-ledger-dotnet # .NET unit tests
nx e2e core-ledger-e2e # Playwright E2E tests
# Utilities
nx graph # Visualize dependency graph
nx affected -t test # Test only affected projectsnpm start # Start Angular UI (mock auth)
npm run start:auth # Start Angular UI (Auth0)
npm run start:api # Start .NET API
npm run start:worker # Start .NET Worker
npm run build # Build all projects
npm run test # Test all projects
npm run lint # Lint all projects
npm run e2e # Run E2E tests
npm run db:migrate # Run EF Core migrations
npm run docker:up # Start infrastructure
npm run docker:down # Stop infrastructure
npm run graph # Visualize Nx dependency graph
npm run api:export-spec # Export OpenAPI spec from running API
npm run api:generate-client # Generate TypeScript API clientdotnet build CoreLedger.sln
dotnet test CoreLedger.sln
nx run core-ledger-api:migrate # Run EF Core migrations| Component | Technology |
|---|---|
| Frontend | Angular 21, Bootstrap 5, NgRx Signals |
| Backend | .NET 10, Entity Framework Core, MediatR |
| Database | PostgreSQL 17 |
| Cache | Redis |
| Queue | RabbitMQ |
| ETL | Meltano, DBT, Python |
| Testing | Vitest (UI), xUnit (.NET), Playwright (E2E) |
| Build | Nx, Angular CLI, .NET CLI |
core-ledger-e2e → core-ledger-ui → api-client
→ core-ledger-api → core-ledger-dotnet
core-ledger-worker → core-ledger-dotnet
api-client → core-ledger-api (for OpenAPI spec generation)
- Domain - Pure business logic, no external dependencies
- Application - Use cases with MediatR (CQRS), validators, DTOs
- Infrastructure - EF Core, PostgreSQL, RabbitMQ integrations
- API/Worker - Entry points consuming shared libraries
cadastros → Funds, assets, investors
carteira → Operations, positions
passivo → Investor movements
cota → NAV, shares, closing
pricing → Prices and indexes
audit → Logs and history
TypeScript API clients are auto-generated from the .NET API using NSwag:
# With API running (http://localhost:5071)
npm run api:export-spec # Export OpenAPI spec
npm run api:generate-client # Generate TypeScript clientImport generated clients in Angular:
import { FundosClient, CalendárioClient } from '@core-ledger/api-client';See API Client Generation Guide for details.
Detailed documentation is available in the /docs directory:
- API Specifications - .NET API specifications
- UI Specifications - Angular UI specifications
- Testing - E2E test coverage and Brazilian test data
- ETL - B3 instruments pipeline documentation
- Compliance - Angular compliance review guides
- AI Debug - AI debugging research and bug patterns
- Design System - CSS/SCSS architecture guide
- API Client Generation - NSwag TypeScript client generation
Each project has a CLAUDE.md file with AI-assisted development guidance:
/CLAUDE.md- Monorepo overview/apps/core-ledger-ui/CLAUDE.md- Angular UI patterns/tools/etl/CLAUDE.md- Meltano ETL guidance
Process B3 financial instruments data:
cd tools/etl
meltano install
export TARGET_POSTGRES_PASSWORD=postgres
bash extract/preprocess_b3_instruments.sh && meltano run b3_instruments_pipelineSee ETL Documentation for details.
- Create a feature branch from
main - Make changes following project code standards
- Run tests:
npm run test && dotnet test CoreLedger.sln - Submit a pull request
Proprietary - All rights reserved