A spectral module comprising: a substrate for transmitting light (L1) incident thereon from one surface ; a light transmitting unit , disposed on the other surface side of the substrate , for transmitting the light incident on the substrate ; a spectroscopic unit , formed with the light transmitting unit , for reflecting and spectrally resolving the light (L1) incident on the light transmitting unit ; and a photodetector , disposed on the one surface side of the substrate , for detecting the light (L2) spectrally resolved by the spectroscopic unit; wherein the other surface is provided with a recess , adapted to mate with the light transmitting unit through an optical resin agent , transmissive for the light (L1, L2) and for bonding the light transmitting unit to the substrate , the recess having a predetermined positional relationship with a reference unit for positioning the photodetector with respect to the substrate; wherein the recess is provided with a first mating section adapted to mate with the light transmitting unit in an extending direction of a grating groove of the spectroscopic unit and a second mating section adapted to mate with the light transmitting unit in a direction substantially orthogonal to the extending direction of the grating groove ; and wherein the second mating section and the light transmitting unit have a gap therebetween smaller than that between the first mating section and the light transmitting unit , whereby the alignment between the light transmitting unit and photodetector is effected precisely in a direction substantially orthogonal to the extending direction of the grating grooves , and the excess of resin and air can effectively be released through the gap in the extending direction of the grating grooves when bonding the light transmitting unit to the substrate with the optical resin agent . a substrate for transmitting light (L1) incident thereon from one surface ; a light transmitting unit , disposed on the other surface side of the substrate , for transmitting the light incident on the substrate ; a spectroscopic unit , formed with the light transmitting unit , for reflecting and spectrally resolving the light (L1) incident on the light transmitting unit ; and a photodetector , disposed on the one surface side of the substrate , for detecting the light (L2) spectrally resolved by the spectroscopic unit; wherein the other surface is provided with a recess , adapted to mate with the light transmitting unit through an optical resin agent , transmissive for the light (L1, L2) and for bonding the light transmitting unit to the substrate , the recess having a predetermined positional relationship with a reference unit for positioning the photodetector with respect to the substrate; wherein the recess is provided with a first mating section adapted to mate with the light transmitting unit in an extending direction of a grating groove of the spectroscopic unit and a second mating section adapted to mate with the light transmitting unit in a direction substantially orthogonal to the extending direction of the grating groove ; and wherein the second mating section and the light transmitting unit have a gap therebetween smaller than that between the first mating section and the light transmitting unit , whereby the alignment between the light transmitting unit and photodetector is effected precisely in a direction substantially orthogonal to the extending direction of the grating grooves , and the excess of resin and air can effectively be released through the gap in the extending direction of the grating grooves when bonding the light transmitting unit to the substrate with the optical resin agent . <EOS>