First, authorize with a dev hub and then run the following commands:
sfdx force:org:create -s -f config/project-scratch-def.json -a myscratchorg
sfdx force:source:push
sfdx force:permset:assign
sfdx force:org:open
This project demonstrates an example of implementing teams for custom objects. Class Team Members can be added to the Class object.
Because manual sharing records are deleted on record ownership changes and can only be managed to record owners, individuals higher than the owner in the role hierarchy or individuals with "Modify All" permissions to the object. A custom implementation allows sharing to persist through record changes and allows more control over who exactly adds/remove team members.