All projects
A
Logistics / Transport

CTO - React hooks migrations, Node v12 to v18, JS to TS, microservices extraction

CTO role: 3 major migrations (React class to hooks, Node.js v12 to v18, JS to TS), separation of the WebSocket from the HAPI monolith, extraction of Docker Compose microservices.

3 Migrations
55+ Commits
2022-23 Period
CTO Role

The initial codebase was a HAPI monolith in JavaScript with React class components, running on Node.js v12. The REST API server and the WebSocket server (Socket.io) shared the same process, which made deployments risky: a crash of the real-time layer would take the API down with it. The dependencies hadn't been updated in over a year.

The strategy was to roll out the three migrations as progressive efforts, file by file. The React class to hooks conversion started with the leaf components and worked up toward the containers. The Node v12 to v18 upgrade required handling the OpenSSL breaking changes, the Buffer API changes, and updating every dependency. The JS to TS conversion was done in strict mode with type declarations extracted from the existing code.

The WebSocket extraction was carried out by creating an independent service communicating with the API via Redis pub/sub. This separation made it possible to scale the real-time layer independently of the REST API. The Docker Compose deployment encapsulated each service (API, WebSocket, Redis, worker) in its own container with dedicated health checks.

Technical architecture

Migration of React class components to functional components with hooks across the entire frontend.

Node.js v12 to v18 upgrade, handling breaking changes and updating dependencies.

JavaScript to TypeScript conversion on the HAPI backend and the React frontend.

Separation of the WebSocket server (Socket.io) from the HAPI REST API monolith.

Microservices extraction with Docker Compose, setting up Redis caching.

JIRA/GitHub workflows, code reviews, team mentorship.

Technical highlights

Microservices

Extraction of the HAPI monolith to Docker Compose

3 major migrations

React hooks, Node v18, TypeScript

Technical leadership

Code reviews, ADRs, mentorship

Technical stack

TypeScript
React
React Native
Node.js
HAPI
MongoDB
Redis
Docker
AWS
Socket.io
Role CTO / Technical Director
Duration 2022-2023
Engagement Long-term contract (Tier A)

A similar technical engagement?

A brief, a repo, or a quick call - whatever works.