In an interview in 2012 co-founders of Instacart, Apoorva Mehta and Brandon Leonardo, shared how their now billion-dollar app started out. «When I started Instacart, I began writing code for the first version of the app and, when it was ready, placed the first order. Then, I went to the grocery store, picked up my groceries and delivered them to myself.»
In just a few years, Instacart has become the Uber of groceries, with “shoppers” who will buy anything from eggs to bananas and deliver them to your home in less than an hour.
The Uber-for-X Companies
In recent years, Uber-for-X companies like Instacart have been popping up for everything from in-home hair stylists to mobile bike mechanics. So what is Uber for X?
The concept is that you provide a way to connect people who need a service in one location, with someone who can provide the service and are close by. The payment is generally calculated automatically and charged to a credit card on file. Finally, each party rates their experience for other users to see.
It seems like such a simple idea. Taxi services have been doing this for years with human dispatchers. So, why didn’t anyone else apply this to phones and create an app before Uber? The truth is that some tried, but Uber was the first to integrate the Uber-for-X technology stacks which include location and routing services, cloud computing for scalability, push notifications between users, and m-commerce solutions — frictionless payments.
Their groundbreaking work with these technologies and functions paved the way for every other Uber-for-X company that has followed. Now the idea of Uber for x app development continues to attract new startups. In this article we will look deeper at the technologies that Instacart used for building its Uber-for-X wonder and what it is using today and answer the question how to build your own Uber-for-X app.
Code Development and Deployment
One of the first decisions to make before you start to build the Uber for X for mobile app, is where to actually host your code. Like most companies today, Instacart uses GitHub to host code and for revision management.
GitHub is ubiquitous in the development world because of how easy it is to share, comment on and deploy code.
Instacart opted to use a modified blue-green deployment cycle to improve stability and support rapid deployment. Rather than have two production servers and doing a hard switch for everyone once a new set of code is deployed, they maintain a small set of beta servers that the code is initially deployed to.
Along with updating, at the beginning, bug handling was easy. But, they soon realized that they would have to use something more sophisticated than yelling across the kitchen table. Github Issues may have been a logical choice, but the decision was made early that they would need a tool to allow both coders and non-coders to share ideas and have input.
While they are a high-tech company based around a single application, they are fundamentally a delivery company and most of the employees do not work directly with the code. Because of these considerations, they chose instead to use Trello and HipChat for internal communication.
Right from the beginning, Leonardo decided to develop the front-end of the initial iOS version using the Ruby on Rails framework. He used the popular dictionary server, Redis, to serve up the images. Using Redis kept the code clean and the response time snappy.
He used Backbone.js to build a single-page website, which called the backend APIs. This meant that when they developed the Android version and the consumer mobile web app, they were able to maintain a consistency of service across all platforms by calling the original APIs, without rewriting the code for each. This original framework is still in place today and lays the foundation for their solid, scalable solution.
Mehta and Leonardo expected from the very beginning that their Uber for X model would be a success. To make sure that the system would scale with their ecommerce business, they opted to use Heroku cloud services. This allowed them to focus on what they needed to do. “We didn’t have to worry about infrastructure,” Leonardo said in a 2014 interview. “We didn’t have to worry about all that, all we focused on was just coding and solving application problems.”
After seeing significant growth in their business, they became frustrated with the lack of control that Heroku offered and migrated over to Amazon Web Services (AWS). “We use a lot of Amazon technology,” said Andrew Kane, another of Instacart’s early engineers. The list of services that they have adopted reads like a list of Amazon’s complete offerings, including EC2, RDS, CloudFront, EBS and ElastiCache
Displaying the Product
The core of any Uber-for-X business is the actual product that they are offering. If you are Uber, you need a map. If you are AirBNB, you need apartments. In the case of Instacart, this meant having pictures of all the foods that they intended to sell. You might think that it would be easy to find the pictures of food online, but that proved to be more of a challenge.
We would do stupid things like buy an entire isle of stuff,” Leonardo quipped in one interview. “And then set up a photography studio in our office, take photos of everything, because that product data just doesn’t exist.”
Even with the pictures of fruit, the initial iOS service that Mehta used to make the first order was slow, cumbersome and didn’t include all of the features that is has today. When you wanted to buy bananas, for example, you simply saw an image of a bunch of bananas and a price, without any information about where they were from or even which store they were available in. On the supply side, the app couldn’t even verify if the store that they were intended to be purchased from had any in stock, or if there was a driver available to deliver them. When the order went out, it was basically sent a website link to a shopper in a store. The shoppers checked the list and tried to fill the order.
Early on, the shoppers would go into the store to buy the groceries, but once they got inside, they would find that the store is out of their brand of ketchup, or the apples look terrible that day. If the store had spotty reception, the only way to contact the customer to see if they want the apples was to leave the store where they could get a more stable mobile Internet signal. This was not only inconvenient, it was often ineffective. For example, if the customer updated their order while the shopper was inside, they wouldn’t know that they had purchased all the wrong items until it was too late.
The application now touts an internal queuing system, to handle a loss of network activity. Messages are queued and sent whenever they have a signal strong enough to punch them through. This combines with their own in-app chats, and Twilio to handle anonymous call routing between the shopper and customer gives both parties the best chance at success that they can have.
This also allows them to display a dynamic screen to the shopper and customer using Firebase for both internal dashboards and live order updating. “For example, when a shopper is picking your items, you’ll be able to go on your order screen,” explains Nick. There will be live showing like ‘found’ or ‘not found’ or whatever.
You’ll have live position updating of your shopper on the map. You will have live information of the status of the order like ‘Nicole is now picking up your order,’ and all these kind of things, so you don’t have to reload the page or pull or anything. Just live updates happen natively through the Firebase API, which is nice.”
Providing a Frictionless Experience
Keeping himself and the software engineers in touch with the practical operation of the business has remained important to Mehta.
«I go shopping weekly to experience it for myself,» he says. «And our engineering team regularly spends time in the stores with shoppers to go through the process and verify how the app will be the most effective.»
Staying as close to the front lines as possible is important to the success of the company. Their goal, after all, is not to develop a shopping app — it is to delivery groceries. Having the decision makers test every aspect of the process one step at a time is essential to making sure the decisions they are making actually improve the experience for both the shoppers and the paying customers.
As a result of this kind of thinking, Instacart has solved many typical problems that beset the average shopper. During their Uber for X application development process they included aisle navigation, so shoppers know exactly where the items are in any store, and a quick replacement feature when an item is not available. “The shoppers can access over 4 million catalog items in real time and add custom replacement items,» Mehta explains. The app even integrated barcode scanning technology, so that the shoppers can verify that the item picked is what the customer actually wants.
When it comes time to pay, Instacart also chose to go with the simplicity offered by Stripe for both marketplace payouts and credit card purchases. While they haven’t commented on why they chose Stripe, it is a logical choice. Stripe is a good ecommerce solution as it is easier to sign up for than traditional merchant accounts. Also, it has lower fees than PayPal, scales very well and the APIs are very easy to integrate.
Flexibility in growth
In the beginning, Mehta and his gang of dedicated entrepreneurs were able to handle the little issues that cropped up. When you only have a handful of customers, you can think and deal with them one at a time. When you have thousands of shoppers, servicing hundreds of thousands of customers in dozens of cities, the job becomes more difficult. Luckily the team has adapted quickly to scale with their unprecedented growth.
«There’s no one doing what we’re doing—the challenges that we are solving for, and the scale at which we’re doing so, have never been done before. As a result, we’ve had to invent the technology from scratch,» Mehta says.
How have they been able to do it? «Our team is really nimble in trying new things and adjusting the way we are currently operating.»
The Future of Instacart
Many worried when Amazon declared war by purchasing Whole Foods – a key player in Instacart’s expansion and financing strategy. But, Instacart has proven itself in the past five years to be a worthy addition to the Uber-for-X game. They have identified a niche in the marketplace and leveraged Uber for X mobile app technology to help stakeholders and focused relentlessly on quality. Markets are not bought and sold, they are earned. If Instacart continues to follow the path they are on, they are sure to continue dominating the on-demand grocery shopping niche. How do you like them apples?