rearchitected repsitory backend