I am building an app which has users, projects and their mini sub-projects "steps".
This is the Database design I've come up with:

Users can join all or some steps of a project. I have tried to keep the database structure as flat as possible as per guide. Does this sound the best approach to do this?
User authenticates > Joins project > Selects "steps" to join
IMHO, yes, you have structured your database correctly. What have you done, you have used flattening and denormalizing of data which are common and good practices within Firebase.
What you need to keep in mind is that there is no perfect rule to Firebase structures. You need to strcuture your database accordingly to your needs. Don't use flattening just for the sake of doing it. Just like duplicating data, only do it when there's a need for it.
As a conclusion, if this database strucure serves your needs then is the best option for you. If you want to learn more about structuring database for Firebase it recomand you reading the following posts: Structuring your Firebase Data correctly for a Complex App and NoSQL Data Modeling Techniques.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With