A multi-foci metalens and a leaky-mode microtaper provide innovative platforms to achieve high-resolution, wideband light spectra in millimeter-sized devices, thereby paving new ways for the commercialization of on-fingertip spectrometers.