Lending Proposal Connector API
A leading Romanian retail bank
Overview
A Node.js backend connector service for a leading Romanian retail bank that ingests and serves lending product proposals, notably an unsecured-loan (“Flexible”) flow, backed by a DocumentDB/MongoDB store and documented via Swagger.
The Challenge
The bank’s self-service lending journey needed a dedicated connector to map incoming proposal data into a structured store, expose it through a documented, validated API, and run reliably as a containerized service with proper logging and metrics.
What We Built
A hapi-based service (@hapi/hapi, @hapi/inert, @hapi/vision, @hapi/basic) with a clean layered architecture under src: routes (aps, vital health checks), controllers, models (including propuneri/aps-Flexible), and a repository layer with a BaseRepository plus dedicated FlexibleConfigurationRepository and FlexiblePropuneriRepository. A services layer handles database access, configuration helpers, validations, error handling, and a Winston-based logger exposed as a hapi plugin. Request validation uses Joi, API documentation is generated with hapi-swagger, and runtime metrics are exported via prom-client (Prometheus). Persistence targets MongoDB / Amazon DocumentDB (a docdb_global-bundle.pem is bundled for TLS), and the service ships with Docker Compose and GitHub Actions configuration.
Technologies & Approach
hapi was chosen for its plugin-driven structure, first-class validation (Joi), and Swagger integration, fitting a well-documented internal connector. A repository/service/controller separation keeps proposal logic testable, while prom-client and Winston provide the observability expected of a production banking service. DocumentDB gives a managed, MongoDB-compatible store.
Outcome / Impact
Delivered a structured, documented, and observable connector service that bridges lending proposal data into the bank’s self-service flow, with a layered design that makes adding further product types straightforward.
Capabilities Demonstrated
- Designing layered Node.js backend services (routes/controllers/services/repositories)
- Document-database modeling on MongoDB / Amazon DocumentDB
- Request validation with Joi and auto-generated OpenAPI/Swagger docs
- Production observability with Prometheus metrics and structured logging
- Containerized delivery with CI via GitHub Actions