Is there any thing can i used to detect an bacteria or viruses for iot project?

ChrisTenone:
Bacteria fluoresce when you shine UV light on them.

Only a subset. Definitely not all of them.