Branching and multi-tenancy on object storage


Can you give me an example on how you manage multi-tenancy and branching using object storage keys ?

for instance let’s say that you have user u1 and u2, that both store database db1 in neon and both have branches main and dev. How would it be stored on s3 ? How and where do you manage the metadata regarding this information ?

NB: Posting links to the code would be much appreciated as well.