← Selected Engineering Work

Enterprise Architecture

Personal Portal Serving Millions of Users

Rebuilt the personal portal from the ground up. It serves millions of Italian citizens daily, aggregating pension records, notifications, and multiple public services. The hard part: integrating 15+ different backend services while keeping Lighthouse at 95+ and accessibility at 100.

Personal portal interface
Personal portal

A national social security institute needed a single portal where citizens could access all their public services: pension records, healthcare benefits, unemployment claims, etc. The problem? Each service had its own backend, its own data model, and its own team. I had to build a frontend that could integrate all of them without becoming a unmaintainable mess.

01 / The problem

15 services, 1 portal, millions of users

Before the rebuild, citizens had to visit 15 different websites to access different public services. Each one had different login flows, different UIs, different everything. The institute wanted a single "personal area" where you could see everything: your pension contributions, upcoming appointments, notifications, available benefits.

The technical nightmare: each of those 15 services had its own backend API, its own data format, its own permission model. Some were REST, some were SOAP, some were GraphQL. Some required different auth tokens. My frontend had to talk to all of them, normalize the data, handle permissions correctly, and still load in under 2 seconds for millions of daily users.

02 / The architecture

Shell + micro-frontends with lazy loading

I built a "shell" architecture: the main portal handles authentication, navigation, and layout, but each service is loaded lazily as a micro-frontend. When you click "Pension Records", that module loads on demand. This kept the initial bundle small and allowed teams to deploy their services independently.

The hard part was the navigation. Each service had its own routing, but they all needed to share the same header, sidebar, and breadcrumbs. I used Angular's child routes to handle this: the shell defines the top-level routes, and each service module defines its own child routes. The shell's navigation components (header, breadcrumbs) subscribe to the router state and update automatically.

03 / The performance challenge

Lighthouse 95+ with millions of users

The institute has strict performance requirements: Lighthouse score must be 95+, and accessibility must be 100 (WCAG 2.1 AA). With millions of daily users, even a 100ms delay adds up to real costs.

I used OnPush change detection everywhere. This tells Angular to only re-render a component when its inputs change, not on every event. It's a huge performance win, but it means you have to be very careful about immutability. Every service response had to be cloned into a new object, not mutated in place. I wrote a lot of custom RxJS operators to handle this.

I also implemented "route-based preloading": when the user hovers over a navigation link, we start loading that module in the background. By the time they click, it's already loaded. This made navigation feel instant.

04 / Type safety at scale

Generic typed sections for complex data

The portal had to display many different types of data: pension records, appointment lists, notification feeds, etc. Each one had different fields, different filters, different sorting options. I didn't want to write a separate component for each one.

I built a generic "section" component that could render any data type, as long as it conformed to a TypeScript interface. Each service module would define its own interface (e.g., `PensionRecord`, `Appointment`), and the section component would use TypeScript generics to ensure type safety. This meant if a service changed its API response format, TypeScript would catch it at compile time, not in production.

The trade-off: the generic component was more complex to build, but it saved us from writing 15 separate data-view components. And it meant new services could be added in days, not weeks.

Evidence & further reading

Technical references