Skip to content
Back to portfolio

Project · Microservices · Document dispatch

Swisslife

A platform that sends personal documents to thousands of people, gets each one to verify with a one-time code, and tracks every step for compliance.

Period
2025 - 2026
Role
Backend engineer
Client
Insurance / financial-services domain client.

10

services from one monolith

8

JetStream streams in the event bus

1

command to start the full local stack

0

shared databases between services

Problem

Insurance work means sending personal documents - policy updates, claim packs, statements - to thousands of people at once, and proving who opened what, when. Email by itself isn't enough: the recipient needs to verify they are who they say they are before any document is shown. The system needed bulk dispatch, time-limited personal links, one-time codes via SMS or email, an unforgeable audit trail, scheduled reminders, and an export-ready report for compliance reviews.

Approach

  1. 01

    Split the platform into one service per concern: login, settings, the campaigns themselves (envoi), recipients, documents, email, reminders, one-time codes, reports, audit. Each service owns its own database - no shared tables, no hidden coupling.

  2. 02

    Wired every service to a message bus so anything that happens - an email opened, a code verified, a document downloaded - fires an event that the audit service catches and writes into an unalterable time-series log.

  3. 03

    Consolidated two separate one-time-code systems into a single authority service; every other service now asks for codes over gRPC instead of duplicating the logic.

  4. 04

    Designed the reporting service to pull from each service's database read-only, generate a four-sheet Excel workbook (summary, recipients, events, analytics) with charts inline, and cache the result for an hour so big workbooks don't get regenerated for every click.

  5. 05

    Configured Kong gateway in declarative mode - every route, every rate limit, every plugin is checked into git, no runtime config drift.

  6. 06

    Stood up Prometheus, Grafana, and Jaeger in the dev compose so observability is wired before the first feature ships, not after the first outage.

Stack

Lessons