Repository model and controller outline