Beta-lactoglobulin (β-LG), the primary allergen in cow's milk, makes developing a rapid, sensitive, and convenient detection method essential for individuals with allergies. In this study, a graphdiyne-based self-powered electrochemical biosensor has been cleverly integrated into the corresponding test strip. This biosensor uses glucose as fuel and correlates the β-LG concentration with the glucose value displayed on a mobile phone application, enabling real-time and quantitative detection. Additionally, an electrochromic substance reacts with the byproduct (H