Inspiration
Our inspiration for EcoSwitch stems from the increasing awareness of the public about the importance of sustainability. We’ve known that climate change is a huge issue that has the potential to devastate ecosystems and disrupt our way of life, and we are seeing its effects now more than ever. As a result, individuals are now thinking about their personal habits and the ways in which they may impact the environment. One of the biggest contributors to climate change and wastage is the culture of consumerism – it is easier and more convenient than ever to buy goods, whether that is food, clothing, entertainment, or other items. In order to reduce negative environmental impact, it is crucial that consumers understand the hidden environmental costs of their purchases. We wanted to create a tool that makes it easier for people to learn about the environmental impact of the products they use. By providing transparent information on a product's carbon footprint and offering suggestions for more sustainable alternatives, we aim to empower consumers to make informed, sustainable choices. Our platform helps users not only understand the emissions associated with products but also suggests sustainable options that align with their values. With EcoSwitch, we hope to bridge the gap between intention and impact, supporting individuals who wish to lead more sustainable lifestyles by giving them the information they need to make greener choices.
What it does
EcoSwitch provides three key functionalities: product scanning, sustainability grading, and alternative recommendations.
- Product Scanning: Users can access our website and scan the barcode of any product. Once the barcode is scanned, our system runs it through an API to retrieve essential data about the product, including its manufacturing processes and environmental impact.
- Sustainability Grading: After gathering product information, we calculate a sustainability metric to assign the product a letter grade from A to F— where A represents the most sustainable products, and F represents the products with the harshest environmental impact. This grading system simplifies sustainability for users, allowing them to understand the environmental impact of a product at a glance. This grade is based on the monetized environmental impact of the firm's operations divided by its revenue.
- Alternative Recommendations: In addition to the grade, we provide relevant news about the product and suggest a more sustainable alternative. These recommendations empower users to make greener choices, supporting a lifestyle that aligns with their values of environmental consciousness.
How we built it
EcoSwitch was built primarily with TypeScript and JavaScript. We began by developing a static landing page to introduce users to our platform. From there, users can navigate to the scanner page, where they can access their camera to scan a product’s barcode. When a barcode is scanned, the image is processed and sent to our API to extract the unique barcode ID, which is then entered into the BarcodeLookup API. This API provides us with detailed product information, including the manufacturer and relevant product details. Using this data, we developed a custom metric to assign each product a sustainability grade from A to D, with A indicating the most sustainable products and D the least sustainable. To enhance the grading process, we employ a web scraper to gather recent news related to the product’s manufacturing practices, offering users transparency into the product's environmental impact. Additionally, we use this information to suggest a more sustainable alternative, helping users make eco-friendly purchasing decisions.
Challenges we ran into
We faced many challenges while working on EcoSwitch, but we were able to persist through them to come to our finished product. One of our biggest challenges was working with OpenAI's API: we only had a set number of tokens, which were used each time we ran the program, meaning we couldn't test the program too many times. Also, many of our team members were new to using TypeScript and Next.js, but we found that its similarities with JavaScript helped us adapt to the new language. A final challenge we faced was working with the database in SQLite and Node.js – though many of our team members were only familiar with working with databases in Python, we were able to adapt our skills to our tech stack.
Accomplishments that we're proud of
We were very proud to be able to integrate APIs into our project. We learned how to use them in different languages, including TypeScript. By integrating various APIs, we were able to streamline processes, improve functionality, and deliver a more dynamic user experience.
What we learned
We learned a lot about adapting our current skills to new tech stacks, including implementing the logic of searching through databases with Python into SQLite and React.js.
What's next for EcoSwitch
We'd love to continue to implement new features for EcoSwitch - for example, we want to implement a greater degree of fact-checking to ensure that the sustainability information is accurate and up-to-date.
Built With
- javascript
- next.js
- openai-api
- react.js
- sqlite
- typescript
Log in or sign up for Devpost to join the conversation.