1
3 Comments

Team/Multi-User Best Practices

Any suggestions for tips or resources to structure team or multi-user web apps? Particularly as it relates to transitioning from single-user to multi-user?

Thanks for any input!

posted to Icon for group Developers
Developers
on February 26, 2020
  1. 2

    Think like this,
    1 user belongs to a "Team of 1"
    5 user belong to a "Team of 5".
    So your app's main entity (or main customer) is basically; "a Team". People pay for having a "team" in your app.

    Very simple database structure is (assuming you are using a relational DB):

    Team > id, max_member (assume you have different plans for each team size), created_at, payment_info ... etc

    User > id, team_id, name, email, etc....

    Now you can subscribe each of your user to a different team. (They are first member of that team)
    They can invite (let's say via email) other people
    if "number_of_current_members_of_the_team < max_member"

    You can create roles for team (just put another column to user table, team_role).
    Now you can show a link in the UI if user_role == 1 (let's say it stands for admin role) and by following this link they can reach to team settings page so they can add/remove new users, update billing info etc..

    I hope this answers your question, and helps

    1. 1

      Excellent advice. Thank you!

      I was looking at utilizing roles, but was stuck on building the "team" dynamically in the session. Your outline makes much more sense.

      1. 1

        Glad that it helps

Trending on Indie Hackers
I spent $0 on marketing and got 1,200 website visitors - Here's my exact playbook User Avatar 55 comments Veo 3.1 vs Sora 2: AI Video Generation in 2025 🎬🤖 User Avatar 26 comments Codenhack Beta — Full Access + Referral User Avatar 21 comments I built eSIMKitStore — helping travelers stay online with instant QR-based eSIMs 🌍 User Avatar 20 comments 🚀 Get Your Brand Featured on FaceSeek User Avatar 18 comments Day 6 - Slow days as a solo founder User Avatar 16 comments