Technical Documentation
Introduction
RecycleQuest is a gamified web platform that makes recycling the fun and educational experience consumers are looking for. Centered around community engagement and social interaction, RecycleQuest revolutionizes the way individuals approach recycling and learning about environmentally friendly practices.
The Problem
Most Americans say they want to recycle, and most say they want to be more environmentally friendly. Yet Americans are still not recycling enough, and the impact is devastating to the environment. It is clear there is a disconnect between what consumers say they want and how they choose to recycle.
Survey respondents regarding consumer choices point to lack of convenience, time, and information about recycling as reasons why they didn’t recycle as much as they would have otherwise.
Source:
According to NIH research regarding consumer motivations for recycling, there is consistency among certain themes as obstacles to making informed recycling choices.
Top themes include:
lack of clarity about what can be recycled
lack of personal motivation due to inconvenience and perception relative to lack of importance
lack of program and incentives for recycling.
Source:
The Vision
Through gamification, RecycleQuest provides the answers consumers need by turning the act of recycling into an exciting and engaging competition. Tapping into both intrinsic and extrinsic motivations, this keeps users actively engaged in recycling practices while fostering a sense of unity through shared environmental goals.
By providing solutions to consumer needs, the result is tangible community engagement in recycling, which will lead to more recycled items overall and divert unnecessary waste from landfills. Source:
The Scope
RecycleQuest will make recycling….
Fun and Engaging:
Gamification helps make the process of recycling rewarding and learning exciting.
Timesaving and Convenient: RecycleQuest is a platform that makes it easy and convenient for users to recycle more and quickly educate themselves about environmentally friendly practices. Users can continually educate themselves through easily digestible tidbits provided by environmental experts. When users are ready to recycle, the RecycleQuest platform helps users quickly locate nearby recycling centers and drop-off points.
RecycleQuest provides…
Instant Clarity for Recycling Questions: Users can submit photos to find out instantly if their item is recyclable and chat with an integrated AI assistant to answer questions about how to prepare and sort their recyclables, and eliminating any confusion about what can and cannot be recycled.
Motivation and Incentivization:
Social engagement provides additional motivation and incentivization by allowing users to share their recycling successes and compare their actions to other players in the app. In addition to online interactions, users have the option to participate in additional social events promoting recycling and environmental awareness. As users take part in events, competitions, and challenges, they not only contribute to a cleaner environment but also foster a sense of collective responsibility.
Critical Insights via Recycling Data: The ability to quantify the environmental impact to the individual consumer using recycling data reinforces the importance of the act of recycling. Finally, the web platform's capability to gather data on consumption and recycling patterns provides valuable insights that can be used to influence environmental initiatives surrounding recycling.
Results: Most importantly, RecycleQuest focuses on data-driven results. Furthermore, we can point to where incentives and local recycling programs that suggest that a reward-based approach to recycling works:
For example, a bottle drop refund program in Oregon has been wildly successful, dramatically increasing the rate of bottle returns and diversion of plastics headed for landfills. We can see that rewards-based incentives work. Source:
NIH survey research outlines the focus of solutions which will encourage consumers to recycle more: “As recycling is simply not a priority for many individuals, efforts should instead be placed on providing greater scaffolding to make the process of recycling less tedious, confusing, and more habitual.” per NIH publication, May 2022. Source:
System Architecture and Components
Overview
The architecture of the RecycleQuest comprises a frontend layer responsible for user interaction, featuring the game board interface and leaderboard. This frontend communicates with the backend layer, powered by Ruby on Rails, managing user authentication, database storage using PostgreSQL, and integration with a web scraper for extracting recycling location data from an external source. A screenshot of a computer
Ruby on Rails Framework
The foundation of our web application is Ruby on Rails. Associations in place take advantage of Active Records and make the data easy to retrieve. Associations between the back and front end models take advantage of Active Record and easily retrieve data. Back-end users, questions, points, locations and sessions are set up with front-end controllers, serializers and routes.
Rails Setup
The installation and setup process for the Recycling Game Web Application involves configuring the Ruby on Rails framework to establish the backend infrastructure. This encompasses deploying the necessary gems, database initialization, and integrating user authentication functionalities, laying the foundation for seamless user interactions, game mechanics, and data management.
Model-View-Controller (MVC) pattern
According to the Model-View-Controller (MVC) pattern, we maintain a clear separation of concerns, enhancing maintainability and scalability throughout the application's lifecycle. The user interface is set up using React, integrating dependencies, initializing state using useState, and utilizing the useContext hook for global state management.
User Authentication
A React post request is used to confirm that the user’s username and password matches what is in our database. The user is then logged into the website and a session is created. This session (cookie) remains until user logs out of website.
Database Schema
Since a relational database schema is the most suitable choice due to its compatibility with the Active Record ORM (Object-Relational Mapping) framework that comes bundled with Rails, we are using a PostgreSQL database which is running on Render. This supports our Ruby on Rails models and allows our web application to be pliable. New users can be added, new sessions can be started, and users’ scores will persist.
Users contribute to available recycling data by using the app and entering data, which is then stored in the database and database backup.
Location Finder
An external web scraper scrapes HTML data from an external site and exports a json file which is stored in our database. HTML data is parsed and the front end displays a list of the top three nearest locations to the client.
Built With
- postgresql
- react
- ruby-on-rails
- webscraper
Log in or sign up for Devpost to join the conversation.