The project was a big unsolvable puzzle we split into smaller tasks, prioritized, and resolved gradually. We selected Vendure.io since it’s a modern headless framework for rapid e-commerce setup with the possibility to develop custom UI and extend existing functionality with Node.js and GQL. Next, we rearranged the databases: merged them together, converted the data format, excluded duplicates and broken data, migrated to Postgre. The MVP was soft-launched, and the old version temporarily operated in parallel for beta-testing purposes.
The next challenge was to build richer functionality and update the database with fresh data – manufacturers, parts, price lists, discount schemes. The new functionality included a discount system, multilingual support, pricing import and order export automation. The most difficult was to replicate the discount system and develop price list automation. The same auto parts are manufactured in different factories and locations and can have fully-fungible analogs from other brands, and each manufacturer provides cumulative discount ranges that depend on how many items the company purchases on a regular basis. So, prior to building this functionality, we collected all requirements to be sure we were on the same page.
Regarding import automation, every 3 months the Customer receives files with actual products and new prices from suppliers. The files contain millions of lines, and it was necessary to parse these files using multithreading and queues and update the product catalog diff efficiently, handle processing errors, and shorten update times. After data ingestion, the product catalog increased to 10M unique parts causing serious performance degradation. We conducted load testing sessions optimizing the business logic, db structure, indexes, SQL queries, API, GQL schemas, UI, scrips, infrastructure. After 3 weeks of meticulous work, we achieved the desired results. Now the new site has completely replaced the legacy version.