There is an increasing demand for sensitive, selective, fast and portable detectors for trace components in gases and liquids, e.g. due to increasing concerns about atmospheric pollutants, and a need for improved medical screening capabilities for early detection of diseases and drug abuse. In that context, the project IrSens aims at building a versatile platform based on optical spectroscopy in the near and midinfrared range. Indeed, techniques based on optical absorption offer the possibility to realize a non-invasive and highly sensitive detection platform. It allows to probe the vibrational frequencies of the targeted molecules - most of which are located in the near and mid-infrared range, and to obtain an unambiguous signature of the investigated gas or liquid. The idea is to create a photonic sensor platform with high performance and reliability which will leverage on the new source, detector and interaction cell technologies to create a new sensor element with vastly improved performance and lowered cost. These improvements will be demonstrated further by the incorporation into two pilot applications, the first one aiming at the demonstration of sensing in the gas phase, the second one in the liquid phase.