Creating a host vs regular user account

Options

Hi everyone, I'm creating an app that allows users to sign up with a personal or business account, which gives them access to different features on the app.

I set the user flow with a "Personal/Business Account" page first, which afterward directs them to the sign-up page (which is the same page for both regular users and businesses). On Xano I created 2 tables, one for regular users and another for businesses. I set up the "Personal/Business Account" page prior, with the intent of incorporating logic that designates which table the sign-up information (aka email and password) goes to. I'm also wondering if this is something that can be controlled on Bravo Studio instead, or only Xano.

I followed along with the "Build an Airbnb clone App with Bravo Studio and Xano" YouTube video (link: https://www.youtube.com/watch?v=SPKdCa57Lno&t=2823s),however, I noticed that they didn't show how to create the backend API and bind to bravo studio for hosts, which is essentially what I'm trying to do (but for businesses instead).

I'm a complete newb and my background is in UX/UI, so I'm learning software development concepts as I go through the Xano Documentation. It took me some time to think through how I would structure my database, but learning about APIs and functions and how to efficiently organize them in the best possible way, is an entirely different beast. So, If anyone can assist or direct me to a post, video, or anything (preferably one that is step-by-step), I would honestly really appreciate it. 😭 Thank you for the help!

Best Answer

  • arturosanz
    arturosanz Member ✭✭
    edited September 2023 Answer ✓
    Options

    I wouldn't recommend using two different user tables. It will be much more difficult to maintain the consistency and integrity of the data. What would happen if the same user registers as both, a personal and a business account? A user should always be a uniquely identifiable person, not a business or any other non-human entity.

    Only real people log in and interact with the app. Businesses never log in or intereact with apps, only real people do. It's always a bad idea to use generic business emails to register as a user that different people can share. It will be impossible to know who did what.

    I recommend to use only one user table, and relate it to a bussiness table if only some users have a business account.

Answers

  • Lourdes Mafnas
    Options

    Thank you for that! Combined the accounts into a single table and it made a huge difference. Had a lot of issues prior. 😅 Now, the flow is a lot more seamless and easier to manage. 😊👍️