We develop a Talbot-optical approach to grating-based atom optics. The method is used to describe matter wave diffraction produced by a near-field sequence of gratings. The possibilities for de Broglie wavefront design are demonstrated through a series of examples involving two consecutive gratings.