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

  • Migrating scoring from Postgres functions to a typed application engine cost a rewrite, but made the model testable, versioned (scoring_version), and far easier to extend
  • Row Level Security adds policy management overhead but provides per-user data isolation without application-layer checks
  • Schema-validated structured generation (generateObject) yields reliable, well-formed reports at the cost of a token-streaming UX

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

  • A typed, versioned scoring engine is easier to test and evolve than DB functions — migrating off Postgres triggers paid for itself
  • Row Level Security is a strong default for multi-tenant SaaS. It pushes authorization into the database layer
  • Streaming AI responses provide a clean pattern for long-form generated content