A laser-driven dielectric electron accelerator is composed of a dielectric photonic crystal accelerator structure having an electron beam channel and buried grating whose elements are arranged linearly parallel to the electron beam channel. The accelerator structure preferably has a thin film material coating. The grating may have an asymmetric structure. The accelerator and undulator structures may be integrated with on-chip optical and electronic devices such as waveguide devices and control circuits so that multiple devices can be fabricated on the same chip.