In this paper, a miniaturized colorimetric sensor array based on Au nanoparticles (AuNPs) integrated with a miniature spectrometer was designed as a point-of-care (POC) device to detect and discriminate structurally similar opioids including Codeine, Methadone, Morphine, Noscapine, Papaverine, and Thebaine in both aqueous and real samples. The array characteristics were defined using Transmission electron microscopy (TEM) and UV–visible methods. The contribution of the key parameters such as salt concentration and pH on the device’s performance was studied. The array responses were distinguished by hierarchical cluster analysis (HCA) and principal component analysis (PCA) with 100 % accuracy in classification, representing the integrated device as a versatile sensing platform. Additionally, color differentiation maps were processed as visual tools for the classification of analytes without using any statistical techniques. The limit of detection and the limit of recognition of the array for the analytes were less than 15.0 µmol. L-1 and 9.0 µmol. L-1, respectively, showing the possibility for semi-quantitative analysis as well. The results proposed that the as-prepared colorimetric nanoarray is a promising tool in clinical diagnostics and enables fast and in situ detection of illegal drugs in urine and aqueous samples.