As a team, we noticed that although many new map technologies have come out, there is still vital information missing from these applications that are useful to society. The first thing that came to our mind was garbage cans. All litter is created in one way: improper use of disposal. Most of the time, there is always a trash can near you. With this idea in mind, our goal was to create an easy way to locate the nearest trash can to prevent someone from littering.

What it does

Earthlings is an android-based application that will show you the location of all garbage cans. When launching the app, you will be greeted by a map displaying every garbage bin on it. Upon clicking on a garbage can, you can click on the "Show Compass Directions" button in order to display an arrow in the direction of the garbage bin. If a user finds a garbage can not already in the app, they can easily add it by simply clicking the + button in the bottom right, taking of photo of it, and waiting for it to appear at their location.

How we built it

We built both a frontend and a backend to this app. For the backend, we made it in Java. We used Javalin for our backend framework, as it is lightweight and one of the best REST backend APIs for Java. The backend is responsible for storing all garbage can data, and it also interacts with our database. Our database used Sql2o for connection and query processing and uses PostgresSQL for database storage. The frontend is made using React Native and is written in JavaScript. It communicates with the backend for all information regarding garbage cans.

Challenges we ran into

For the backend, we ran into some generics problems with our DAOs. At first, we attempted to make a generified version of our SQL dao; however, it wasn't possible because of the limitations of Java generics & Sql2o. In addition, it required a Class<T> to execute some methods, which generally is not possible to obtain with just the generified class. We had some trouble getting the arrow to point in the direction of the trash can for the front end. This was definitely a challenge, and in the end, it wasn't perfect, but we still managed to get it working.

Accomplishments that we're proud of

One of our most significant accomplishments in this Hackathon is the compass feature in our app. It was the most challenging process of the Hackathon, and it took a lot of work to get it right. However, this is also one of the critical parts of the app, and so this is also why we spent a lot of time on it.

What we learned

During this project, all of us learned a lot about working in a team environment. This includes how to more effectively use tools such as Git for collaboration and how to effectively split up work and communicate our decisions. In addition, members of our team learned about technologies such as PostgreSQL, React Native, and Javalin.

What's next for Earthlings

Littering is not the only community problem in our society. We built our app in an extendable way and could definitely include other community items such as public bathrooms or diaper changing stations. Much communal paraphernalia often goes unused - so an app like this could be extended to cover the simple essentials.

Share this project: