Worklog for task "Migrate the website to a new engine"

29 сент. 2026 г., 20:53:49

Migration Result of pivkarta.ru: Production and SEO/Performance Evidence

Task completed: the new pivkarta.ru has been deployed to production. Further improvements will be handled as separate tasks.

Scope of the Brownfield Migration

The new site is built on top of the evolving HAIH runtime, but for a real legacy project, the engine was significantly upgraded to a full production setup: a unified Express runtime, React Router SSR, GraphQL/Apollo/Pothos, Knex connecting to the existing MySQL, Vite middleware in development, production static serving, Varnish, legacy thumbnail processing via Sharp, ETag/GET/HEAD, and proper server resource cleanup.

The core public structure of the old product has been restored: beers, venues, publications, members, comments, cities, map, and contacts, including historical URLs and entity relationships. Legacy data inventory recorded 1,636 beer entries, 3,797 venues, 600 articles, 64 cities, 3,296 comments, and 26,548 public profiles.

A registry of 73,760 addresses was built for compatibility. A full HTTP crawl recorded passed: 73760 with zero errors on the verified state. Additionally, 11,579 content links and 19,660 asset URLs were checked. Subsequent branch changes were covered by targeted tests, so the old full crawl should not be considered a check of every single commit.

Measurable Production Result

The main work of the current iteration, starting September 28, took 18:01:02 according to timers.

Lighthouse Before/After:

MetricLegacyNew
Performance4993
Accessibility75100
Best Practices7496
SEO83100

Application runtime according to docker stats:

  • legacy front: 588.4 MiB;
  • legacy api: 231.3 MiB;
  • legacy prisma: 953.2 MiB;
  • legacy application layer total: ~1773 MiB (~1.73 GiB);
  • new app: 178.2 MiB.

Thus, application RAM usage decreased by approximately 10 times (~90%), while Lighthouse Performance increased from 49 to 93, and Accessibility and SEO reached 100. It is particularly telling that Prisma 1 alone from the old stack consumed ~953 MiB — more than five times the entire new application runtime.

Main Engineering Conclusion

The migration confirmed the HAIH brownfield hypothesis: to replace a legacy application, it is not necessary to replicate its historical architecture. The practical path turned out to be:

legacy system → restoration of real requirements/capabilities → data and URL contract verification → discarding unnecessary legacy → minimal new architecture → verification → production evidence.

The initial hypothesis of preserving the legacy model as the primary architectural boundary was revised after examining the actual database and its 250 tables. As a result, valuable public data, relationships, and the web contract were preserved, but the accumulated infrastructural complexity of the old system was not replicated.

This distinguishes the result from a standard redesign: a production replacement of a real, long-standing site was achieved with measurable compatibility, a significantly lower runtime cost, and noticeably better web metrics.

Scope of This Task

Within the scope of this task, the migration is considered complete. Deferred write scenarios (authorization, entity creation/editing), further individual redesigns of internal pages, additional production checks, and other improvements should be handled in separate tasks rather than expanding the current one.

23.06.2026