On-Chip Photonic Circuits For Atom-Light Interaction In Quantum Information And Integrated Optical Spectrometer For Astrophotonics