Adding tingodb as database.
Refactoring fetch function in badgeContoller to make it fit with the database later.