A medium-sized delivery company processed over 200K delivery orders in a month. I designed and developed its order tracking system for customers to trace orders, plus a customer loyalty system and payment gateways integration.
With a cloud-native architecture comprised of several serverless components, the system was designed to be scalable and could handle a large volume of transactions with a 70% reduction in infrastructure cost.
Kerry Express (KEHK) is a delivery company, which was famous for its B2B courier service. The company planned to expand its market share in the B2C service and cross-border delivery service in 2021. As a part of its service expansion, the company decided to launch mobile apps for managing local delivery shipments and earn loyalty points. The system should also integrate with various payment gateways for multi-tenants.
The company had various systems used by different businesses. When I designed the system, it should support multiple data sources and could be accessed by multi-tenants. These features led to challenges:
I adopted a cloud-native architecture in the system design of the project. The whole system comprises a few microservices, such as serverless functions, queues and an event bus, to process data and handle different kinds of workload.
The core of the system is a few Node.js applications running on AWS Lambda connected from Amazon API Gateway. With the event bus and queues components, the payment module supports concurrent requests and processed 100K transactions in the first year.
As the format of orders varies from providers, I proposed to use a document-oriented database MongoDB, instead of a traditional relational database, to store the order data, which is high-performance, flexible but still easy to manage. Under an agile development cycle, this approach allowed my teammate and me to update the system effortlessly subject to the change of business requirements.
For the frontend, it was built in a Static Site Generation (SSG) approach with Nuxt, which delivers the websites in a fast and low-cost way. I also kept on optimizing the frontend to further improve the page speed and reduce the cost of data transfer.
By applying the modern web technology stack and microservice architecture, I helped the company to build the whole ecosystem of order tracking, membership and payment to handle transactions of over US$1M with up to 70% infrastructure costs reduced.
With the measurable success of the system, the company also planned to make use of IoT devices and build an internal dashboard to improve the reliability of its delivery service in the future.