You define the data schema client side.
That's the entire idea behind Firebase. It makes prototyping much faster. I don't know how well it scales, but it works for most smaller projects.
Wait until you hear about ORMs.
Wait until you hear about ORMs.