Zulfahmi Indra
Universitas Negeri Medan, Medan, Indonesia

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Web-Based Implementation of Deterministic Finite Automata for Detecting Hazardous Ingredients in Cosmetic Labels Zulfahmi Indra; Kayla Amelia Putri; Sahara Lani Lestari; Dinda Syafitri; Raja Ansel Hartama Sihombing
Community: Jurnal Hasil Penelitian dan Pengabdian Masyarakat Vol. 5 No. 1 (2026): Action Research and Community Development
Publisher : Perkumpulan Dosen Tarbiyah Islam Indonesia

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.61166/community.v5i1.325

Abstract

Illegal cosmetics containing hazardous substances such as mercury, hydroquinone, and Rhodamine B remain widely circulated in Indonesia, while ordinary consumers struggle to recognize these substances because they are listed on packaging using unfamiliar Latin chemical names. This study aims to address that problem by developing SafeBeauty, a client-side web application that treats cosmetic-ingredient screening as a regular-language recognition problem solved with Deterministic Finite Automata (DFA). For each hazardous substance drawn from a database of more than 60 entries compiled from BPOM RI (Indonesian Food and Drug Authority) regulations, a dedicated per-pattern DFA M = (Q, Σ, δ, q0, F) is constructed and executed against normalized label text from multiple substring starting positions, so a hazardous name embedded inside a longer compound name can still be recognized. The application also integrates Tesseract.js Optical Character Recognition (OCR) for photo-based scanning and renders an interactive state-diagram visualization of each DFA trace. Black-box testing across ten functional scenarios produced a 100% pass rate, with hazardous substances consistently accepted and safe substances consistently rejected without any false positive. These results indicate that a transparent, per-pattern DFA is an effective and auditable model for hazardous-ingredient screening in cosmetics.