Inspiration

Fitness apps ask you to trust them with everything: your step count, your heart rate, your location history. We wanted to prove a different way is possible — one where you can show you hit a goal without handing over the data that got you there.

What it does

FitProof is a privacy-preserving fitness verification app built on Midnight. A user enters their weekly progress (e.g. steps or active minutes) — this value never leaves their device. The app generates a zero-knowledge proof, using a Compact smart contract, that checks whether the progress meets a goal threshold. If it does, the proof is recorded on-chain. If it doesn't, the transaction is rejected. Either way, the actual number is never revealed on-chain — only the pass/fail result.

How we built it

We built a Compact smart contract with a witness function (weeklyProgress) that keeps the raw value private, and a circuit (verifyGoalAchieved) that asserts the value meets the goal before incrementing an on-chain counter. We used the Midnight starter template, set up a local WSL/Ubuntu development environment, wrote and compiled the contract with the Compact compiler, and built both a CLI demo and a React frontend that call the same contract logic.

Challenges we ran into

Most of our challenges were environment-related rather than logic-related: getting a real Ubuntu distro working inside WSL (instead of the Docker-Desktop-backed one), installing Node.js and the Compact compiler correctly inside that environment, fixing file permission issues that only appeared when the project lived on a Windows-mounted drive (/mnt/c/...) instead of native Linux filesystem, and getting Docker's WSL integration to run reliably for the local test network. Once the environment was solid, the contract logic itself came together quickly.

Accomplishments that we're proud of

We got a full end-to-end demo working: deploying the contract to a local Midnight network, submitting a proof that correctly gets rejected below the goal, and one that gets accepted and recorded on-chain above the goal — all while the actual progress number is never revealed anywhere on-chain.

What we learned

We learned how zero-knowledge witnesses and circuits work in practice in Compact, how private state is kept separate from public ledger state, and just how much of building on a new blockchain stack is really about getting a clean, correctly-configured development environment.

What's next for FitProof

  • A polished mobile-first frontend using device motion sensors to compute step counts automatically.
  • Support for more goal types (active minutes, calories, streaks).
  • Deployment to Midnight's public testnet/mainnet with a real wallet integration.
  • Partnering with wellness programs or insurers as a real-world privacy-preserving verification layer.

Built With

Share this project:

Updates

Submission history