Payments Backend · Personal project
NovaPay
Microservice backend for bulk payroll and international transfers, built around idempotent requests and a double-entry ledger.
My role: Sole developer. Designed and built every service.
Overview
NovaPay is a backend for companies that pay people across borders. An employer holds wallets in several currencies, sends one-off transfers and runs payroll for many employees in a single batch.
Because it moves money, every transfer is safe to retry and is recorded twice in a double-entry ledger, so a repeated request or a crashed job does not pay anyone twice.
Key Features
- Accounts with one wallet per currency, converting USD to and from EUR and BDT
- Transfers between wallets, in the same or a different currency
- Exchange-rate quotes locked for 60 seconds and usable once
- Bulk payroll: one batch pays many employees, with a status for each payment
- Admin view of service health, ledger balance checks and transfer volume
What I Built
- Six TypeScript services (account, transaction, FX, ledger, payroll, admin) behind an Nginx gateway, each with its own PostgreSQL database.
- Idempotency keys checked against a payload hash, with a unique index that blocks concurrent duplicates.
- Double-entry ledger with a balance check and a SHA-256 hash chain to detect tampering.
- Bulk payroll on BullMQ with per-item checkpoints, so a crashed job resumes where it stopped.
- Field-level encryption for sensitive identifiers, such as user IDs.
- Observability with OpenTelemetry traces in Jaeger and Prometheus metrics in Grafana.
- CI in GitHub Actions that runs the tests of only the services a change touches.
Built With
- TypeScript
- Hono
- PostgreSQL
- Prisma
- Redis
- BullMQ
- Nginx
- Docker
- OpenTelemetry
- GitHub Actions
- Prometheus
- Grafana