build the application structure