🥗 SafeChow

Inspiration

The inspiration for SafeChow came from the everyday struggle faced by diners with food allergies. Sharing health data with every restaurant or delivery service is not only inconvenient but also risky. On the other hand, restaurants want to protect their secret recipes and ingredient sourcing. We realized that zero-knowledge proofs (ZKPs) on Midnight could bridge this trust gap: enabling both sides to prove safety without revealing sensitive information.


What it does

SafeChow is a zero-knowledge allergy checker.

  • Diners store their allergy profile as encrypted “flags” (e.g., peanut, gluten, dairy).
  • Restaurants upload hashed ingredient lists for each dish.
  • A ZKP is generated to prove whether a dish is safe or unsafe for the diner.
  • The diner sees a simple green âś… or red ❌ indicator — without exposing their medical history or the restaurant’s recipe.

How we built it

  • Smart Contracts: Built on Midnight’s Compact language, used to handle commitments and proof verification.
  • Zero-Knowledge Circuits: Implemented with Circom to compute set intersection between allergens and ingredients.
  • Frontend: React + Tailwind for a clean UI where toggling an allergen flips menu items from safe (green) to unsafe (red).
  • Backend/Glue: Node.js APIs for restaurant uploads, proof generation, and contract interaction.
  • Data Flow:
    $$\text{Proof} = zk(\text{Allergens} \cap \text{Ingredients} = \varnothing)$$

Challenges we ran into

  • Learning curve with Midnight & Compact: as an emerging ecosystem, documentation is still evolving.
  • Proof efficiency: set intersection circuits can get heavy, so optimizing for speed was a challenge.
  • Integration: bridging between Circom proofs and Compact contracts required trial-and-error.
  • UX: balancing cryptographic complexity with a simple, intuitive user experience.

Accomplishments that we're proud of

  • Built a working demo where toggling an allergy instantly updates menu safety with zk-proofs.
  • Successfully combined real-world health safety with blockchain privacy.
  • Designed a project that goes beyond DeFi and demonstrates Midnight’s potential in everyday life.
  • Created a brand and UI/UX that makes zk-proofs approachable for non-technical users.

What we learned

  • How selective disclosure can foster trust between two parties without revealing underlying data.
  • Practical experience in designing zk circuits for set operations.
  • How Midnight’s privacy-first architecture opens doors for use cases far beyond finance.
  • That making cryptography human-friendly is just as important as making it secure.

What's next for SafeChow

  • Expand beyond hackathon demo: integrate into food delivery platforms and restaurant POS systems.
  • Add selective disclosure proofs: diners can export a “safe meal proof” to share with family, schools, or hospitals.
  • Enterprise SaaS version: restaurants upload menus, diners scan QR codes to get zk allergy checks.
  • Scale zk efficiency: research batch-proof generation for large menus.
  • Long-term, we envision SafeChow becoming the trusted middleware for privacy-preserving nutrition, healthcare, and compliance worldwide.

Built With

Share this project:

Updates