DEV Community

Cover image for Midnight Network "Privacy First" Challenge
cutieyunny-tech
cutieyunny-tech

Posted on

Midnight Network "Privacy First" Challenge

Midnight Network Challenge: Protect That Data

This is a submission for the Midnight Network "Privacy First" Challenge - Protect That Data prompt

What I Built

I built Halal Guard, a decentralized application (DApp) that provides a privacy-first solution for Halal food recommendations. It solves the problem of needing to share sensitive dietary preferences with a third party to get personalized recommendations.

The DApp allows users to input their dietary restrictions. It then uses a zero-knowledge (ZK) proof mechanism to verify compliance with a product's Halal criteria without ever exposing the user's personal choices. This ensures that privacy is the core feature, not an afterthought.

Demo

GitHub Repository:https://github.com/cutieyunny-tech/HalalGuard-DApp

Screenshots and a detailed tutorial are available in the project's README.md file.

How I Used Midnight's Technology

This DApp demonstrates the core concepts of Midnight's privacy capabilities. I have simulated the use of Midnight's ZK circuits and MidnightJS within the application's logic.

The user's preferences are handled as private inputs that would be fed into a ZK circuit. This circuit would generate a cryptographic proof. The DApp then verifies this proof against product data on the smart contract, ensuring compliance without ever needing to see or store the user's sensitive information.

Data Protection as a Core Feature

Privacy is central to this DApp's design from the ground up. Instead of a traditional model where a server holds user data, my solution empowers the user to hold their own data. The ZK proof is the key to this model.

The DApp never asks for a name, email, or any personal identifier. All verification happens on-chain, using a proof that only confirms a statement ("This user's preferences are Halal-compliant") without revealing the "why" (the actual preferences). This ensures that the user's data is truly protected.

Set Up Instructions / Tutorial

A detailed, step-by-step tutorial is included in the project's README.md file. It explains the project concept, how to run the DApp, and how the core privacy features were implemented.

Top comments (0)