Skip to content
A

Aperio

ML Intelligent traceablity management system

Created on 26th March 2026

•

A

Aperio

ML Intelligent traceablity management system

The problem Aperio solves

Aperio solves a highly critical problem in the Circular Economy and Supply Chain Management industry: the lack of transparency, manual data fragmentation, and uncoordinated traceability in recycling workflows.

Here is the exact breakdown of the real-world problems it solves:

  1. The "Black Box" of Processing Losses
    The Problem: When recyclers take in materials (like 5,000kg of PET), it passes through Sorting, Washing, and Granulation. Often, thousands of kilograms are lost to contaminants or machine delays, but facility managers don't discover the exact point of loss until weeks later during manual audits. The Aperio Solution: The platform uses intelligent, automated Sankey Diagrams and Lifecycle Workflow visualizations to track material batches linearly. If a specific "Processing" node drops 34.2% of its weight, the system instantly flags it as a Critical Anomaly Alert, allowing immediate intervention.

  2. Manual Data Entry & Friction
    The Problem: Factory floor workers, warehouse guards, and truck drivers hate filling out complex ERP software forms to log inbound/outbound weights. This leads to missing metadata and corrupted ledgers. The Aperio Solution: It utilizes an advanced Generative AI NLP pipeline. A warehouse manager can literally just type or dictate, "We received 500kg of PET from GreenCycle this morning," and the AI automatically extracts the Intent (Purchase), the Vendor (GreenCycle), the Quantity (500), and securely logs the transaction into the database tracking ledger in seconds without forms.

  3. Vendor Accountability & Compliance Validation
    The Problem: Regulators and downstream buyers need to mathematically prove that the end-product they purchase is genuinely recycled material, not mixed with cheaper virgin plastic. The Aperio Solution: It generates dynamic "Vendor Scorecards" based entirely on the historical quality and reliability of shipments, alongside a dedicated Carbon/CO2 Dashboard proving that integrating the specific recycled batch ultimately saved thousands of kilograms of CO2 vs. virgin material.

In short, Aperio replaces fragmented, delayed spreadsheets with a real-time, AI-driven digital twin of a recycling facility's absolute physical material flow!

Challenges we ran into

Technical Challenges Faced During Aperio Development

Developing a robust, full-stack Intelligent Traceability Platform for the Circular Economy presented several unique architectural and implementation bottlenecks. Below is a detailed breakdown of the major problems we faced and overcame:

1. Graph Topology & Data Visualization Failures

The Problem: The most complex UI component was the Material Flow (Sankey) diagram. Initially, the backend logic mapped inventory transforms into identical loops (e.g., Processing -> Processing), leading to topological circular reference errors.
The Impact: The data visualization library (Recharts and D3.js) critically failed and scattered the layout, drawing parallel lines instead of proper sequential supply chain ribbons.
The Solution: We entirely rewrote the data aggregation schema. We implemented a backward-traversing algorithm verifying parent_inventory_ids to ensure flows mapped exclusively to the previous distinct lifecycle stage, enforcing a strict chronological pipeline (Collection → Sorting → Processing → Output → Dispatch) without loops.

2. API Schema Disconnects & Pagination Faults

The Problem: During the integration phase, the MongoDB/FastAPI backend was upgraded to use paginated wrapper objects (e.g., { data: [...], items_count: 50 }), while the frontend hooks blindly expected flat arrays.
The Impact: The frontend crashed persistently with the runtime error TypeError: raw.map is not a function, crippling the Dashboards, Vendors, and Batches screens.
The Solution: We modified the Next.js fetchFromAPI fetchers in hooks.ts to actively scan the payload structure using Array.isArray() fallbacks and deep-extract nested schemas safely.

3. React Hydration & Temporal Dead Zone (TDZ)

The Problem: Moving the application to the cutting-edge Next.js 16 / Turbopack architecture exposed strict compiler behavior. Variables like kpiData were referenced in components before initialization, alongside script-tag injection clashes from the next-themes library.
The Impact: Severe hydration mismatches between the Server Component generation and Client-Side rendering, causing hard crashes (ReferenceError: Cannot access 'kpiData' before initialization).
The Solution: We implemented safe initialization ordering, manually overridden the ThemeProvider to suppress specific React 19 development warnings, and injected null-safety fallback schemas (?? {}) into all primary dashboard widgets.

4. AI Endpoint Instability & High Latency

The Problem: Operating an advanced Generative AI classification pipeline required high-uptime inference. However, our primary AI gateway encountered connection outages (HTTP 500) and model deprecations.
The Impact: Users attempting to log NLP supply chain commands via the Chat interface were blocked, defeating the core value proposition of natural language ledger tracking.
The Solution: In the featherless.py infrastructure module, we built a highly fault-tolerant backup adapter to automatically redirect payload routing to alternative APIs (Groq llama-3.3-70b-versatile), ensuring sub-second inference stability. Finally, for immediate offline presentation environments, we engineered a dedicated NLP Mock visualization pipeline tightly bound to the problem_statement_3 dataset.

5. Bridging Real-World CSV Garbage to UI Components

The Problem: The problem_statement_3 recycling dataset provided highly unstructured metadata across 13 varying process codes (PR, SEG, MB, WTR).
The Impact: If read natively, the system scattered 13 random nodes onto the UI graphs instead of the expected 5 core lifecycle pillars, leading to chaotic analytics.
The Solution: We engineered a custom Python normalization script (seed_dataset.py) to systematically ingest, analyze the string semantics in the remarks column, and mathematically consolidate the chaos down into matching frontend constants (Loss_kg, Collection, Warning Thresholds).

Discussion

Builders also viewed

See more projects on Devfolio