Banabi – How we developed a new grocery ordering app within three months05 July 2019
Banabi is a grocery shopping feature within the Yemeksepeti application that allows users to order more than 2,000 market products and deliver their orders within 15 minutes, with the use of dark stores, along with any other food orders – saving them the time and effort of grocery shopping, cooking and preparing food. Read more about our journey and how we developed this app within three months.
Hi, my name is Özgür Kara and I’m working as a Software Architect at Yemeksepeti, an online food ordering company based in Turkey and in Cyprus. Yemeksepeti is the first and the strongest online food ordering app in Turkey, with more than 20 thousand restaurants in 69 cities!
As a software architect, my team and I have been responsible for constructing and implementing new features into our current food ordering app, Yemeksepeti, which we called Banabi – allowing us to explore the new vertical of grocery deliveries.
In order to efficiently carry out this new feature, we are very excited to present the concept of ‘dark stores.’ For those of you who are not yet familiar with this concept: dark stores are similar to your conventional supermarket, containing groceries and other items.
However, not open to the public, these stores are located in areas that are preferred for good road connections, enabling our riders to efficiently pick up other items, such as groceries, that were ordered along with lets say a conventional food order.
The Banabi project has been released for iOS and Android and is currently being developed for desktop. In this article, I will take you through our journey and go over the various methods we used to bring Banabi live.
How did we start?
We were introduced to the idea during one of our kick-off meetings, where we received the first bits of information regarding the project. To our surprise, we learned that we only had three months to complete the project, before going live.
We had built an asynchronous microservices architecture for Yemeksepeti before the Banabi project.
Our initial thoughts were that we could use a similar structure to the current architecture we were using for our Yemeksepeti application already due to the limited time we had.
The only issue with this was that at the time, Yemeksepeti was currently in the process of being re-coded, meaning it would not be up to date. The idea of building the Banabi project on the outdated Yemeksepeti system did not make sense to our development team and we figured Banabi should be its own independent project with it’s own features, requirements, code quality standards and time estimation.
What was the game plan?
As the Platform team, we distributed the different services amongst us. So, we created nine different services we started working on, these include:
1- Order API
2- Basket API
3- Marketing API
4- Product API
5- User API
6- Internal API
7- Manager API
8- Admin API
9- Cron API
In order to better keep track of our progress, we created the following five categories as ‘definitions of done’ to align on when the development of each service was completed.
- The test coverage of each service must be greater than 90%.
- The completed development must be sent to SonarQube, where it is tested for various bugs and its vulnerability.
- At least two developers have to review the code for all pull requests.
- The development should be in accordance with the standards of the example project.
- API requests should have maximum latency of 100 ms without cache.
Which tools did we use?
Despite only having had a limited amount of time to develop our new software, we still wanted to use various popular technologies and tools to make sure we did it right from the start.
In the following, I’ll explain briefly which technologies, software and tools we used and why.
.NET Core & Golang: All services are developed with .NET Core Web API. We were really satisfied with the performance of .NET Core. So, we decided to develop with restful standards. It reduced our job of writing documentation for the API to create a particular URL. We decided to develop the image-resizer project in Golang. Using AWS Lambda, S3 and Go we were able to avoid problems and major headaches.
Fluent Validation: Having already employed Fluent Validation in previous .NET Core projects successfully, we decided to use this framework again.
AutoMapper: We decided to use AutoMapper in more than five different property matches, since it’s a simple reusable component which helps you to copy data from object types.
MediatR: A very successful and popular framework, our developers pushed the SOLID principle which gave us better quality and more time to complete the project.
Swagger/OpenAPI: A very popular specification to speed up integrating with an API. Our mobile developers were able to quickly and easily execute their implementations by using Swagger.
Serilog: It’s a great portable and structured logging framework that helped us to integrate many log libraries.
Hangfire: We have been happy to use Hangfire because it simplified our background processes.
XUnit: Even though we had never used xUnit before, everyone adapted to it and it increased and facilitated unit testing speed through some of its features.
Redis: As an in-memory data structure project, it was our first choice and using it was a no brainer for us.
What have we accomplished?
In order to be able to publish the project three months later, we had to complete the services as a backend team in two and a half months, which we successfully achieved. In addition to that we consistently maintained our code development standards and quality throughout the process and the performance of our API’s ran smoothly. In the end, all services were published with only a few minor bugs. Since we were a newly created team, our biggest achievement was to produce the product within the given time frame, allowing us to grow together as a new team.
Despite our test coverage goal of at least 90%, we had to lower our expectations for some projects in which we only reached 80%. Moreover, we were not able to reserve enough time for testing. If we would have had an additional two months for the implementation of the project, we would have implemented further load and integration testing and improved the code quality.
We are thrilled to announce that Banabi is now up and running. The project is running successfully in Istanbul and continues to work exponentially with the number of orders each new day. With the growth we are experiencing, we soon plan to expand this service to additional cities in Turkey.
Despite all the hard work and time pressure, it was a very rewarding and exciting project to be a part of. We are looking forward to see our project grow and expand around the globe.
I’d like to thank my team for making this possible in the short amount of time we had as well as a special thanks to Baran Uluerler, Erik Shemanski, Gökcan Güldoğuş, Gözde Berberoğlu Özen, Ilgıt Aslanyürek, and Lisa Klostermann!