Constrained Density Functional Theory: a potential-based self-consistency approach