Adriano CruzEN/ES
Projects

SIDRU

Digital Incentives System for Urban Recycling

Thesis, UPC, 2025 – 2026

A smart container that recognises and weighs the recycled material and returns a reward to the user as a real token, with the operation recorded on-chain.

The problem

Urban recycling rarely offers an immediate, verifiable incentive, which keeps participation low.

My role

I designed and integrated the backend and orchestrated the communication between the container, the database, the blockchain and the mobile app.

Features

  • Material detection and weighing with sensors on the ESP32.
  • Publishing the readings to the backend over MQTT.
  • Validating and persisting every operation in PostgreSQL.
  • Recording value in an ERC-20 token on Polygon with Web3j.
  • A Flutter app with QR scanning and reward lookup.

Architecture

The ESP32 firmware publishes its sensor and session readings over MQTT. The Spring Boot API (Java 21, DDD, JWT) consumes and processes those messages, persists to PostgreSQL and integrates an ERC-20 token on Polygon through Web3j. The Flutter app talks to the API and handles the QR and reward experience. Everything runs on an Azure VM with Docker.

Challenges

Getting hardware, backend and blockchain to work as a single reliable flow, with JWT authentication and a reproducible Docker deployment on Azure.

Outcome

A working end-to-end system, run with Scrum across four sprints.

Stack

Java 21, Spring Boot, PostgreSQL, MQTT, Docker, Azure, JWT, DDD, Web3j, Polygon, Flutter, ESP32

GitHub