AWS Builder Center
SmartSort: Where Waste isn't Waste, It's Inventory

SmartSort: Where Waste isn't Waste, It's Inventory

A marketplace where recyclable waste is identified from a photo, priced, and sold to verified recyclers. Built on AWS. Building a Waste Trading Platform for Urban Recycling on AWS Built for the First Commit hackathon, Ship It track. By Team Oppenheimer.

The problem

Cities produce plastic, paper, cardboard, metal, glass and e-waste every day, and much of it that could be sold ends up in the trash. The people holding the waste can't tell what a load is, what it's worth or who wants it. Recyclers have the opposite problem: they need steady, known supply and have no transparent place to find it. Nobody measures what was diverted.
We built SmartSort around one idea: waste isn't waste, it's inventory.

What SmartSort does

SmartSort began as a waste-classification and facility-finder prototype. It grew into a marketplace where:
  1. A user photographs the material and AI tags it, with a confidence score.
  1. SmartSort ranks verified recyclers nearby by distance, accepted materials and price per kg.
  1. The user publishes a priced listing with quantity in kilograms and a pickup point.
  1. Recyclers browse, filter and bid, and each trade moves through six stages: listing, offer, acceptance, pickup, collection and payment.
  1. Impact is reported like a business metric: tonnes diverted, CO2e avoided and recovery rate.

Architecture

The whole thing is serverless and defined in one AWS SAM template.
  • AWS Amplify hosts the React and TypeScript frontend.
  • Amazon API Gateway exposes an HTTP API. Seven AWS Lambda functions written in TypeScript sit behind it.
  • Amazon Cognito handles sign-up and sign-in. The API's JWT authorizer protects the routes for creating and viewing your own listings.
  • Amazon DynamoDB holds the recycler registry and the listings. A secondary index on the owner makes "my listings" a fast query.
  • Amazon S3 stores listing photos.
  • Amazon Rekognition classifies the material in the photo.
  • Amazon Location Service draws the pickup-zone map in the browser.
  • CloudWatch, CloudTrail and IAM cover logs, audit history and per-function permissions.

Decisions we're glad we made

Ownership comes from the token, not the request. When you create a listing, the owner ID is taken from the verified JWT. Nothing in the request body can change who owns it.
Cost and privacy guardrails from day one. The paid AI route has its own stricter throttle, so abuse of free routes can't inflate the bill. A monthly budget alarm is part of the stack, and uploaded photos expire after 30 days because they can contain incidental personal information.
Pinned CORS. Only two explicit origins are allowed, with no wildcards.

What went wrong, and what we learned

Bedrock access was blocked. We first classified images with Amazon Nova Lite on Bedrock, but model access wasn't available in our account. Because the classifier sits behind a single template parameter, we switched to Rekognition with no code change. The Bedrock path is still there if access returns.
An authorizer that can't be edited in place. CloudFormation silently skips some JWT authorizer changes on an HTTP API. If the configuration changes, you have to give the authorizer a new logical ID and redeploy. We now check it with the AWS CLI after each change.
"Authentication is not configured in this build." Our first deploy taught us that Vite bakes environment variables in at build time. Setting the Cognito IDs in Amplify does nothing until you redeploy.
Infrastructure as code paid off. Our original backend account went away, and we rebuilt the entire backend in a new one from a single template. That would have been days of console clicking otherwise.

What's next

  • Real payment and escrow settlement, since pickup confirmation is UI-only today.
  • A recycler verification workflow beyond the curated registry.
  • Better impact reporting from real weight-slip data.

Try it

 #AWS #Serverless #Sustainability #Hackathon 
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article