db and app setup