Sistema Contable + Nómina Client system
Payroll & accounting engine
The factory's own replacement for Siesa ERP: Colombian payroll, automatic accounting vouchers, DIAN electronic payroll and PILA social-security files — with snapshots, reversals and an audit trail.
- Reverse-engineered Siesa's payroll documents and wrote down 22 business rules and 18 architecture decisions before the engine existed.
- Every payroll run becomes balanced accounting vouchers, DIAN UBL XML signed with XAdES, PILA flat files and bank payment batches.
- 569 automated tests — including a golden test that replays January 2026 end to end — behind a nine-stage CI pipeline.


The brief
Bizcopan, a bread factory in Zapatoca (Santander), runs payroll and accounting for about fifty people on Siesa, a commercial ERP. The goal: replace it with a system the company owns, aligned with Colombian labor law and trusted by the accounting team from day one.
Trust is the hard part, so the project started without code: a study of the legal framework, reverse-engineering of Siesa's monthly documents, a questionnaire with the person who runs payroll, and a data model built from what the old system actually produces.
What I built
- Payroll engine for fortnightly and monthly runs, with monthly snapshots of provisions and contributions
- Novelties: overtime and surcharges, leave, sick leave, vacations and loan installments
- Automatic accounting vouchers for every payroll, with reversals and a chart-of-accounts tree
- DIAN electronic payroll: UBL XML, XAdES signature and transmission tracking
- PILA flat files with integrity hash, payment batches and bank flat files
- Employee inquiry by period, opening balances imported from Excel, month-end closing
- A ledger-style interface in light and dark: section rail, tabs, grouped processes and a Ctrl K “Go to…” search
Architecture
- Employees & contractssalary · EPS · pension · ARL
- Noveltiesovertime · leave · loans
- Yearly parametersminimum wage · rates · thresholds
- Accounting vouchersbalanced · reversible
- DIAN e-payrollUBL XML · XAdES signature
- PILA fileflat file · hash · status
- Payment batchesbank flat files
Every change passes
- 1ruff
- 2mypy --strict
- 3pytest unit
- 4pytest integration
- 5pytest golden
- 6alembic ↑↓
- 7front-end build
- 8docker build
- 9deploy staging
Under the hood
Rules before code
22 business rules and 18 ADRs were written and reviewed before the first migration. Each module's design names the rules it implements, so a disagreement about a number becomes a conversation about a rule.
Tests that include the real world
Unit tests for pure calculations, integration tests against a real PostgreSQL started with testcontainers, and a golden test that replays a full month of payroll.
CI as a gate
ruff, mypy --strict, three pytest suites, an Alembic upgrade/downgrade round-trip, the front-end build and a Docker build must pass before staging deploys.
Safe to rehearse
A playground mode mocks DIAN and the banks and shows a banner on every screen, so the accounting team can practice without anything leaving the building.
Async where it pays
SQLAlchemy 2 async on FastAPI for the API, Alembic kept synchronous by decision, and DIAN retries and polling in an arq worker on Redis with backoff.
Gallery








Where it stands
Payroll, accounting and social-security modules are built and tested. A parallel run against Siesa is planned for October–December 2026, with go-live in January 2027.
Multi-company support is in the design from the start — a second company is already on the roadmap.
Screens show fictional employees created in the system's playground mode. No real payroll data appears on this site.