Back to Work

Eckeka (2025–Present): Packaging Risk & EPR Intelligence MVP

A vertical SaaS MVP for packaging sustainability and Extended Producer Responsibility (EPR) tracking, featuring a typed recyclability & circularity scoring engine, compliance tracking, and AI-generated risk reports.

Technical Stack

Frontend

  • Next.js (App Router)
  • TypeScript (strict)
  • shadcn/ui + Tailwind CSS
  • Recharts
  • React Hook Form + Zod

Backend

  • Next.js API Routes
  • Vercel AI SDK

Database

  • Supabase (PostgreSQL + Row Level Security)

Auth

  • Supabase Auth

AI

  • OpenAI GPT-4 via Vercel AI SDK

Email

  • Resend

Analytics

  • PostHog

Deployment

  • Vercel

Problem

Packaged goods companies in Kenya face regulatory and reputational pressure around packaging sustainability and EPR compliance. NEMA requires reporting and fee management. Packaging data is fragmented across spreadsheets and suppliers. Brands lack quantified recyclability and circularity risk scoring. Compliance tracking is manual and error-prone.

Solution

A packaging risk and transparency intelligence platform that allows brands to:

  1. 01Inventory SKUs with detailed material and design data
  2. 02Automatically compute recyclability and circularity scores
  3. 03Track EPR compliance (NEMA registration, reporting, fee status, PRO partnerships, material targets)
  4. 04Visualize packaging risk and material distribution
  5. 05Generate AI-powered reports (full risk assessment, SKU technical report, portfolio/board summary, 30/60/90 day action roadmap, CSV export)
  6. 06Provide cross-company admin visibility

The platform is framed around risk exposure and transparency, not compliance guarantees.

Architecture Overview

A Next.js application with Supabase backend. The platform includes authentication, a dashboard for inventory and analytics, SKU management with material data, automated scoring, compliance tracking, AI-generated reports, and admin tools. Row Level Security provides per-user data isolation at the database level.

Automated Scoring Engine

Recyclability and circularity scoring is computed by a typed application engine (v2.0): a 4-module orchestrator (intrinsic recyclability, PCR & circularity, environmental risk, and Kenya-specific infrastructure context). Migrated from the original Postgres functions/triggers for testability, versioning, and richer modeling.

  • Base score by material type
  • Packaging modifier
  • Design penalties (shrink sleeves, dark coloring, incompatible caps)
  • Circularity bonuses (mono-material, reuse potential, renewable %, certifications)
  • Normalized output score (0–100) with risk level classification

Risk Levels

  • Low Risk (70+)
  • Moderate (50–69)
  • Elevated (30–49)
  • High Exposure (<30)

AI Report Generation

Generates structured reports with gpt-4o via the Vercel AI SDK's schema-validated generateObject, rendered as HTML with serverless PDF/DOCX export (headless Chromium) and CSV export.

  • Full Risk Assessment
  • SKU Technical Report
  • Portfolio / Board Summary
  • Action Roadmap (30/60/90)
  • SKU Data Export (CSV)

Key Technical Decisions

  • Server-side data fetching for dashboard pages
  • A typed application scoring engine (migrated off Postgres functions) for testability, versioning, and richer modeling
  • Row Level Security across all core tables for per-user data isolation
  • Transactional email via Resend

Tradeoffs

  • Moving the scoring engine out of Postgres functions into typed application code meant a full rewrite. Worth it: the model is now testable, versioned, and something I can actually extend.
  • Row-Level Security is more policy to manage. In exchange, tenant isolation lives in the database instead of scattered across app-layer checks I'd eventually forget one of.
  • I picked schema-validated generation over token streaming. Reports come back well-formed and parseable, minus the typewriter effect. For a board-ready PDF, correctness wins.

Outcome

MVP in active development. Replaces manual spreadsheet-based packaging audits with automated scoring and AI-generated compliance reports, helping brands assess packaging risk and prepare for NEMA regulatory deadlines before enforcement begins.

Lessons

  • Scoring logic that lives in typed code you can unit-test beats a clever Postgres trigger every single time you need to change it.
  • For multi-tenant SaaS I now reach for RLS by default. Authorization in the database is one fewer thing the app can quietly get wrong.
  • When a report has to be machine-parseable, structured output earns its place over streaming, even though streaming is the flashier demo.