How to build a marketplace app
In this article, Sharetribe’s senior full-stack developer Mikko takes you through the steps of developing an online marketplace app. From building the backend with essential features to designing and creating a web or mobile app.
Table of Contents
- Introduction: marketplaces & app development
- Full list features your marketplace app needs
- How to develop a marketplace app from scratch
- Choose your marketplace tech stack
- Set up the marketplace app framework and database
- Design the database schema
- Implement user accounts
- Implement a basic listing search
- Design and model the initial transaction process
- Implement reviews
- Implement availability management
- Build your admin UI
- About building your marketplace UI
- Code a marketplace app 90% faster with Sharetribe Flex
- Marketplace web app development with Flex
- Marketplace mobile app development with Flex
- Examples of Sharetribe-powered marketplace apps
- Conclusion: Don’t build a marketplace app from scratch
Introduction: marketplaces & app development
Marketplace apps offer tremendous opportunities for the eCommerce entrepreneur.
Right now is a great time to build a marketplace app. Globally, a total of $2.67 trillion was spent on the top 100 online marketplaces in 2020. By 2024, marketplace sales are set to exceed $7 trillion.
One reason why online marketplaces are so popular lies in the opportunities of the marketplace model. Marketplaces require no initial inventory, can be built for virtually any market and niche and can grow exponentially through network effects.
Right now is a great time to build a marketplace app.
At the same time, consumers continue to spend more and more time on their mobile devices each year. In 2020, the average was over 3 hours every day. In 2019, mobile traffic already accounted for over 65% of the total traffic to eCommerce sites.
What is a marketplace?
A marketplace makes money by bringing buyers and sellers together and facilitating their transactions.
Marketplaces can work in virtually any niche, and the main offering can be anything from rentals to services to product-selling. Airbnb, Amazon, Etsy, Uber, and Upwork are all examples of successful marketplaces. For more marketplace ideas inspiration, our customer gallery and stories are a great destination.
Marketplace types to consider in marketplace app development
Marketplaces can be divided into types based on a few criteria. Let’s look at the main types from the point of view of marketplace app development.
Marketplace offering type. What your providers sell impacts the features your app needs. Product marketplaces (like Etsy or eBay) probably need inventory management, and a shipping integration. A marketplace that offers rentals (like Airbnb) or services (like Fiverr) needs to have a booking calendar, location search, and user profiles (but has no use for a shopping cart or shipping). On-demand marketplaces (like Uber) need a powerful map that shows the real-time location of service providers.
Audience type. Different audiences have different needs. Peer-to-peer marketplace users appreciate complete user profiles, two-sided reviews, and smooth, secure payments. On B2C marketplaces, you need features that help your professional sellers manage their business. B2B marketplaces usually have complicated transaction flows and need even more custom functionality.
Booking flow type. How you design your marketplace booking flow has a big impact on the features your app will need. Do customers search for providers, or do the customers post jobs and providers bid on them? Are prices fixed or negotiated? Are bookings scheduled or happen on-demand? One way to understand booking flow types is to look at how different marketplaces relate to pricing, location, and booking schedule.
This step is important to consider carefully because building the transaction flow will take a big part of your development time. This is where using Sharetribe Flex can make a difference: it offers a pre-built yet fully customizable transaction engine.
In addition to the categories above, there are many other ways to distinguish marketplace type such as by horizontal/vertical focus, by business model, or by management approach. These distinctions affect how you build individual features, but not the fundamentals of your marketplace. So, I’ll leave them out of the discussion and move on to outlining the building blocks of a marketplace app.
Marketplace app building blocks
Your marketplace app will consist of three fundamental components.
The marketplace backend. The backend is your marketplace’s beating heart. It’s where user-generated data is stored in a database and where your transaction engine with all user functionality lives. In chapter 2 of this article, I’ll list all the essential features your backend should power and outline the general project flow of building a marketplace app from scratch.
The marketplace backend is your marketplace's beating heart.
The Admin UI. Think of your admin UI as something between your marketplace backend and your user interface. It reports all your marketplace activity and lets you monitor and manage users, notifications, messages, transactions, and reviews. The admin features need to be built in the backend, and they’ll need a graphical user interface, too.
The User Interface. The UI is the branded and beautifully designed website or mobile app that your users interact with. You need different sections and features for sellers and customers, listing pages, user profiles, and content pages. The User Interface can be a web application (used through the browser with a desktop, tablet, or phone) or a native mobile application (downloaded through an app store).
In Sharetribe Flex, we essentially offer you the first two (fully-featured marketplace backend and a powerful admin console) out of the box. We also offer a customizable website template to speed up UI development, but you can also build a completely custom user interface for web or mobile.
Full list features your marketplace app needs
The minimum requirements for competitive marketplace platforms in 2021.
Let’s look at a list of features every marketplace app needs. What is “essential” will, of course, depend on your unique marketplace idea. And I do recommend taking the MVP approach and cutting back on features for the first version.
Working with marketplace platform development for nearly a decade, I’ve found this list to be a pretty common starting point. The features are divided under subheadings for easier scanning.
Account & user profile management
- Sign in
- Email integration
- Verify email
- Forgot password
- Change email
- Ban account
- Delete account
- Social logins (Facebook, Google, Twitter, LinkedIn, Github, etc.)
- User profiles (First name, last name, bio)
- Additional profile information
- Upload profile picture
On a marketplace, both sellers and buyers typically have accounts and user profiles. So, you’ll need a standard sign-up and profile creation flow for both user groups. You’ll also need to store the account info in a way that is secure and compliant with local legal requirements.
- Basic listing information: title, description, price
- Additional fields
- Update and delete listings
- Close listings
- Draft listings
- Listing approval
- Upload listing images
- Listing geolocation
- Pricing information
- Listing variations
Listings are, essentially, the product that your marketplace offers. You’ll want them to be informative, appealing, and complete so you can maximize conversions.
Site search & discoverability
- Location search
- Location auto-complete
- Listing categories
- Filtered search
- Keyword search
- Availability search
If marketplace customers won’t find what they’re looking for on your marketplace, none of your other features really matters. Here’s a thorough article that might help you design your marketplace discovery.
- On-site messaging tools
- Notifications (email integration/SMS integration/push notifications)
- Pricing options (fixed/dynamic/seasonal/negotiation, add-ons)
- Cancellation policies
- Automatic expiration
- Charging a commission
- Delayed payouts and refund management
- Reviews after transaction
- PDF receipts
Instead of designing and implementing just one type of process, I strongly recommend building a “transaction engine” where multiple different versions of your transaction process can progress at the same time. More on that in chapter 3.7.
Designing a transaction flow means defining the stages of user interaction (e.g. making a booking request, accepting it, and leaving a review) and transaction outcomes (e.g. successful, rejected, or cancelled).
- Choose a payment gateway with support for the geographies, payment methods, and currencies you need
- Build an integration with the help of Redirect URLs and Return URLs, Webhooks, or API access.
- Seller-onboarding flow that fulfills Know Your Customer (KYC) requirements
- Authorize and capture payments
- Handle 3D Security / Strong Customer Authentication
- Delayed payout
- Split payment between the seller and the marketplace
Marketplace payments are subject to all kinds of regulation that traditional eCommerce avoids. With eCommerce, there's only one entity that receives payouts: the shop owner. On a marketplace, all the sellers receive payouts.
In the world of online payments, paying money is easy, but payouts are hard. Payouts are subject to all kinds of regulation, anti-money-laundering legislation, and fraud-prevention measures. Global payouts are especially challenging. To make things even more complicated, most marketplaces also need to split every payment from a customer. One part of that payment goes to the seller as a payout, and another to the marketplace as the service fee.
Booking & availability management
- Booking calendar for buyers
- Availability management calendar for sellers
- Support for different time zones
- Handle Daylight Savings changes etc.
- Stock management
- Ability to filter search by availability
The marketplace with the best-quality supply is the marketplace that wins over the customers. To make your marketplace defensible against competitors, give your sellers powerful features to manage their offering.
- Intuitive Admin UI
- User search
- User account status
- User management
- Managing products or services that are being sold
- Access to all user-generated content
- Access to messages
- Ability to manage transactions
- Notification management
- And more.
On the best marketplaces, the admin console is almost like an app of its own. Your admin features help you manage activity, learn about your users, and identify improvement areas where you can boost conversion, transaction quality, and retention.
Marketing & communications
- Email integration
The exact marketing and communications features you need will depend on your marketplace idea and audience.
Hosting, monitoring, security
- Hosting (e.g. AWS or Heroku)
- Performance monitoring
- Error tracking
- Alerting when the app is unavailable / performing slowly
- Audit logs
- Security and privacy
- Scalable data storage
- Auto-scaling (or at least ability to manually scale your infrastructure in case of traffic spikes)
On a marketplace that reaches a meaningful scale, maintenance work is daily. Sooner or later, you’ll need a full-time DevOps person to manage your architecture and maintain and update configurations and integrations. You’ll also need a robust security and performance monitoring system in place. If something goes wrong at 2 AM, someone needs to get an alert, get up, and handle the situation.
You’ll also need an infrastructure with auto-scaling support, or at least the ability to manually scale up your servers quickly in the case of traffic spikes. If your marketplace goes viral but your site is unavailable because your servers can't handle the load, you might miss a once-in-a-lifetime chance.
How to develop a marketplace app from scratch
Or, rather: What you should consider when you’re scoping the project of creating a custom-coded marketplace app.
Marketplaces are complicated websites. Developing your marketplace app is a big undertaking if done from scratch.
This article won’t give you a full practical tutorial on how to move the development project forward step by step – that would take a book. Instead, my goal is to help you plan your project in terms of time, tech stack and development skills
Choose your marketplace tech stack
Choose a framework. It's a good idea to use a web development framework. There are lots of boilerplate features you need to build for your marketplace backend that the frameworks handle for you, including:
- Authentication and web security
- HTTP request/response handling
- HTTP request validation
- Database connection management and data migrations
- Background job processing
- Error handling
Choose the main database. A relational SQL database is a safe choice. The frameworks tend to have good support for SQL databases out of the box. Choose e.g. PostgreSQL or MySQL. It's also good to check if your hosting provider has any preferences. For example, Heroku prefers PostgreSQL.
Any language that is suited for website development works with building the backend of your marketplace. Pick your poison!
Choose the search engine. You’ll probably need an advanced search for your marketplace, so using a search engine might make sense. Elasticsearch is great, that's what we use for Sharetribe Flex. But do check what your database is capable of. For example, PostgreSQL has support for full text search and support for extensions such as PostGIS that add support for location-based queries. Even if you start without a search engine, it may be that you need to introduce one at some point.
Choose a fast in-memory key-value store. In addition to your main database, you may need to use a fast in-memory key-value store for caching and storing data that doesn't really belong to your main database: authentication tokens, background job work queues, and so on. Redis is a popular in-memory data store for this purpose. We use it with Sharetribe Flex.
Choose an email sending service. You will probably want to use a dedicated email service to to deliver emails reliably – ie. prevent them from landing in your users’ spam folder. Choose between SendGrid (our choice for Flex), Mailgun, or Amazon SES, for example.
Set up the marketplace app framework and database
Start by building the skeleton of your marketplace application. Follow the instructions of your chosen framework to install and configure the framework for your marketplace project.
Next, install your database. Finally, set up a framework for automated tests so that it's ready to be used when you start building actual features.
Design the database schema
Time to think about your marketplace data architecture. How will information be stored, searched, accessed, and displayed?
In reality, designing the database schema isn’t a step in the process that can be done beforehand. Instead, this is something you’ll need to take into account with every new feature that you add.
However, in the beginning, it's good to design how to model the most essential entities of a marketplace and store them in the database. In the case of marketplaces, the most essential entities are users, listings, and transactions.
Implement user accounts
Build a user account management with sign-up, login, and password reset capabilities.
There are some SaaS services like Auth0 that offer account management. However, the cost may be an obstacle – a Developer plan for 5,000 Monthly Active Users costs 114$ per month.
Implement listing management
Build the backend functionality for how providers add listings. What information they need to fill in? Can they customize the listing page by adding additional data fields? How do they define the listing availability?
Implement a basic listing search
What are the key criteria your customers will use to search for relevant listings? Building a great discovery flow isn’t easy, so I suggest you start with the basics. For example, for a marketplace like Airbnb, searching listings based on location, and capacity (number of beds) is critical. Availability search is great, but pretty difficult to implement, so I recommend scoping that out from the first version.
Later, as you learn more about how your users interact with your marketplace, you can improve the search. For example by adding an availability search and keyword search.
3.7. Design and model the initial transaction process
Take a moment to design your marketplace's initial transaction process. Answer questions like:
- What are the steps the customers and providers go through?
- When does the payment happen?
- Do the providers confirm customers' requests, or does this happen automatically (a so-called "instant book" process).
- How about declined requests and disputes?
- What if the provider doesn't reply? When does the transaction expire?
- Do you plan to add a review feature? At what point of the transaction can the customer and provider review each other? Will the review by one party be published to the other party before the other party has reviewed them?
- At which points in the transaction process do you want to send automatic notifications?
- What do you do if a payment fails, or if the payout to the seller fails? Both of these can occur sometimes for various reasons: banks might decline credit cards, a third-party payment system integration may have hiccups, there might be a bug in your code that causes you to calculate your commission wrong, and so on.
Then, plan how you’ll model the transaction process in your database. How do you ensure consistency and move only valid transitions from transaction state to another state? For example, you can’t move a transaction from state `requested-by-customer` to state `waiting-for-provider-to-deliver` without first going through the state `customer-paid`, right?
A State machine library like Xstate can be quite useful here. And again I can’t stop myself from recommending the Flex documentation for the transaction process – I think you’ll find a few ideas worth stealing for your marketplace there.
An important point worth repeating: Plan how to model the transaction process so that it allows changes.
As your marketplace gets more and more users and transactions, you’re guaranteed to get more ideas for your transaction process. For example, you might first implement your transaction process so that the money is paid out to the provider right after the booking ends (in case of rental or service marketplace). Later, you might notice that it takes some time for a customer to file a dispute if they’re unhappy. So, you decide to add a new step for customers to mark the transaction completed before the money is paid out to the provider.
Important: Plan how to model the transaction process so that it allows changes.
If you're building a mobile application, the ability to have multiple transaction versions running together becomes even more important. Consider the earlier example asking customers to mark the transaction completed. That's a change that needs a new UI component, a "Mark as completed" button.
For web applications, you can just add the new button and deploy the changes. But for mobile apps, you need to publish a new version to the app store and wait for your users to update their apps. For a while, you will have users with two different versions: the old version without the "Mark as completed" button, and the new version with the button. Existing transactions need to be able to go through even with the old version.
So, one more time for the people in the back: Future-proof your marketplace by building your transaction engine in a way that supports iteration and updates. In other words, make sure that old processes and new versions can coexist for as long as transactions that were initiated in the old version are ongoing.
Do customers only review the providers, or do providers also review the sellers? At what point in the transaction? Are the reviews given in stars or ratings, or is there a text field? Do you also ask for a review that won’t be published for users but only used to monitor and improve your marketplace? And so on. Design a review feature that helps you add trust and social proof to your marketplace.
Implement availability management
Build a booking calendar or stock management system for your providers. The purpose of availability management is to
- Prevent double-bookings by blocking the availability the moment a customer makes a booking.
- Help customers search the offering based on availability.
- Help providers run their listings easily – this is a value proposition that locks your providers in to your platform.
Depending on your marketplace type, availability management will be based on time, day, or stock. If time-based, remember to account for time zones and changes due to Daylight Saving Time.
Build your admin UI
What parts of your marketplace activity do you need to monitor? How do you control user accounts and user access? How do you moderate user-generated content?
On successful, large-scale marketplaces, the Admin UI is a powerful web application in itself. In the early stages, you can start with the basics and improve the admin UI as your marketplace grows and the admin workload increases.
About building your marketplace UI
All the functionality you build for your marketplace app backend will naturally need the corresponding UI components your users will interact with.
If you’re building your backend to be used through an API, you might build the backend features first before working on the frontend. But far more often — and definitely if you’re building the front end and the backend using the same framework, like Rails — it makes sense to build them simultaneously through an iterative process.
Build your back end and front end simultaneously through an iterative process.
Working on both the frontend and the backend at the same time will help you cut work into meaningful parts and keep motivated as you see your marketplace slowly coming to life.
More importantly, building the frontend for your features will give you important feedback about how to design the features under the hood. I speak from experience. Many times, we’ve improved the functionality of a Flex backend feature thanks to something we’ve figured out while building the UI for that feature for Flex Template for Web.
Ready to launch!
At this point, you’re probably about 6-12 into your marketplace project (depending on the size of your team, of course). It’s go time.
The final remaining steps are setting up hosting for your backend and frontend. And make sure you have sufficient monitoring, error tracking, and logging in place – you’ll thank yourself later.
Buy a domain, point your DNS to your site, and go live. Congratulations – you’re the owner and operator of an online marketplace business.
Speaking of launch, this is a step where the line between what is marketing and what is product development is blurry. Here’s an article with some advice about planning and executing a product launch and a marketing launch.
Code a marketplace app 90% faster with Sharetribe Flex
Our goal with developing Sharetribe Flex is to make building a marketplace app 90% faster than building from scratch. (And 90% cheaper than if you’d outsource that development.)
The features I listed in the previous chapter are marketplace essentials. But as you can see from the building process I outlined, coding all of them from scratch would take several months to build from one full-time developer. The return on that investment would be, to a large degree, a set of powerful but basic features that users nowadays take for granted.
Invest your time on on crafting a killer UI, building custom features, or acquiring users.
In my experience, that time would be much wiser to spend on crafting a killer UI or building one or two custom features that make your marketplace stand out. Or just on plain marketing and user acquisition.
Flex offers you all of the features I listed off the shelf. A fully customizable transaction engine, secure online payments, a powerful admin console, and more. You only need to build the UI – your web or mobile app – to take all the features into use.
You can also freely develop unique features or third-party integrations on top of the essentials, thanks to Flex’s set of APIs. It’s a developers first kind of tool – we’ve put in a lot of attention to make Flex a joy to work with. You can kick the tires and start developing for free here.
One more thing before I conclude this promotional bit. Flex also offers two different website templates (which you can check out in Github) to also speed up the UI development side. I’ll introduce those next as I go through the steps of developing a marketplace app (in web and mobile) with Flex.
Marketplace web app development with Flex
How the process for building a marketplace web app looks with Sharetribe Flex.
Let’s assume, for the sake of the rest of this article, that my subtle marketing message got you convinced and you decided to build your marketplace app with Flex. Here’s how that process would go down for the web application. Jump to chapter 5 to see the process for mobile app development
Choose your tech stack
Sharetribe Flex offers you a full-blown marketplace backend API and an Admin Console, so you only need to build the website front-end. The first step in choosing your tech stack, then is creating a free Flex account.
If you prefer to build the front-end from scratch, you can definitely do so in any language you want. You can build the front-end with languages such as PHP or Ruby. Flex provides a JSON HTTP API which can be called from any language.
Everything else – database, email, search, backend-hosting, etc. – are included in Flex, so you’re all set to start customizing the user-facing side of your marketplace!
Choose a template
- Flex Template for Web for daily bookings (ftw-daily) is ideal for day-based bookings like accommodation.
- Flex Template for Web for hourly bookings (ftw-hourly) is for time-based bookings, such as yoga classes.
The foundational code of the templates is pretty much the same, but there are a few critical differences in the components. For example, ftw-hourly contains components to pick a certain time-slot within a day, whereas ftw-daily contains only a day picker.
The templates are built using modern and wide-spread web-technologies, such as React, Redux, CSS Modules, Webpack, and so on. If you are familiar with these technologies, you should be able to familiarize yourself with the code base rather quickly. Here are some more details about estimating the level of difficulty of working with Flex.
Set up your development environment
The first thing to do is to set up a development environment locally. To do so, go to your Console where you got access when you created your Flex account. Follow the step-by-step instructions on the Console front page.
If you have any issues, you can always contact our support team or join our community Slack channel.
All done? You have your development environment up and running! So, at this stage, you have officially completed steps 1–12 in chapter 3.
Start customizing your marketplace app
Follow the steps in this tutorial to start customizing your marketplace app to your liking. The branding, the data storage, and the transaction process. There’s also a handy customization checklist that goes through the essentials.
Depending on the level of customization your idea needs, this step usually takes marketplace developers from a few weeks to two to three months.
Time to launch your business. Buy a domain and hosting for your frontend, for example from Heroku. Get a subscription for Sharetribe Flex. You’re set! 🎉
No need to worry about anything else – your Flex subscription includes hosting for your backend, and we’ll also monitor errors and traffic spikes on your behalf. You can focus on running your business, building new things, and implementing new features we build for Flex on the regular (check out our past releases and our roadmap if you’re interested).
Marketplace mobile app development with Flex
How to develop a mobile marketplace app on top of the Sharetribe Flex backend.
Mobile apps are developed with different languages than web backends. It’s pretty rare to find a full-stack developer who’d be capable of building both the mobile app and its backend. More often, the founding team consists of two developers: a backend developer and a mobile app developer.
This is where Sharetribe Flex can help – if you’re a mobile app developer, you can build a powerful mobile marketplace app and connect it to the Flex backend with Flex’s Marketplace API – without ever touching the backend code.
5.1. Design the app
Currently, Sharetribe Flex doesn’t offer a template for a mobile application. That means there’s a bit more work to do, but luckily there are some shortcuts as well.
First, you need a design for your mobile application. Flex Templates for Web are responsive and work great with mobile browsers, so take a look at the mobile views in our marketplace web app design files. Copy as much as you like!
The design files are a great starting point because using them, you’ll know for sure what kinds of features the backend supports out of the box. The design files are built with Sketch, but you could use other design apps like Whimsical or Figma just as well.
Build the marketplace UI for iOS or Android
At this stage, you’ll need to decide which platforms you’re going to target. iOS? Android? Both? Something else? This is an important business decision where research into your target audience and their preferences helps.
Your choice of platform will impact your choice of tech stack.
For iOS, common technologies include
You’ll find lots of instructions and tips in Apple’s developer documentation.
For Android, the commonly used languages are
For Android, too, there’s comprehensive developer documentation available.
Integrate the Flex backend
Integrating your mobile app with the Flex backend is as easy as calling any JSON HTTP API.
First, go to your Console and create a Client ID (instructions here). Use your Client ID to call the Flex API. That’s literally it – the features you built the UI for are now powered by the Flex backend.
Submit to store
You’ve tested your app and are happy with the first version of your marketplace. Time to make it public for your chosen audience!
Submitting a new app to an app store has specific guidelines depending on the platform. Here are the guidelines for iOS (App Store) and Android (Google Play Store). It may take anything from a few hours to several days for your app to be approved. Why not build a nice web landing page and a blog for your app and set up tracking in the meantime? Here are a few useful articles for how to track your key metrics and grow your marketplace.
Examples of Sharetribe-powered marketplace apps
Girls trade is a community of 60,000+ women who hire, buy and sell preloved fashion.
Conclusion: Don’t build a marketplace app from scratch
Spend your time and focus where they count.
The most important resource an early-stage entrepreneur has is their time and focus. Your competitive advantage comes from how you spend yours.
Building and maintaining the essential marketplace features is a huge investment with a poor return. The work is time-consuming, complicated, and sometimes extremely boring. The bulk of your budget will go to coding, debugging, and maintaining the marketplace basics, when you could instead invest it in building unique features none of your competitors have.
What Sharetribe Flex offers is a chance to spend your time and focus where they count. Skip the heavy lifting, launch your app 90% faster, and build things that help you differentiate and grow your business.
And if you ever get stuck, me and my colleagues are available through Sharetribe’s support and our Flex developer Slack community that you can access through your Console.
Let’s get started.