Inspiration
Counterfeiting is a multi-billion dollar problem, but enterprise-grade supply chain tracking is prohibitively expensive and highly technical. Small producers—artisanal craftsmen, local breweries, and boutique electronics makers—are completely priced out. We wanted to build a "no-code" bridge between physical goods and cryptographic web3 provenance. The goal was simple: empower any small producer to generate secure, unforgeable physical labels for their products in seconds, completely free.
What it does
BatchSnap is a Web3 Provenance Studio. It allows producers to log into a beautiful, glassmorphic dashboard and generate a "Batch" of items. The system instantly generates a cryptographic secret for every single unit in that batch and formats them into a beautifully structured, printable A4 sheet of QR labels.
The producer prints the labels and slaps them on their physical products. When a consumer buys the product, they simply scan the QR code with their smartphone. They are immediately taken to a verification portal that proves the item's authenticity and allows them to digitally "claim" ownership on the ledger. If a counterfeiter tries to photocopy the QR code, the next person to scan it will instantly trigger a "Tamper Alert," warning the consumer that the code has already been claimed!
How we built it
We architected a robust, full-stack application designed for maximum security and minimal latency:
- Frontend: Built with Next.js 15 (App Router) and React. We utilized Tailwind CSS to design a stunning, neon-accented dark-mode UI with frosted glassmorphism elements.
- Backend: Powered by Prisma ORM. We started with a local SQLite database for lightning-fast prototyping and seamlessly migrated to Vercel Postgres to support our serverless deployment.
- Security & CI/CD: We didn't just secure the physical supply chain; we secured our software supply chain. We built a GitHub Actions pipeline that builds, hashes, and signs our artifacts, generating official OpenSSF SLSA Level 3 Provenance. We also integrated Datadog Synthetics to continuously monitor the health of our endpoints.
Challenges we ran into
Bridging the physical and digital worlds is notoriously difficult. Our biggest hurdle was Mobile QR Scanning Optics. We initially designed gorgeous, inverted neon-on-black QR codes to match our web3 aesthetic. However, during testing, we discovered that iOS and Android built-in camera algorithms often fail to parse inverted QR matrices. We had to surgically refactor our QR rendering engine to maintain the dark mode UI while isolating the QR codes on high-contrast white canvases to guarantee physical scannability.
Additionally, adapting our stateful local SQLite architecture to run smoothly on Vercel's stateless Serverless edge nodes required a rapid, mid-hackathon database migration to PostgreSQL.
Accomplishments that we're proud of
- Achieving SLSA Level 3 Provenance during a rapid weekend hackathon is a massive win for open-source security.
- We successfully engineered a pure React and Tailwind CSS rendering engine that outputs perfectly measured, physical A4 sticker sheets.
- We built an entirely zero-config, single-click deployment pipeline.
What we learned
We learned the intricacies of Next.js aggressive route caching! Ensuring that the Consumer verification portal updated in real-time when an item was claimed required us to deep dive into Next.js 15's cache-busting directives to guarantee real-time SQLite telemetry.
What's next for BatchSnap
The current iteration uses a centralized cryptographic ledger, but we already have our contracts/ directory scaffolded with Foundry. Our next step is to deploy a BatchRegistry smart contract to map these QR claims directly onto a Layer 2 blockchain (like Base or Arbitrum) for true, decentralized, immutable provenance. We also plan to integrate Playwright for automated acceptance testing of the Producer-to-Consumer lifecycle.
Built With
- github-actions
- next.js
- postgresql
- prisma
- react
- slsa
- tailwind-css
- vercel
- web3