A payments product served a web app, a mobile app and an internal operations
tool, all backed by several Java/Spring Boot microservices. My work sat across
that stack: the NestJS layer between clients and services, the Java services
themselves, and the client applications.
The same payment concepts appeared in three places. Letting every client know
the whole service topology would spread integration logic through the interface,
and keeping a separate copy of each rule in each app risked behavior that
slowly diverged.
Three connected problems showed up together:
- Clients needed simple, client-specific APIs, not a view of every service.
- Payment-method rules were duplicated across web, mobile and the internal tool.
- Sensitive operations needed consistent access rules, and the Java domain logic
needed more protection against regressions.
I maintained and extended NestJS backends-for-frontend that exposed REST and
GraphQL. They aggregated responses from several microservices, normalized
payloads, and handled pagination, filters, sorting and errors, so each client
received a contract shaped for its screen. I kept composition and adaptation in
the BFF and left core payment rules in the domain services, so the BFF would not
become a second business-logic monolith. REST served well-defined resource
operations; GraphQL helped when a client needed to select or combine fields. I
treated that as a trade-off, not an upgrade.
In React/Next.js and React Native I built payment-management capabilities,
including payment-method configuration and terminal management with pagination,
filtering and backend integration. The internal tool was an operational surface:
changes there affected configuration seen by the customer-facing apps, so the
work included understanding the rule, adjusting the BFF contract and, when
needed, changing the Java service.
I extracted payment-method rules into a shared library used by web, mobile and
the internal tool. The library depended on abstractions, with dependency
injection supplying each app's own HTTP implementation, so it was not tied to one
client. That gave the three applications one source for the shared behavior. The
trade-off is release coupling: a breaking change reaches every consumer.
On the Java/Spring Boot side, built around DDD and hexagonal architecture, I
fixed bugs, improved product behavior and wrote unit tests with Mockito. I set up
coverage tracking and adjusted GitLab CI stages so build and tests ran
automatically before later steps; I did not own production deployment.
Domain-layer coverage reached roughly 90% in the services I worked on. Coverage
was a supporting signal: the goal was to protect business rules, and I used TDD
in part of the work, not across the whole codebase.
I helped reorganize parts of the frontend into feature modules with shared
components kept separate, and used Redux or Zustand depending on the size of the
state, along with caching, lazy loading, memoization, fewer requests and
pagination where they solved a real problem.
Authentication came from Azure AD; my part was authorization. I implemented
guards and role separation for about five user profiles and a fail-closed
default: when permission cannot be confirmed, access is denied. Access is checked
in the BFF as well as hidden in the interface. I implemented the rules; I did
not design the full permission matrix.
- Payment-method rules reused by three applications from one library.
- Roughly 90% domain-layer test coverage in the Java services I worked on, with
tests running in CI.
- Access separation for about five profiles with a fail-closed default.
- Cleaner client contracts through BFF aggregation and normalization.
- No incident, latency or user-count outcome is attributed to my individual work.
A BFF earns its place when it stays a thin adaptation layer. Shared libraries
help when they depend on interfaces, and they need clear ownership of releases.
In payment and administrative systems, a temporary denial is safer than granting
an operation that could not be verified.
I would add end-to-end tracing across client, BFF and services, contract tests
between the BFF and each service, explicit API versioning and clearer ownership
rules for where each rule lives.