Core Self-Service Banking API with OCR Document Processing
A leading Romanian retail bank
Overview
The core backend service of a leading Romanian retail bank’s self-service banking (SSS) platform. This hapi-based Node.js API underpins the front-end modules, exposing document-processing (OCR) and supporting endpoints behind a documented, secured interface.
The Challenge
A self-service banking platform needs a dependable core API that front-ends can call for shared capabilities, notably ID-document OCR, with consistent validation, authentication and discoverable contracts, so multiple SSS modules can integrate against one stable backend.
What We Built
A modern ESM Node.js service built on the hapi framework with a conventional models / controllers / routes structure under src/. It centres on an OCR pipeline (controllers/ocr.js, models/ocr) that wraps Regula’s document-reader web client for ID/document extraction. Routes are mounted from a single routes/index.js, requests validated with Joi, errors normalised with @hapi/boom, and the API self-documents via hapi-swagger. Static assets are served through @hapi/inert and @hapi/vision, JWTs handled with jsonwebtoken, and the service is covered by a Jest + supertest test setup.
Technologies & Approach
hapi 21 for a structured, plugin-based HTTP server; Joi for schema validation; hapi-swagger for OpenAPI docs; Regula for document reading; MongoDB for storage; axios for outbound calls. ESM modules and an airbnb-base ESLint config keep the codebase consistent; supertest gives endpoint-level test coverage.
Outcome / Impact
Provided the shared API backbone for the bank’s self-service modules, exposing OCR-driven document processing through a validated, documented, JWT-secured hapi service.
Capabilities Demonstrated
- Core banking REST API design on hapi (Node.js ESM)
- OCR document-processing endpoints (Regula integration)
- Joi validation, @hapi/boom error handling and JWT security
- Self-documenting APIs via hapi-swagger / OpenAPI
- Endpoint testing with Jest + supertest