
From Waste to Worth: Building Scrap Setu, an AI-Powered Recycling Platform on AWS
A student-led hackathon project connecting households and scrap collectors through smart pickup scheduling, Gemini AI, and real-time dashboards. Discover how we deployed it using AWS Lightsail, Docker, FastAPI, and HTTPS, and our roadmap for scaling across cities.
Introduction: The Problem We Wanted to Solve
Every day, households generate recyclable waste such as paper, plastic, cardboard, metals, and electronic scrap. Yet, selling or responsibly disposing of these materials is still inconvenient for many people.
Customers often struggle to find reliable scrap collectors, understand approximate scrap prices, and schedule pickups. Meanwhile, local collectors face challenges discovering customers, organizing requests, and managing collections efficiently.
What if we could connect both sides through one digital platform?
That question inspired us to build Scrap Setu, an AI-assisted scrap collection and recycling platform developed as part of our DTU Hackathon project.
Our mission is simple:
Turn waste into worth by connecting households, scrap collectors, and the recycling ecosystem through technology.
And to make Scrap Setu accessible beyond our local development environment, we deployed it on Amazon Web Services (AWS).
Introducing Scrap Setu
Scrap Setu is a web-based platform designed to simplify the scrap collection process while encouraging responsible recycling and reuse.
Rather than relying entirely on traditional, unorganized collection methods, our platform introduces a digital workflow connecting customers and collectors.
Key Features
1. Smart Scrap Pickup Booking
Customers can create pickup requests by selecting scrap categories, providing estimated quantities, entering locations, and scheduling collections.
2. Dedicated Collector Dashboard
Collectors can view available requests, accept pickups, access relevant details, and track their collection activity.
3. AI-Powered Scrap Recognition
We integrated Google's Gemini API to analyze uploaded photographs and assist users in identifying recyclable materials.
The scanner also provides reuse suggestions, helping users think about recycling and upcycling possibilities.
4. Google Authentication
Google Sign-In offers an additional authentication option alongside conventional account registration.
5. YouTube Tutorial Integration
The platform integrates YouTube content to introduce users to DIY reuse projects and recycling ideas.
6. Scrap Price Information
Users can view indicative scrap prices, making the selling process more transparent.
7. Administrative Dashboard
An administration interface supports management of platform records and scrap pricing.
Together, these features transform Scrap Setu from a simple information website into an interactive recycling platform.
Our Technology Stack
We chose technologies that allowed us to develop rapidly, integrate external services, and deploy a functional MVP within hackathon constraints.
Layer | Technology |
|---|---|
Frontend | HTML, CSS, JavaScript |
Backend | Python, FastAPI |
Database | SQLite |
AI integration | Google Gemini API |
Authentication | Application login, Google OAuth |
Educational content | YouTube API |
Containerization | Docker, Docker Compose |
Cloud hosting | Amazon Lightsail |
Reverse proxy and HTTPS | Caddy |
DNS | DuckDNS |
Using FastAPI allowed us to create the backend APIs handling authentication, pickup requests, scrap information, and integrations.
Docker helped package the application into a reproducible deployment environment.
The next challenge was moving the project from local development to the cloud.
Why We Chose AWS
For our hackathon MVP, we needed a cloud solution that was practical, affordable, and manageable within a short development period.
We chose Amazon Lightsail, a simplified virtual server offering within AWS.
Lightsail gave us the infrastructure required to run our Python backend, serve the frontend, manage Docker containers, and expose the application through a public IP address.
Our initial server configuration included:
- Ubuntu 24.04 LTS
- 1 GB RAM and 2 vCPUs
- 40 GB SSD storage
- Public IPv4 connectivity
- Docker and Docker Compose
We selected the approximately $7/month instance plan for the initial deployment.
This was an economical choice for an MVP, although it is not intended to support large-scale production traffic without further improvements.
How Our AWS Deployment Works
Our deployment follows this architecture:
Plain text
Customers / Collectors|vHTTPS Website|vDuckDNS|vAWS Lightsail|Caddy Proxy|vFastAPI App|vSQLite Database(Docker Volume)External Integrations:- Google Gemini- Google OAuth- YouTube API
Caddy manages the public-facing HTTPS connection and forwards requests to the backend application.
The database is stored using persistent Docker volume storage, allowing application records to survive ordinary container restarts and replacements.
Challenges We Faced During Deployment
One of the most valuable parts of this project was learning how real deployment differs from running an application locally.
Challenge 1: Limited Server Resources
Our Lightsail instance came with 1 GB of RAM.
Although this was sufficient to begin our deployment, Docker image builds and Python dependencies placed additional demands on memory.
To improve stability during builds, we configured an additional 1 GB of swap space.
This helped us work within the constraints of a small cloud instance, although swap cannot replace physical RAM for sustained production workloads.
Challenge 2: Making the Website Publicly Accessible
Initially, our application worked within its Docker environment but was not reachable through its intended public HTTPS address.
We discovered an important networking configuration issue: HTTPS port 443 had been allowed for IPv6 traffic, but not IPv4 traffic.
After correcting the Lightsail firewall rule, the website became accessible through its public domain.
This experience taught us that successful container deployment is only one part of delivering a working cloud application.
DNS resolution, firewall rules, reverse proxies, and TLS certificates also matter.
Challenge 3: Google Authentication Configuration
After moving to our public domain, Google Sign-In initially returned an OAuth origin mismatch error.
The solution was to register our production HTTPS domain as an authorized JavaScript origin in Google Cloud.
This reinforced the importance of configuring external authentication providers for the correct production environment.
Challenge 4: Gemini API Quota Limits
During scanner testing, our backend received an HTTP 429 response from Gemini, indicating that the relevant API quota had been exceeded.
We investigated API credentials, model configuration, and usage limits to troubleshoot the integration.
This highlighted an important lesson: external API integrations require more than valid credentials. Rate limits, quota availability, and graceful fallback behavior are essential considerations.
Challenge 5: Website Performance
Our original homepage included a large background video of approximately 61 MB.
Loading this asset could significantly affect perceived performance, especially on slower connections.
We optimized the video to approximately 1.5 MB and adjusted its loading behavior.
This demonstrated that frontend asset optimization can be just as important as backend infrastructure when improving the user experience.
Making Scrap Setu Accessible Online
After configuring our AWS environment, we connected the application to a branded subdomain.
With HTTPS enabled, our application can be accessed through modern desktop and mobile browsers without installing additional software.
We also tested the core customer and collector workflows along with the platform's external integrations.
Getting the application online was an important milestone, but our long-term goal goes beyond deploying a working prototype.
Future Scalability: From a Hackathon MVP to a Multi-City Platform
Our current architecture is designed for demonstration and early testing.
However, we envision Scrap Setu eventually supporting larger communities, more collectors, and a growing volume of pickup requests.
To reach that stage, we would progressively evolve the architecture.
Phase 1: Improve Reliability and Database Scalability
Our current SQLite database is suitable for a small MVP, but horizontally scaling backend instances would require a different approach.
We plan to migrate to PostgreSQL using Amazon RDS, enabling a more robust database architecture for larger workloads.
We also want to improve automated backups, recovery procedures, monitoring, and security controls.
Phase 2: Container Orchestration and Traffic Scaling
As user traffic increases, we could move our containerized FastAPI backend to Amazon ECS, potentially using AWS Fargate.
An Application Load Balancer and service autoscaling could then distribute traffic across multiple application instances.
This would make it possible to scale backend capacity according to demand.
Phase 3: Optimize Content and AI Processing
We plan to introduce Amazon S3 for storing user-uploaded images and other media assets.
Amazon CloudFront could improve static content delivery and reduce unnecessary load on backend servers.
For AI workloads, asynchronous processing and request queues could help manage traffic spikes and external API limits.
Amazon CloudWatch could provide application monitoring, logging, and alerts.
These are planned improvements, not services already running in our current MVP.
Phase 4: Expand Across Cities
Our longer-term product roadmap includes:
- Location-aware matching between collectors and customers.
- Pickup route optimization.
- Partnerships with verified recyclers and recycling facilities.
- Digital payments and transaction records.
- Improved AI recognition of recyclable materials.
- Recycling analytics and impact reporting.
- Regional expansion based on successful local pilots.
Rather than immediately creating expensive infrastructure, our approach would be to scale progressively as actual demand and usage grow.
Sustainability and Potential Impact
Scrap Setu aims to create value for three important groups.
For households: A more convenient way to identify scrap materials, understand approximate prices, and arrange collections.
For collectors: Better access to pickup opportunities and digital tools for managing daily activity.
For the environment: Increased awareness of responsible recycling, reuse, and material recovery.
In future pilots, we aim to measure real outcomes such as successful pickups, material quantities collected, recycling partner participation, and customer retention.
We believe measurable impact, rather than assumptions alone, should guide the platform's growth.
What We Learned as Student Developers
Building Scrap Setu taught us several lessons beyond writing code.
We learned how to containerize an application, deploy it on AWS, configure networking and HTTPS, troubleshoot cloud resource constraints, and manage third-party API integrations.
More importantly, we learned the difference between building a working feature and making that feature reliable in a publicly accessible application.
The development journey involved debugging, experimentation, deployment failures, performance improvements, and teamwork.
These experiences made the hackathon valuable not only as a competition but also as an opportunity to understand real-world software engineering.
Conclusion: Connecting Waste With Worth
Scrap Setu started with a simple observation: households and local scrap collectors could benefit from a more accessible and organized recycling system.
Through our hackathon project, we transformed that idea into a deployed web application with pickup management, AI-assisted scrap recognition, and dedicated customer and collector workflows.
AWS Lightsail helped us move the project from a local environment to a publicly accessible application while keeping our initial infrastructure manageable.
Our next steps involve improving reliability, validating real-world demand, building stronger recycling partnerships, and preparing the architecture for growth.
Our vision is to make recycling more convenient for households, more organized for collectors, and more meaningful for communities.
Scrap Setu — The Bridge Between Your Raddi and the Recycler.
Built as a student-led project for the DTU Hackathon.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article