An apparatus comprises: a photonic cavity; a substrate comprising a waveguide layer, wherein the waveguide layer comprises waveguides configured to direct light towards the photonic cavity; and a wafer comprising: a top side, and a nanowire array affixed to the top side. A method of performing a surface-enhanced Raman scattering (SERS) analysis, the method comprises: directing, using a waveguide layer of a SERS device, an incident light towards a photonic cavity of the SERS device; permitting, using the photonic cavity, a fluid to flow freely into and out of the SERS device; causing, within the photonic cavity, an interaction among the incident light, the fluid, and a nanowire array of the SERS device to create scattered light; converting the scattered light into an electrical signal; and analyzing the electrical signal to determine whether a contaminant exists in the fluid.
展开▼