added a database service
added error handling for adding projects