Created repository class to store posts