We present UbiNIRS, a software framework for rapid development and deployment of applications using miniaturized nearinfrared spectroscopy (NIRS). NIRS is an emerging material sensing technology that has shown a great potential in recent work from the HCI community such as in situ pill testing. However, existing methods require significant programming efforts and professional knowledge of NIRS, and hence, challenge the creation of new NIRS-based applications. Our system helps to resolve this issue by providing a generic server and a mobile app, using the best practices for NIRS applications in literature. The server creates and manages UbiNIRS instances without the need for any coding or professional knowledge of NIRS. The mobile app can register multiple UbiNIRS instances by communicating with the server for different NIRS-based applications. Furthermore, UbiNIRS enables NIRS spectrum crowdsourcing for building a knowledge-base.