Inspiration
Enterprises and top-tier developers want objective, automated evaluation of their codebases, but they face a massive bottleneck: uploading proprietary source code to third-party benchmarkers or public blockchains is a catastrophic security risk. We needed a way to prove code quality without leaking intellectual property.
What it does
BrutalBench-ZK is an AI-powered code evaluation terminal that ruthlessly analyzes developer commits and architectural complexity. Instead of exposing the analyzed code to a public ledger to verify the results, it integrates with the Midnight network. The platform processes the code evaluation off-chain using our AI engine, and then utilizes Midnight to generate a Zero-Knowledge proof of the final benchmark score (e.g., 84/100). Users get a mathematically verifiable badge of code quality, while the underlying source code remains completely hidden.
How we built it
The core engine is a monolithic Next.js application utilizing React, Zustand for state pipeline reactivity, and Tailwind CSS for the brutalist terminal UI. The backend relies on Supabase (PostgreSQL) for secure telemetry and Row Level Security.
For the hackathon's Integrate Midnight Track, we took this existing robust architecture and engineered a privacy layer. The application passes the deterministic AI evaluation output to the Midnight local node, which processes a ZK circuit to issue the verifiable score token without exposing the AST trees or raw repository data.
Challenges we ran into
Bridging a heavy, asynchronous Web2 AI evaluation pipeline (handling rate limits, AST sanitization, and GitHub API scraping) with the local Midnight ZK proof generation environment required careful state management. Ensuring the terminal UI remained responsive while waiting for the cryptographic proofs to compile and return was a significant architectural hurdle.
Accomplishments that we're proud of
The brutalist terminal UI provides an incredibly immersive developer experience. By integrating Midnight, we successfully transformed a standard AI wrapper into an enterprise-grade, privacy-preserving protocol. The state management utilizing Zustand perfectly handles the transition from Web2 AI scraping to Web3 ZK proof generation without dropping the user experience.
What we learned
Developing on Midnight forced a shift in how we handle data payloads. We learned how to isolate sensitive text variables (the code itself) from the publicly verifiable outputs, mastering the implementation of the Midnight JS SDK alongside a traditional Next.js API router.
What's next for BrutalBench-ZK
We plan to expand the ZK circuits to allow developers to prove specific architectural milestones (e.g., "Proving this codebase has 0 critical vulnerabilities") to potential employers or clients, generating a cryptographic certificate of competence without ever handing over private repository access.
⚠️ Note to Judges (Prior Work Declaration): To preserve the integrity of my open-source portfolio, the Midnight ZK integration demonstrated in the video was executed locally for this hackathon and has not been merged into the public master branch linked below. The core Next.js/Supabase UI architecture is prior work, while the ZK privacy layer and off-chain evaluation pipeline integration is the specific hackathon deliverable for the Integrate Midnight track.
Built With
- midnight
- next.js
- supabase
- tailwindcss
- typescript
- zero-knowledge
- zustand
Log in or sign up for Devpost to join the conversation.