Typesafe repository