Emissionary 🌿

Snap your receipt. See your footprint. Cut your emissions.

🌱 Inspiration

Climate change requires action at every level, especially from individuals—but accountability begins with transparency. Just as governments mandate nutrition labels to inform healthier food choices and have implemented carbon taxes to incentivize sustainable behaviors, we believe a logical next step is mandating clear visibility of the carbon footprint of everyday purchases.

We envisioned Emissionary as a scalable, powerful solution in the global push toward a greener, cleaner world by 2050. By giving consumers direct insight into their carbon footprints, Emissionary sets the stage for transformative personal and collective action. It’s not just another app; it’s a potential blueprint for nationwide—and even global—implementation.

🤔 What it does

Emissionary transforms everyday grocery receipts into clear, meaningful carbon emission data and insights. The process is seamless:

  • Capture & Upload: Snap a photo of your receipt and upload it easily.

  • Extract & Interpret: Our Python-based OCR microservice accurately pulls product-level data from your receipt images.

  • Calculate & Compare: Using Groq AI integrated with robust carbon emission datasets, Emissionary computes the exact carbon footprint of your purchases and visualizes your impact relative to average Canadian and global households.

  • Recommend & Empower: Offers personalized sustainability recommendations powered by AI, tailored to your shopping habits, enabling tangible environmental action.

⚙️ How we built it

Frontend:

  • Next.js 15 (App Router) powers lightning-fast performance using React Server Components.

  • Tailwind CSS and Radix UI create a modern, accessible user experience.

  • Secure file uploads via UploadThing.

  • Detailed and engaging visualizations presented through Recharts.js.

Backend:

  • Node.js API routes coupled with Prisma ORM deliver reliable, scalable data handling.

  • Python FastAPI OCR microservice leverages Tesseract for accurate text extraction from real-world receipts.

  • Groq AI integration for precise item parsing and robust carbon footprint calculations.

  • Persistent data storage managed securely through Supabase PostgreSQL.

Technical Highlights

  • Efficient, scalable backend API design:
export async function POST(req: Request) {
  const { userId, imageUrl } = await req.json();

  const ocrResult = await fetch(OCR_ENDPOINT, {
    method: 'POST',
    body: JSON.stringify({ image: imageUrl })
  });

  const emissions = await calculateEmissions(ocrResult.text);

  await prisma.$transaction([
    prisma.receipt.create({
      data: {
        userId,
        items: emissions.items,
        totalEmissions: emissions.total
      }
    }),
    prisma.user.update({
      where: { id: userId },
      data: { totalEmissions: { increment: emissions.total } }
    })
  ]);

  return Response.json({ success: true });
}
  • Reliable OCR processing with preprocessing enhancements:
@app.post("/process")
async def process_receipt(file: UploadFile = File(...)):
    try:
        image = preprocess(await file.read())
        text = ocr_engine.process(image)
        items = parse_items(text)
        return JSONResponse({
            "success": True,
            "data": items,
            "processing_time": time.time() - start
        })
    except Exception as e:
        logger.error(f"OCR failed: {str(e)}")
        return JSONResponse({"success": False, "error": "Processing failed"}, status_code=500)

🧗 Challenges we ran into

Real-world receipt data introduced significant hurdles:

  • OCR reliability: Early attempts using EasyOCR/PaddleOCR failed. Tesseract OCR combined with advanced preprocessing (grayscale, denoising, thresholding) dramatically improved accuracy.
def preprocess_image(image):
    gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
    denoised = cv2.fastNlMeansDenoising(gray, h=30)
    return cv2.threshold(denoised, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)[1]
  • Complex data parsing: Real-world receipts required advanced multi-stage parsing pipelines using Groq AI, implementing both strict and fuzzy matching techniques alongside robust error handling.

  • Ensuring database integrity: Implemented Prisma atomic transactions to guarantee consistency and prevent partial database failures.

🏆 Accomplishments we're proud of

  • Successfully built a fully integrated, functional prototype in under 36 hours.

  • Achieved 92% OCR accuracy on realistic grocery receipts.

  • Developed a responsive, accessible frontend meeting WCAG standards.

  • Seamlessly integrated complex microservices (OCR, Groq AI, Supabase) into a coherent user experience.

📚 What we learned

  • OCR technology demands extensive preprocessing to handle real-world complexities.

  • AI-driven parsing requires precise, structured schemas to achieve consistent results.

  • Reliable data storage is critical—atomic transactions are essential for scalable applications.

🔭 What's next for Emissionary

Emissionary has enormous potential for widespread adoption:

  • Retailer Integration: Direct API integrations with major grocery chains to automate carbon tracking.

  • Mobile Application: Native iOS and Android apps for instant, convenient receipt uploads.

  • Carbon Offset Marketplace: Enable direct user participation in offsetting their carbon footprint.

With governmental mandates already established for nutrition labels and carbon taxes, mandating carbon footprint labeling is a feasible, high-impact next step. Emissionary is uniquely positioned to lead this movement, potentially scaling across Canada and beyond.

🌎 Why it matters

Emissionary is about empowering everyday people with knowledge and actionable insight. It aligns directly with the global mission towards a cleaner, greener energy future by 2050—it's not merely an app, it's a critical tool in combating climate change at scale.

Emissionary is:

  • Personal: Clear visibility into your individual carbon footprint.

  • Actionable: Provides immediate strategies to reduce environmental impact.

  • Measurable: Allows tracking and progress visualization over time.

"We don't need a handful of people doing zero waste perfectly. We need millions doing it imperfectly."
— Anne Marie Bonneau

🔗 Quick Links


Emissionary isn't just built for today—it's designed for tomorrow, ready to scale globally and play a crucial role in creating a sustainable future.

Built With

Share this project:

Updates