All projects

Scrooge Bank CRM

A banking CRM project for UBS, split into independently deployed microservices.

Team, May 2025

Scrooge Bank CRM screenshot

7

people

5

services behind one gateway

1,065

commits in under eight weeks

87

tests, 76 of them mine

Why

A customer-relationship system for a bank's staff, built by a team of seven for a university module. Agents sign in with a password and an emailed one-time code, manage client profiles and accounts, and see transactions that arrive from an outside file feed. Admins can read an audit trail of every change.

How it works

Requests enter through one gateway and reach Spring Boot services running on Kubernetes. Services do not call each other to say what happened: they publish events on Kafka, and the services that send email and keep the audit trail simply listen. Transactions come in by a separate path, as files that are stored, queued and then processed.

Follow a client update

The gateway routes the web request to the client service.

clientssign-inwhat changedemail, auditfilestransactionsstaffWeb appNext.js on AmplifyComms and log servicesEmail, audit trailBank file feedSFTPGatewaySpring Cloud GatewayClient serviceClients, accounts, auditKafkaProtobuf eventsIngestionStorage, queue, functionUser serviceSign-in, one-time codesDatabasesAurora PostgreSQL behind a proxy, a document store for logs, Redis for codes

Decisions

Audit and events as aspects, not inline calls

Every change to a client has to be logged and announced. Instead of repeating that in each method, two aspects wrap the service layer: one writes the audit row, the next publishes the event. The cost is behaviour tied to method names, which broke more than once.

Announce only what succeeded

An event goes out after the database write, and not at all if the call failed. It carries the field and its value before and after, so the email and the audit trail can say exactly what changed.

Agents see only their own clients

An admin passes every check. An agent is let through only when the token's subject matches the agent the client belongs to, and the same rule follows through to that client's accounts and transactions.

One issuer, checked everywhere

One service signs tokens with a private key and publishes the public one. Every other service verifies tokens on its own, so there is no shared secret and no session store to keep in step.

Files decoupled by a queue

The feed could have triggered processing directly. Putting a queue between storage and the function means a bad file is retried, then set aside after four attempts, without holding up the files behind it.

Deployment from Git

The cluster follows what is in the repository and corrects itself when it drifts. New images are pinned by digest and the change is written back to Git, so what is running is always what is recorded.

My part

I owned the client service: 231 of its 247 commits. That covers the client, account and transaction APIs, the audit and event aspects, the per-agent access rules, pagination, soft deletion, and 76 of the project's 87 tests. I also built the first version of the client and account screens in the web app.

The Kubernetes, Terraform, Kafka cluster and file ingestion work was my teammates'.

Built with

Services
  • Java
  • Spring Boot
  • Spring AOP
Messaging
  • Apache Kafka
  • Protobuf
Gateway
  • Spring Cloud Gateway
  • NGINX
Storage
  • Aurora PostgreSQL
  • MongoDB
  • Amazon DocumentDB
  • Redis
Frontend
  • Next.js
  • TypeScript
Deployment
  • Docker
  • Kubernetes on AWS EKS
  • Helm
  • Terraform
  • Argo CD
  • GitHub Actions
Observability
  • Prometheus
  • Grafana