AWS Builder Center

I Knew Nothing About AWS or Teamwork Until KabadiWala Happened

A hackathon app for e-waste collectors turned into my crash course in backend work, cloud services and working with a team. This is what I built, what I got wrong, and what stuck with me.

Let me be honest, when this hackathon began, I had no idea what AWS was and how to work in a team. I could code a little. Somehow, we got to the point where we have a working app people can use and I learned tonnes in this process.
What we were trying solve
Think about what happens to your old phone, broken charger or tangle of wires. Most of us bin this at the local kabadiwala and forget about it. The law says e-waste has to reach an authorised recycler, but in practice a lot of this passes through a number of informal hands first. These people aren't villains - they're trying to earn a living. But the collector doesn't know how to reach a certified recycler and what the going rate is. The recycler can't find collectors. No one meets.
We created Kabadiwala. A collector lists what he has and sees nearby certified recyclers and their rates. He picks one and is given a code and a QR code as proof of handover. It works in English, Hindi and Marathi so he can use it in his own language.
My contribution: the backend
Most of my effort went into the backend, which most people don't see when they open the app.
I've been adding more routes and logic to our Express app, extended the SQLite database layer and server setup and written some 287 lines of smoke tests. Taken together, this constitutes an update of some 1,448 lines. I think the tests are the most important part of this contribution. Writing tests was tedious but they enabled me to make changes without the nagging fear of breaking something.
The language bugs that mattered more than they appeared
Our whole idea rests on the ability of the user to read this in his own language, so two bugs relating to languages stood out for me. First, when switching languages, some tabs hadn't updated their content completely. I fixed this. Second, the app wasn't defaulting to the right language, so I fixed this, too. Minor as they may seem, these bugs could render the app useless to a collector who can't read it.
Me and AWS:
This part was scary, because I had no background in AWS. I built our SNS and SES setup.
SNS lets us know when a help request is submitted so we don't have to keep checking the app. SES emails the collector a receipt once a payment has been received. Many collectors are wary of paperwork, so we wanted to give them something in writing, simple and clean.
I wrote the AWS service module, added the dependencies, connected the backend and updated the tests. I learnt that our server communicates with AWS via an IAM role; there are no access keys embedded in our code. A vital lesson, since one leaked access key can be a nightmare to track down and revoke.
As mentioned, SES is still in sandbox mode on our account, so it only delivers to verified email addresses. Working code and production-ready code aren't the same thing, a lesson I learned the hard way as well.
The insights into teamwork
I used to think of projects as solo activities. It's a question of dividing up the work so that no one person has to do everything, trusting one's teammates and being trusted by them in turn. The backend had to work with the frontend and vice versa; it's of little use if one part of the app can't communicate with the other. Another lesson I learned was to communicate early and often, since misunderstandings can lead to hours of frustration.
There's a funny side to this. My work on SNS and SES ended up in the repo under Pratik's commit, with a note saying I had written it. A year ago I would have pounced on this, but now I just think of the app, our work and how it's all coming together.
What's next
We're aiming to build kabadiwala-hub, a site where shops and collection points aggregate many small lots of e-waste so recyclers can get bigger volumes, cutting transport costs. We still have to engage more small-time collectors since one shop can't represent all.
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