Inspired by the ever-increasing demand for higher data transmission rates and the tremendous attention toward all-optical signal processing based on miniaturized nanophotonics, in this paper, for the first time, we investigate the integrable design of coherent ultrashort light pulse code-division multiple-access (CDMA) technique, also known as femtosecond CDMA, using all-dielectric metasurfaces (MSs). In this technique, the data bits are firstly modulated using ultrashort femtosecond optical pulses generated by mode-locked lasers, and then by employing a unique phase metamask for each data stream, in order to provide the multiple access capability, the optical signals are spectrally encoded. This procedure spreads the optical signal in the temporal domain and generates low-intensity pseudo-noise bursts through random phase coding leading to minimized multiple access interference. This paper comprehensively presents the principles and design approach to realize fundamental components of a typical femtosecond CDMA encoder, including the grating, lens, and phase mask, by employing high-contrast CMOS-compatible MSs. By controlling the interference between the provided Mie and Fabry-Perot resonance modes, we tailor the spectral and spatial responses of the impinging light locally and independently. Accordingly, we design a MS-based grating with the highest possible refracted angle and, in the meantime, the maximized efficiency which results in a reasonable diameter for the subsequent lens. Moreover, to design our MS-based lens commensurate with the spot size and distance requirements of the pursuant phase mask, we leverage a new optimization method which splits the lens structure into central and peripheral parts, and then design the peripheral part using a collection of gratings converging the impinging at the subsequent phase mask.