How do you arrange the blocks correctly?

Here's a sample app you can read:

It covers the data storage part.