Today the food industry transforms to an extent where restaurants and delivery services are competing with not only their foods but also with the most convenient and user-friendly apps, be that web or mobile. When there are issues that cause any negative emotion from a customer, chances are high that you lose them even before they get to order and try your food. Therefore, having a website or application that is simple and operates properly is crucial when it comes to customer service.
Improving our client’s platform was one of the key tasks: they were looking for a team of engineers that will help them rebuild their platform and make it scalable and flexible. However, our team also introduced changes to the platform that exceeded the client’s expectations. In the article, we are sharing our experience of upgrading the system for a leading food delivery business.
What we were asked to do
In the early stages of the project, the Agiliway team had two major tasks: improve the client’s website and advance their system to automate as many services as possible.
Among the key requirements were:
- 1. To reduce the workload of the central system
- 2. To create central hosting of the website
- 3. To set up data exchange
- 4. To put services structure in order
- 5. To establish a secure connection with virtual machines
- 6. To fix a problem with dynamic data synchronization
After conducting an extensive analysis of all the issues and their impact on the client’s operation, the Agiliway software development team started fixing all the problems with the website, which plays a significant role in business operations. At the same time, engineers focused on enhancing the system by making it more user-friendly and easier to maintain, which saves a ton of money in the long run.
Solutions and technological stack
To make the system scalable and flexible, Agiliway engineers had to reconstruct the system bearing in mind that it has microservice architecture and over fifteen different components.
- Dapr is used for connection between microservices. Each application of the platform has a clean architecture structure; therefore, we have a domain, application level, structure level, and, finally, the application itself. The platform comprises over a dozen different services;
- The main business logic was divided into multiple services (loyalty system, basket, authorization, notifications, etc.) that helped to reduce the load off the system and distribute it evenly onto these services;
- Different databases are utilized for different services. Such a decision was made since different services have different requirements;
- For administration services (setting of all the products and connections between them): PostgreSQL;
- For order services: MongoDB;
- For logs and audit: Elastic Search;
- Amazon was chosen as a central hosting since the majority of services used on the project are delivered by Amazon. This will reduce time and costs in the future when merging services or introducing any changes to the architecture;
- Lambda functions are used for data exchange between services through Dapr components, and Amazon SQS/SNS services;
- All services were reconfigured/rewritten utilizing .Net. The previous version was built with Python and Go which eventually led to poor communication between these services;
- WebSockets are used to send notifications to the client regarding live events including failed payments while placing an order, delivery status tracking, payment status, etc.;
- Connections to virtual machines were using IPs, which weren’t secure, and were changed to DNS.
- DefectDojo was connected to check front-end and back-end vulnerability, therefore, the system knows when a tool or library shall be updated or fix connection issues;
- To trace database requests or front-end slow queries, Jaeger was introduced. Everything is set up in such a way that the team immediately gets notifications when queries fail to go through;
- Dynamic data synchronization was set. Abstractions were created to perform periodically repeated tasks using HangFire;
- Using monorepo with a clean architecture approach for developing all front-end parts of the project – web and mobile apps, admin panel – allowed to develop shared components for multiple parts of the project and reduced time for development and support as well as the speed of response of the front-end parts of the projects;
- To render and fetch data for front-end components on the server’s side Next.js framework was chosen with the ISR approach which allows for creating or updating the static pages after the website was built. This is also useful when it comes to managing website content.
The Agiliway development team not only fixed the existing issues in the client’s system but also managed to automate the configurations of the food delivery schedule, etc. Now all their data is stored and processed through the unified system instead of parsing data from different cloud services, Excel documents, etc.
In addition, we are aiming at connecting all the data from all the databases into one data lake, and then introducing a BI tool for advanced data management. This will help scale business and reduce the time for processing information and arranging it into reports.
The technological stack of the project includes .NET 5, Asp.Net Core, Entity Framework Core, Dapr, AutoMapper, FluentValidation, MediatR, CQRS, DDD, AMQ for back-end; React, React Native, Recoil, Next.js for front-end; AWS DocumentDB, PostgreSQL, MongoDB databases and Docker, Kubernetes.
What’s the value for the client?
Working on such a complex solution is both challenging and rewarding. The development team managed not only to fix the existing issues on both the back-end and front-end but also to implement changes that: helped to automate most of the business processes, took the load off the system, utilized Amazon for creating a central hosting, fixed data syncing problem, established proper data exchange as well as secure connections with virtual machines.
Our front-end implementations allowed significantly reduce the development and support time and improved the overall speed of response. In addition, the application of the ISR approach simplifies updating of static pages as well as content management process. The new system gave more understanding regarding order readiness and delivery, which in its turn reduced the load of the call center.
From a business point of view, all the modifications led to one of the major achievements of the team: structuring the entirety of the client’s data. This step adds much value to their business as now they can use this data for more advanced marketing campaigns, simpler website management processes, and, as a result, getting more new customers.
Keeping up with the pace of the food delivery industry growth is hard. Business owners across the globe are seeking the best and most flexible solutions to automate all their internal processes from ordering food to its delivery. Multiple processes are going on while you simply click a few buttons and place an order: the system processes it, asks for payment, sends it to a respective restaurant, and many more.
To make everything run smoothly, development teams put much effort and thinking so that the next time you order your food, it arrives quickly and is still warm.
READ ALSO: WHAT’S THE DIFFERENCE BETWEEN AZURE AND AWS