Bubble Docs
  • Introduction
  • New? Start Here
  • What is Bubble?
  • The Glossary
  • User manual
    • Getting started
      • What is Bubble?
      • Building your first app
        • Planning features
        • Database structure
        • Design and UX
        • eCommerce and payments
          • Shopping cart
          • Checkout page
          • One-time payments
          • Subscriptions
          • Marketplace
      • Creating and managing apps
      • The Bubble editor
        • Tabs and sections
          • Design tab
            • The element tree
            • The property editor
          • Workflow tab
          • Data tab
          • Styles tab
          • Plugins tab
          • Settings tab
            • Application settings
              • Custom headers/body
              • Visual settings
              • Social media sharing
              • Translating your app
              • Email settings
              • Collaboration
            • Custom domain and DNS
          • Logs tab
        • Tools
          • Key features
          • The search tool
          • The Issue Checker
          • The element tree
          • The element property editor
          • The debugger
          • Notes
        • Previewing your app
      • Transitioning to Bubble from...
        • JavaScript
        • HTML and CSS
        • SQL
    • Design
      • Elements
        • The element hierarchy
          • The element tree
        • The page
        • Containers
          • Groups
          • Repeating groups
          • Table elements
          • Popups
          • Floating groups
          • Group focus
        • Visual elements
        • Input forms
          • Text and numbers
          • Dates and time
          • File uploads
          • Selection controls
        • Reusable Elements
      • Styling
        • Color variables
        • Font variables
        • Styles
        • Custom Fonts
      • Responsive design
        • Building responsive pages
        • Legacy articles
          • The Basics (Legacy)
          • Building Responsive Pages (Legacy)
          • Migrating Legacy Pages
          • Tips When Designing (Legacy)
      • Templates
      • The Component Library
      • Importing from Figma
    • Data
      • The database
        • Data types and fields
        • Creating, saving and deleting data
        • Finding data
        • Displaying data
        • Protecting data with privacy rules
        • The database editor
        • Export/import data
          • Exporting data
          • Importing data (CSV)
        • Working with location data
        • Using Algolia
        • Database structure by app type
          • Marketplace Apps
          • Directory & Listings Apps
          • Social Network Apps
          • SaaS Apps
          • Project Management Apps
          • CRM Apps
          • Professional Services Apps
          • On-demand Apps
          • Documentation/ CMS Apps
          • Applicant Tracking System (ATS) Apps
          • Portfolio Apps
          • Gallery Apps
          • Online Store / Ecommerce Apps
          • Blog Apps
          • Messaging App
          • Dashboards
          • Building Block Apps
          • Bubble as a backend
      • Files
      • Images
      • Static data
        • App texts (translations)
        • Option sets
      • Temporary data
        • Custom states
        • URL parameters
      • User accounts
        • Authentication plugins
          • Facebook plugin
          • Fitbit plugin
          • Google plugin
          • Instagram plugin
          • LinkedIn plugin
          • Pinterest plugin
          • Slack plugin
          • Wistia plugin
          • YouTube plugin
        • Cookies set by Bubble
      • Time, dates and time zones
    • Logic
      • The frontend and backend
      • Workflows
        • Events
          • Frontend events
            • Recurring workflows
            • Custom events
          • Backend events
            • Database trigger events
        • Actions
        • API Workflows
      • Dynamic expressions
      • Conditions
      • Navigation
        • Single-page applications (SPA)
        • Multi-page applications
        • Page slugs
    • Workload
      • Understanding workload
        • Activity types
        • The workload calculation
        • Client-side and server-side processing
      • Tracking workload
        • Measuring
          • Using App Metrics
        • Monitoring
          • Workload notifications
          • Infinite recursion protection
      • Optimizing workload
        • Optimization framework
        • Optimization checklist
          • Page load
          • Searches
          • Workflows and actions
          • Backend workflows
        • Agency showcases
          • Minimum Studio
          • Neam
          • Support Dept
    • Security
      • Bubble's security features
      • Planning app security
      • Client-side and server-side
      • Bubble account security
      • App security
      • Page security
      • Database security
      • API security
        • API Connector security
        • Data API security
        • Workflow API security
      • Flusk
        • Overview
        • Flusk plan features
        • Getting started with Flusk
        • Flusk security tools
          • The Issues Explorer
          • Issue details
          • Tools and settings
            • Pages rating
            • Database rating
        • Flusk FAQ
      • Cookies
      • Security checklist
    • Publishing your app
      • Web app
      • Native mobile app
        • Global native mobile settings
        • iOS App Store
        • Google Play Store
        • Publishing FAQ
    • AI
      • Generate apps with AI
        • About AI app generation
      • AI page designer
      • Connect to AI agents
    • Maintenance
      • Collaborators
      • Version control
        • Best practices: Version control
        • Transitioning from the legacy version control
        • Terminology: Version control
        • Version Control (legacy)
      • Commenting
      • Database maintenance
        • Copying the database
        • Restoring database backups
        • Bulk operations
          • Bulk operation methods compared
        • Wiping change history
      • Performance
        • Hard limits
        • Capacity Usage (legacy)
        • Notes on queries
      • SEO
        • Introduction to SEO
        • SEO: App
        • SEO: Page
      • Testing and debugging
        • Introduction to testing and debugging
        • The debugger
        • The server logs
        • Supported browsers
      • API workflow scheduler
    • Integrations
      • API
        • Introduction to APIs
          • What is a RESTful API?
        • The Bubble API
          • Bubble API terminology
          • Authentication
            • How to authenticate
            • No authentication
            • As a User
            • As an admin
          • The Data API
            • Data API Privacy Rules
            • Data API endpoints
            • Data API requests
          • The Workflow API
            • Workflow API privacy rules
            • Workflow API endpoints
            • API workflows
              • Creating API workflows
              • Scheduling API workflows
              • Recursive API workflows
              • API Workflow Scheduler
              • Case: Stripe notifications
        • The API Connector
          • Authentication
          • API Connector security
          • API guides
            • OpenAI
              • Authentication
              • Calls
                • ChatGPT
                  • Chat
            • Google Translate
              • How to setup Google API keys
          • Streaming API
        • API security
        • Plugins that connect to APIs
        • API Glossary
      • Plugins
        • What Plugins Can Do
        • Installing and using Plugins
        • Authentication plugins
        • Special Plugins
      • SQL Database Connector
      • Bubble App Connector
      • WorkOS
        • WorkOS SSO
        • WorkOS API
    • Infrastructure
      • Sub-apps
      • Bubble release tiers
      • Hosting and scaling
        • How Bubble hosting works
        • Scaling with Bubble
        • CDN (Cloudflare)
        • Bubble app names
        • Domain and DNS
      • Compliance
        • GDPR
        • SOC 2 Type II
        • HIPAA
        • Other frameworks and standards
    • Bubble for Enterprise
      • Hosting and infrastructure
        • Dedicated instance
          • The Dedicated editor experience
          • Technical specs
          • Main cluster dependencies
          • Customizable options
          • Migration process
            • Pre-migration
            • During migration
            • Post-migration
      • Security and compliance
        • Single sign-on (SSO)
        • GDPR
        • SOC 2 Type II
        • HIPAA
        • Other frameworks
        • Bubble's security features
      • Admin and collaboration
      • Priority support
      • Billing and Payment Guideline for Dedicated Instances
  • Core Reference
    • Using the core reference
    • Bubble's Interface
      • Design tab
      • Design tab (Legacy)
      • Workflow tab
      • Data tab
      • Styles tab
      • Styles tab (Legacy)
      • Plugins tab
      • Settings tab
      • Logs tab
      • Template tab
      • Toolbar
      • Top and context menu options
      • Deployment and version control
        • Deployment & Version Control Dropdown (legacy)
      • Notes
    • Elements
      • General properties
      • General properties (Legacy)
      • Styling properties
      • Styling Properties (Legacy)
      • Responsive Properties
      • Responsive Properties (Legacy)
      • Conditional formatting
      • States
      • Page Element
        • Page Element (Legacy)
      • Visual Elements
      • Containers
      • Container Layout Types
      • Containers (Legacy)
      • Input Forms
      • Reusable Elements
      • Element Templates (legacy)
    • Workflows
    • Events
      • General events
      • Element events
      • Custom events
      • Recurring event
      • Database trigger event
    • Actions
      • Account
      • Navigation
      • Data (things)
      • Email
      • Element
      • Custom
    • Data
      • Data Sources
      • Operators and comparisons
      • Search
      • Privacy
    • Styles
    • API
      • The Bubble API
        • The Data API
          • Authentication
          • Data API endpoints
          • Data API requests
        • The Workflow API
      • The API Connector
        • Authentication
        • Adding calls
    • Bubble-made Plugins
      • AddtoAny Share Buttons
      • Airtable
      • API Connector
      • Blockspring
      • Box
      • Braintree
      • Bubble App Connector
      • Chart.js
      • Circle Music Player
      • Draggable Elements
      • Dropzone
      • Facebook
      • Fitbit
      • Full Calendar
      • Google
      • Google Analytics
      • Google Optimize
      • Google Places
      • Ionic Elements
      • iTunes
      • Slidebar Menu
      • LinkedIn
      • Localize Translation
      • Mixpanel
      • Mouse & Keyboard Interactions
      • Multiselect Dropdown
      • Progress Bar
      • Rich Text Editor
      • Rich Text Editor (Legacy)
      • Screenshotlayer
      • SelectPDF
      • Slack
      • Segment
      • Slick Slideshow
      • SQL Database Connector
      • Star Rating
      • Stripe
      • Tinder-like Element
      • Twitter
      • YouTube
      • Zapier
    • Application Settings
      • App plan
      • General
      • Domain / email
      • Languages
      • SEO / metatags
      • API
      • Collaboration
      • Sub-apps
      • Versions
  • Account & Marketplace
    • Account and billing
      • Pricing and plans
        • Plans and billing
        • Billing cycle
        • FAQ: Pricing and Workload
      • Account Management
      • Building Apps for Others
      • Selling on the Marketplace
      • Plans & Billing (legacy)
    • Official Bubble Certification
      • Hiring certified developers
    • Building Plugins
      • The Plugin Editor
      • General Settings
      • Updating to Plugin API v4
      • Adding API Connections
      • Building Elements
      • Building Actions
      • Loading Data
      • Publishing and versioning
      • Github Integration
    • Building Templates
    • Application and data ownership
    • Marketplace policies
    • Bug reports
  • Vulnerability Disclosure Policy
  • Beta features
    • About the Beta features section
    • Native mobile apps 🔒
      • Introduction
        • What is a native mobile app?
        • Native mobile vs. web development
        • Differences in native and web elements
        • Native mobile app terminology
      • Building
        • Views and navigation
        • Native mobile actions
        • Components and gestures
        • Device resources
          • Location services
          • Camera/photo library
      • Previewing
      • Publishing
Powered by GitBook
On this page
  • Data types recommended
  • Place
  • Booking
  • Message
  • Option sets recommended
  • Place status
  • Amenities
  • Facilities
  • Additional notes
  • About HuggyStudio
  • Other ways to learn

Was this helpful?

  1. User manual
  2. Data
  3. The database
  4. Database structure by app type

Marketplace Apps

Last updated 1 year ago

Was this helpful?

By Daniel Abebe, co-founder of HuggyStudio

Various members of the Bubble ecosystem contributed these use case-oriented database guides. There's always more than one way to do something in Bubble, but the advice here can help you get started if you're new to Bubble!

This article covers how you may structure your database to facilitate a marketplace app. To learn more about what a marketplace app is, and how you can go about planning such an app, you may be interested in readin the article below:

Article:

Marketplaces connect multiple sellers of goods or services with buyers. Most of the time, a marketplace is created to bring more transparency into a market or make the buying process more efficient. While they can differ vastly from managed marketplaces to niche and B2B marketplaces, the standard business model is to capture value from each transaction. Famous examples include Airbnb, Amazon, Upwork, AliExpress.

In this guide, we take you through the creation of the data structure for a home rental marketplace like Airbnb.

If you are not familiar with Airbnb, here is a quick introduction into our use case with an overview of the basic functionality:

  • Airbnb is a leading online marketplace that connects people who want to rent out their homes with travelers who are looking for an accommodation.

  • Basic functionality includes:

  • For both homeowners and travelers

  • Signup / Login for homeowners and travelers

  • Edit profile information

  • For homeowners

  • Upload/edit place (Pictures, Address, Price, Description, Amenities, …)

  • Set place availability / unavailability

  • Manage bookings

  • Receive ratings

  • Messaging with travelers who booked the place

  • For travelers

  • Discover and filter places based on location, type of place, price, rating, amenities and/or facilities

  • Book a place

  • Message with the homeowner after booking the place

  • Rate place

Data types recommended

Users will upload and edit places. On the other hand, users will book and rate places. A messaging function will be possible for each booking. Places need to hold structured data so that users can easily filter places based on different criteria like price, location, type of places, …

Good to know: In our use case, bookings are immediate and do not require a confirmation by the homeowner.

User (default)

The Data Type “User” is by default already available on Bubble.io. It helps you handle user authentication. Both sides of our marketplace (homeowners AND travelers) are users. In our example, the same user can upload places and/or book a place.

Suggested fields on this type

  • email (text) - this is a built-in field, i.e. it’s already there for you

  • Modified date (date) - also a built-in field

  • Created date (date) - also a built-in field

  • Slug (text) - also a built-in field

  • First name (text)

  • Last name (text)

  • My trips (list of Bookings): Bookings made by the user (as a traveler)

  • Admin? (yes/no): this defines the users who can access the platform’s admin dashboard where you can approve new places or review the overall platform activity. For your information, this is not a standard Bubble page - this page also needs to be built.

Privacy rules for this data type

  • This User is Current User

  • View all fields (checked)

  • Find this in search (checked)

  • View attached files (checked)

  • Allow auto-binding (unchecked)

  • Everyone else

  • View all fields (unchecked)

  • First name (checked) → Our marketplace only displays the user’s first name, the last name is hidden.

  • My places (checked)

  • Find this in search (unchecked)

  • Allow auto-binding (unchecked)

Place

This Data Type is used to manage all data related to a property on our home rental marketplace. A User can upload multiple places.

Suggested fields on this type

  • Creator (User, built-in)

  • Modified date (date, built-in)

  • Created date (date, built-in)

  • Slug (text, built-in)

  • Title (text): Name of the place like “Beautiful house in the mountains”

  • Description (text): Description to get more information about the place

  • Price/night in USD (number)

  • Pictures (list of images)

  • Number of beds (number)

  • Number of guests max (number)

  • Bookings (list of Bookings): All bookings made for this place are saved back in this list to keep track of the place performance and availability. It also helps to pull all relevant data faster for the homeowner.

  • Unavailability (list of date ranges): In our use case, we assume a place is always available except if a new unavailability was added to this list. This is a more scalable approach than requiring the homeowner to enter availability each month.

Privacy rules for this data type

  • No privacy rules required as Users need all information when browsing through or searching for places. Even the Bookings should be visible so that Users can see the ratings and the actual Place Availability. Under the Data Type “Booking”, we will add Privacy Rules to make sure only public information is accessible.

  • Depending on the experience you want to offer to your Homeowners when creating/editing their place, you could create a Privacy Rule just for allowing auto-binding to homeowners. With a “Save” button, auto-binding is not necessary.

Booking

The Data Type “Booking” is used to manage all data related to a booking on our home rental marketplace. A User can make several bookings of different places over their lifetime.

Suggested fields on this type

  • Creator (User, built-in)

  • Modified date (date, built-in)

  • Created date (date, built-in)

  • Slug (text, built-in)

  • Homeowner (User): We can assume the creator of a place is the homeowner. Anyhow, by adding this “Homeowner” field, we have more flexibility when it comes to HOW a place is created. As an example, admins will be able to create a flat and simply add the rightful homeowner.

  • Booked place (Place): We connect the booking back to the place to avoid orphaned entries (a booking with no place)

  • Date range (date range): This will indicate the check-in and check-out of this trip.

  • Number of nights (number): The number of nights is already available when we extract that information from the booking date range. Anyhow, saving it as a separate value will make it easier to display or calculate total costs for example.

  • Total costs in USD (number)

  • Chat (list of Messages): A chat is as simple as a list of messages that show chronologically. As a chat is only relevant to a booking, we store this list of messages directly under the booking.

  • Rating stars (number): As a rating is connected to a single booking, we store the value directly under the booking.

  • Rating comment (text): Same as rating stars.

Privacy rules for this data type

  • This Booking’s creator is Current User OR This Booking’s Homeowner is Current User

  • View all fields (checked)

  • Find this in search (checked)

  • View attached files (checked)

  • Allow auto-binding (unchecked)

  • Everyone else

  • View all fields (unchecked)

  • Creator (checked)

  • Date range (checked)

  • Rating starts (checked)

  • Rating comment (checked)

  • Find this in search (unchecked)

  • Allow auto-binding (unchecked)

Message

The Data Type “Message” is used to store text messages sent between users. A message doesn’t need to hold much information besides its content as it is stored in a list of messages under the booking already. This booking holds all relevant information like users in the chat, the booking dates and the specific place this chat is about.

Suggested fields on this type

  • Creator (User, built-in)

  • Modified date (date, built-in)

  • Created date (date, built-in)

  • Slug (text, built-in)

  • Text message (text)

  • Booking chat (Booking): We link this message back to the booking to avoid orphaned messages (a message saved in the database with no link to a booking chat). This also makes it possible to create privacy rules linking back to the booking.

Privacy rules for this data type:

  • This Message’s creator is Current User OR This Message’s Booking’s Homeowner is Current User

  • View all fields (checked)

  • Find this in search (checked)

  • View attached files (checked)

  • Allow auto-binding (unchecked)

  • Everyone else

  • No permission

Option sets recommended

Type of place

  • Entire place

  • Private room

  • Shared room

  • Hotel room

“Type of place” is a classic example of an option set. We use options to store different predefined types. Those types rarely change and users are not asked to create new types.

Good to know: We can also use a standard Data Type for “Type of place”. The rule of thumb is that if users do not have to create entries themselves, an option set is a better choice as it improves the app performance.

Place status

  • In review

  • Approved

  • Rejected

Similar to a “Type of place”, a “Place status” is another good example of an option set. We use options to store different predefined statuses. Those statuses rarely change and users are not asked to create new statuses.

Amenities

  • Wifi

  • Heating

  • TV

  • Air conditioning

  • Indoor fireplace

  • Washer

  • …

We use option sets to standardize the amenities. Users should not be able to enter free text and create new amenities. This helps avoid fantasy amenities or duplicates. It also makes filtering places easier.

Facilities

  • Free parking

  • Gym

  • Pool

  • Hot tub

Similar to amenities, we use option sets to standardize the facilities. Users should not be able to enter free text and create new facilities. This helps avoid fantasy facilities or duplicates. It also makes filtering places easier.

Additional notes

When naming your options sets, data types and fields, we recommend using simple terms you will remember over time. Also, avoid repetition in your names as it will make it difficult to work efficiently when building your workflows. Finally, keep in mind that working with data is an ongoing process. Start small, adjust when necessary and improve as your product grows in terms of users and/or complexity.

About HuggyStudio

Other ways to learn

Articles
Core reference:
External documentation

My places (list of Places): Places uploaded by the user for rent; see on linking data types

We believe entrepreneurship is about positive change, not code. HuggyStudio helps entrepreneurs and intrapreneurs validate their ideas. We specialize in building new product ideas into functional MVP through our and our .

- this article covers the process of understanding and planning marketplace apps, as well as how to set up the sellers and payouts using .

- list of all Stripe plugin features

Marketplace
this article
no-code education platform
no-code agency
Marketplace
Stripe plugin
Stripe Docs
Stripe Connect