This kinda sound a little bit like trying to figure out your domain modelling.
1,226 karma · joined November 18, 2013
This bit in particular is pretty cool: https://youtu.be/Ea1zJD5uQRg?t=849
It might be a good idea to compress it a bit. Check out https://squoosh.app/ as its easy to use.