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
  • User (default)
  • Experience
  • Post
  • Comment
  • Activity
  • Notification
  • Chat
  • Message
  • Invitation
  • Option sets recommended
  • Additional notes
  • About HuggyStudio

Was this helpful?

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

Social Network Apps

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!

Social Networks serve the main purpose of connecting people or businesses together. Most of the time, they are built to scale and have a business model focused on ad revenues. Their form and target audience can vary greatly. Famous examples include Facebook, Instagram, TikTok, Linkedin.

In this guide, we take you through the creation of the data structure for a social network like LinkedIn called “NoCodeLinkedin”. Good to know: NoCodeLinkedin is a real use case built on Bubble.io that you can check out here: https://nocodelinkedin.com/.

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

  • LinkedIn is the world’s largest professional network. LinkedIn helps professionals find talent, job opportunities, stay in touch with their contacts and extend their network.

  • Basic functionality includes:

  • Sign up / Log in

  • Edit profile (Name, Bio, Headline, Experience)

  • Connection requests (Send, accept, ignore)

  • Create a new post

  • React to a post (Like, Celebrate, Support, …)

  • Comment on a post

  • Private chats

  • Notifications

Data types recommended

After signing up, users will edit their profile and start sending connection requests. Later on, users will create posts and will scroll through the latest activity of his/her network. Last but not least, the user will also react and comment on other users’ posts. The data structure we are creating needs to take all of these actions into account.

User (default)

The Data Type “User” is by default already available on any Bubble app. It helps you handle user authentication. As a rule of thumb, if someone needs to signup/login to your platform, this person is considered to be a User. In our case, all NoCodeLinkedin profiles are actual Users.

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

  • First name (text)

  • Last name (text)

  • Profile picture (image)

  • Headline (text)

  • Bio (text)

  • Invitations (list of invitations): Connection requests received

  • Chats (list of chats): Actual chats that this specific user has with other users

  • Notifications (list of notifications): Notifications received about relevant activities

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)

  • Last name (checked)

  • Profile picture (checked)

  • Headline (checked)

  • Bio (checked)

  • Experiences (checked)

  • Find this in search (checked)

  • Allow auto-binding (unchecked)

Experience

The Data Type “Experience” is used to store working experience on a user profile; each record is a separate past work experience for a given user.

Suggested fields on this type

  • Creator (User, built-in)

  • Modified date (date, built-in)

  • Created date (date, built-in)

  • Slug (text, built-in)

  • Company (text): In the real LinkedIn, this would be another Data Type that holds all information about the company

  • Company Logo (image)

  • Current position? (yes/no): When this is true, the job experience will need no end date

  • Job title (text)

  • Description (text)

  • Location (geographic address)

  • Start date (date)

  • End date (date)

Privacy rules for this data type

  • No privacy rules → All Working Experiences are visible to all users when looking at a profile. If you want to be restrictive, you could add a Privacy Rules to make it only visible to Logged in Users.

Post

The data type Post holds all the information about a user post. Note, a user can add an image to a post.

Suggested fields on this type

  • Creator (User, built-in)

  • Modified date (date, built-in)

  • Created date (date, built-in)

  • Slug (text, built-in)

  • Text (text)

  • Image (image)

  • Comments (list of Comments): Comments made under this specific post

  • Reactions (list of Reactions): Reactions on this specific post

  • Activities (list of Activities): This is a combined list of all comments and reactions made on this specific post

  • Tagged users (list of User): Users that are tagged on this post

Privacy rules for this data type

  • No privacy rules → All Posts are visible to all users. They don’t necessarily show on the user's feed but they should be accessible to all.

Comment

The data type “Comment” holds all the information about a user comment.

Suggested fields on this type

  • Creator (User, built-in)

  • Modified date (date, built-in)

  • Created date (date, built-in)

  • Slug (text, built-in)

  • Text (text)

  • Post (post): We link this Comment back to the Post to avoid orphaned comments (a comment saved in the database with no link to a post).

  • Likes (list of Users): We can show the number of Likes by simply showing the count of Users in this list.

Privacy rules for this data type

  • No privacy rules → All Comments are visible to all users when looking at a Post (likes, comments, …)

Activity

The data type “Activity” holds all the information about a post reaction (incl. comment).

Suggested fields on this type

  • Creator (User, built-in)

  • Modified date (date, built-in)

  • Created date (date, built-in)

  • Slug (text, built-in)

  • Activity Type (Activity Option Set): There are different types of “Activity Type” that we can pick from in our Option Sets.

  • Post (post): We link this Activity back to the Post to avoid orphaned Activities (an Activity saved in the database with no link to a post).

  • Reaction Type (Reaction Option Set): There are different types of “Reaction Type” that we can pick from in our Option Sets.

  • Comment (Comment): If this activity was a comment, we will link back to the comment. If not, this field will be empty.

Privacy rules for this data type

  • No privacy rules → All Activities are visible to all users when looking at a Post (likes, comments, …)

Notification

The data type “Notification” is necessary to better organize notifications and offer a better User Experience on the platform.

Suggested fields on this type

  • Creator (User, built-in)

  • Modified date (date, built-in)

  • Created date (date, built-in)

  • Slug (text, built-in)

  • Receiver (User)

  • Activity (Activity): We link back to the activity to enrich the Notification message and give more context to the receiver. With that link back to an Activity, we can also go back to the Post on which that activity took place. Linking back to this activity creates several possible call-to-actions.

  • Read? (yes/no): We store this value to know if the Receiver has unread notifications or whether he/she is up to date.

Privacy rules for this data type

  • This Notification’s Receiver is Current User

  • View all fields (checked)

  • Find this in search (checked)

  • View attached files (unchecked)

  • Allow auto-binding (unchecked)

  • This Notification’s Creator is Current User → The sender should see if an invitation is already pending

  • View all fields (checked)

  • Find this in search (checked)

  • View attached files (unchecked)

  • Allow auto-binding (unchecked)

  • Everyone else

  • No permission

Chat

The Data Type “Chat” is used to store messages between users so that we can easily display a relevant discussion as a thread of messages.

Suggested fields on this type

  • Creator (User, built-in)

  • Modified date (date, built-in)

  • Created date (date, built-in)

  • Slug (text, built-in)

  • Users (list of Users)

  • Messages (list of Messages)

Privacy rules for this data type

  • This Chat’s Users contains Current User

  • View all fields (checked)

  • Find this in search (checked)

  • View attached files (checked)

  • Allow auto-binding (unchecked)

  • Everyone else

  • No permission

Message

The Data Type “Message” is used to store text messages sent between users. A message doesn’t need to hold information about the message receiver as it is saved in a chat that holds that information already.

Suggested fields on this type

  • Creator (User, built-in)

  • Modified date (date, built-in)

  • Created date (date, built-in)

  • Slug (text, built-in)

  • Text (text)

  • Chat (chat): We link this Message back to the Chat to avoid orphaned Messages (a Message saved in the database with no link to a Chat).

  • Viewed? (yes/no): We store this value to know if the receiver has unread messages or whether he/she is up to date.

Privacy rules for this data type

  • This Message’s Chat’s Users contains Current User

  • View all fields (checked)

  • Find this in search (checked)

  • View attached files (checked)

  • Allow auto-binding (unchecked)

  • Everyone else

  • No permission

Invitation

The Data Type “Invitation” is used to store connection requests. This data type makes it possible to confirm a connection request before connecting two users together.

Suggested fields on this type

  • Creator (User, built-in)

  • Modified date (date, built-in)

  • Created date (date, built-in)

  • Slug (text, built-in)

  • Receiver (User)

  • Note (text): A user can send a note with the connection request.

  • Status (Invite Status Option Set): This status is “pending” by default as all connection requests need to be approved. The user can then accept or ignore the request, which will change this status.

Privacy rules for this data type

  • This Invitation’s creator is Current User OR This Invitation’s Receiver is Current User

  • View all fields (checked)

  • Find this in search (checked)

  • View attached files (unchecked)

  • Allow auto-binding (unchecked)

  • Everyone else

  • No permission

Option sets recommended

Activity Type

  • Posted

  • Commented

  • Reacted

Reaction Type

  • Like

  • Celebrate

  • Support

  • Love

  • Insightful

  • Curious

Invite Status

  • Pending

  • Accepted

  • Ignored

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

Last updated 3 years ago

Was this helpful?

Slug (text) - also a built-in field; see on using Page Slugs

Experiences (list of experiences): Working experience of the user; 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
this article
no-code education platform
no-code agency