We present theory, design, and preliminary experimental studies for a compact wavefront sensor based on lateral shearing interferometry using a binary phase grating, image sensor, and Fourier-based processing. The integrated system places a diffractive element directly onto an image sensor to generate interference fringes within overlapping diffraction orders. The shearing ratio and the interferogram signal-to-noise ratio directly affect the reconstruction accuracy of wavefronts with differing spatial variations. Optimal shearing parameters associated with the autocorrelation of the input encourage placing a spatial light modulator as the diffractive element allowing adaptive wavefront sensing. Experimental results from a fixed-grating system are presented as well as requirements for next-generation adaptive systems.