app and db setup