set up models and database and angular form validation