This work presents a compact and sensitive refractive index sensor able to evaluate the concentration of an analyte in a sample. Its working principle leverages on the changes in the optical absorption features introduced by the sample itself on the evanescent waves of a light beam. The device’s high compactness is achieved by embedding the sample–light interaction site and the detector in a 1 cm2 glass substrate, thanks to microelectronics technologies. High sensitivity is obtained by employing a low-noise p-i-n hydrogenated amorphous silicon junction, whose manufacture process requires only four UV lithographic steps on a glass substrate, thus ensuring low production costs. The system’s capabilities are investigated by sensing the sugar content in three commercial beverages. Sensitivities of 32, 53 and 80 pA/% and limits of detection of 47, 29 and 18 ppm are achieved. The above performance is comparable with state-of-the-art results available in the literature, where more complex optical setups, expensive instrumentation and bulky devices are used.