Edge-Corrected Mean-Field Hubbard Model: Principle and Applications in 2D Materials