Ritvik Saran S
← All projects

AI-driven Legacy Modernization

Rebuilt a legacy .NET monolith into 20 NestJS microservices and 6 React micro-frontends, cut over module by module, with a spec-driven AI workflow that cut developer effort by 60%+.

Role
Core engineer; owner of the sync layer and the spec-driven AI workflow
  • .NET
  • NestJS
  • React
  • Module Federation
  • PostgreSQL
  • Kafka
  • Debezium
  • Redis

The problem

A core business system ran as a server-rendered .NET Framework monolith on SQL Server. It was hard to change, slow under bulk workloads, and couldn't be replaced in one go because the business depended on it every day.

Approach

Incremental cutover

As a core engineer, I helped rebuild it as 20 NestJS microservices and 6 React micro-frontends (Module Federation) on PostgreSQL, involved from design through phased rollout. Both systems ran in parallel and modules moved over one at a time, while a sync layer I owned kept old and new consistent.

Event-driven processing

Kafka became the async layer between services and for bulk jobs. Calculation-heavy workflows were re-architected into event-driven services, with consumers running in parallel to process large batches much faster than the old synchronous flow.

Caching shared reference data

A Redis cache for reference data shared across the parallel consumers cut database queries by 60–70% during bulk runs and fixed the slowness users had been reporting.

Spec-driven AI development

I made our AI workflow systematic: legacy code → spec → implementation. The spec is the single source of truth. AI agents derive the technical design, database schema, tests and code from it, and engineers review every step. Steering files and skills keep agents consistent across a multi-service workspace. The effort goes into the spec, not into the generated documents.

Outcome

  • Monolith replaced by 20 microservices and 6 micro-frontends without a big-bang cutover
  • Developer effort cut by 60%+ with spec-driven AI development, which I presented to the team
  • 60–70% fewer database queries in bulk processing