Create workspaces

I am planning a Django (v4.1.2) website with PostgreSQL where customers can register with email address. After logging in, customers can create workspaces.

What is a workspace?
Team members who are working on a project can be invited to a workspace. For example, the team members can create notes that can be viewed by the other team members. There are also different rights among the team members. Some can only create notes, some invite other team members, some create projects. The team members in one workspace cannot see the other team members in the other workspaces.

The customer can switch between the workspaces.

I’ve seen some websites that solve the problem by giving the workspaces unique subdomains:

1.) Are there other, better options?

2.) I saw on a website that they don’t use anything like that in the URL or in the links. I wonder how they can tell which workspace the user is in. Do they use session variables? Can you give me some keywords to search for?

3.) Can this already be solved with Django without a package? What are the keywords I need to search for?

4.) If not, are there already proven Django packages that are still being maintained that could help me?

That’s an external reference to a workspace that would need to be “translated” to whatever internal representation you will be using.

A workspace is whatever you need it to be to perform whatever function you need it to perform. It could be something as simple as a Model named Workspace.

Membership in a Workspace can be defined as a Role in that workspace. (Such a Role could be represented using Django Group objects, or you could use something else entirely.)

You can use session variables to identify the “current” workspace, or you can have it as a setting on a user’s profile model. Each one of those two options have slightly different implications when being used. (For example, the profile approach means that all sessions where a user is logged in is currently using the same workspace, where with a session variable, a person logging in with two different browsers could be connected to two different workspaces.) You would need to decide which approach you want to take.

There’s nothing “special” about Django packages. The code needs to exist to perform the desired functions - it doesn’t matter whether you write that code or someone else has written that code.

You’ve got two basic approaches for this that you need to select between.

You can either look for packages that you think are close to what you need, and adopt and adapt the data structures and models they require to set this up to support that. Or you can define what your data structures are going to look like, then look for a package that will work with your models or choosing to write it yourself.

Either way, you should have a concrete idea of how you want this data modelled within your system before selecting a solution