Build generic repository