Giter VIP home page Giter VIP logo

ptrpfa / plogathon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from skyish242/plogathon

0.0 0.0 0.0 77.92 MB

Cross-platform mobile application designed to revolutionize waste management and promote recycling through plogging, an exercise that combines both jogging and picking up litter.

Shell 0.17% JavaScript 0.58% Ruby 0.13% C++ 1.12% Python 0.81% C 0.07% Objective-C 0.01% Kotlin 0.01% Dart 10.94% Swift 0.14% HTML 0.24% CMake 0.90% Jupyter Notebook 84.83% Dockerfile 0.06%

plogathon's Introduction

image

Table of Contents

  1. Meet the Team
  2. Overview
  3. System Architecture
  4. Features
  5. Demo
  6. Repository Structure
  7. Getting Started

Plogathon Team

Group 21

  • Pang Zi Jian Adrian
  • Peter Febrianto Afandy
  • Muhammad Nur Dinie Bin Aziz
  • Tng Jian Rong
  • Lionel Sim Wei Xian
  • Ryan Lai Wei Shao

Overview

Plogathon is an innovative mobile application designed to revolutionize waste management and promote recycling through plogging - an exercise introduced in Sweden back in 2016 that combines both jogging and picking up litter. Despite the increased interest of plogging in Singapore, activities are currently organised using manual means such as Facebook groups. Plogathon aims to streamline this process to promote the adoption of plogging, together with recycling.

Plogathon integrates cutting-edge technologies to guide users to nearby recycling bins for proper waste disposal, as well as machine learning to determine the recyclability of items in real-time during plogging sessions. The mobile application is developed using Flutter to provide a seamless mobile experience, and leverages on cloud-native computing for efficient data processing.

Plogathon aligns with several of the United Nations' Sustainable Development Goals (SDGs), fostering a cleaner planet and advocating for good health and personal well-being.

Goal Implementation
drawing Good Health and Wellbeing
Plogathon encourages users to engage in physical activities such as running while also cleaning up the environment. Regular physical activity is essential for maintaining good health and preventing various diseases, including heart disease, stroke, diabetes, and various types of cancer. By motivating users to get active outdoors, Plogathon can contribute to improved physical health.
drawing Quality Education
Through Plogathon, users not only participate in physical activities but also learn about recycling and proper waste disposal. When they take photos of recyclable items, Plogathon classifies them and provides information on how to correctly recycle each item. This educational component helps users understand the importance of waste segregation and recycling, fostering environmental stewardship.
drawing Responsible Consumption and Production
Plogathon promotes responsible consumption and production by encouraging users to pick up and properly dispose of litter and recylables. By teaching users how to recycle various materials correctly, Plogathon helps reduce waste and promote recycling, leading to more sustainable consumption patterns. Moreover, by highlighting available recycling bins, Plogathon makes recycling more accessible and convenient, encouraging users to incorporate waste reduction practices into their daily lives.
drawing Climate Action
By reducing litter and promoting recycling, Plogathon helps decrease the amount of waste that ends up in landfills and incinerators, which are significant sources of greenhouse gas emissions. Moreover, by fostering a culture of sustainability and environmental responsibility, Plogathon can inspire users and communities to adopt more eco-friendly practices in other areas of their lives, contributing to broader efforts to combat climate change.

Join us in creating a Cleaner World for tomorrow, One stride at a time!

System Architecture

Plogathon adopts a microservices-based architecture for better scalability, reliability and performance. It consists of three microservices that are orchestrated together using Docker, and Kubernetes. These microservices work in tandem to support the Plogathon mobile application's operations.

These microservices include:

  • Activity Microservice (For Strava operations)
  • User Microservice (For user authentication and CRUD operations)
  • Classifier Microservice (For machine learning classification of items' materials and their recyclability)
architecture

Features

Microservices-based Architecture
Plogathon's adoption of a microservices-based architecture for its backend infrastructure provides several strategic advantages in terms of reliability, scalability, and overall system efficiency. Communication between the frontend and both the user and activity services employs gRPC, while HTTP is utilized for the interaction between the frontend and the classification service.

Cloud-Native
Google Kubernetes Engine (GKE) by Google Cloud facilitated the hosting of our Cloud Native Kubernetes Deployment, enabling rapid cluster creation and deployment. Leveraging the cloud platform, it offers centralized server development for the Plogathon project, particularly advantageous for developing mobile Flutter applications where mobility is essential for testing. This approach enhances collaboration and efficiency within the development team.

Integration with Google's Direction Service API
Google's direction service API is integrated into Plogathon to provide navigation to the nearest recycling bin locations. Leveraging on the robust capabilities of Google Maps API, it calculates the optimal plogging path to guide users towards designated recycling bins where they can recycle materials. Additionally, users can view nearby bins plotted as markers on the map before commencing the plogging activity. During plogging, after picking up a recyclable material, users can also opt to reroute to the nearest bin, enhancing user experience.

Community Engagement (Integration with Strava)
Strava is one of the most popular applications used for tracking users' physical activity. Plogathon supports Strava Single Sign On (SSO) login to allow users to track and share their plogging activities onto Strava. A Plogathon club has been created in Strava to allow users to initiate group activities and to further engage the community.

Recyclability Classifier (Machine Learning)
The recyclability classifier is aimed at improving users’ recycling knowledge and educating them on what is recyclable. It takes in an image of a potential recyclable provided by the end user, and outputs the item’s recyclability and proper waste disposal instructions. It consists of two components, the Object Material Type (OMT) classifier, as well as recyclability evaluator. These components work in tandem to provide users with up to date recycling knowledge, educating and aiding them in performing proper waste disposal.

Presentation and Demo

To see a walkthrough and demonstration of Plogathon, click here, or scan the QR code below!

QR Code

Repository Structure

Docker/ (Docker and Kubernetes files)

plog-activity-service/ (code for Activity Microservice)

plog-classify-service/ (code for Classification Microservice)

plog-user-service/ (code for User Microservice)

plogathon/ (code for Flutter-based mobile applciation)

plogathon.sql (SQL migration file for Plogathon's database)

README.md (this file)

Getting Started

Database Migration

To setup your own MySQL database for this project, follow the instructions below:

  1. Ensure that you have MySQL installed on your computing environment. Install MySQL here.
  2. Run the following command to import the empty MySQL database that has the necessary tables for Plogathon:
    mysql -u<username> -p < plogathon.sql
    
    This command will automatically create the plogathon database schema. If you plan on using a different schema (ensure that it is created), run the following command instead:
    mysql -u<username> -p <schema name> < plogathon.sql
    

Flutter

  1. Follow the instructions to install Flutter.

  2. Install (Git LFS)

  3. cd into plogathon folder

    cd plogathon
    
  4. Copy config file

    cp env/config-example.json env/config.json
    
  5. Edit env/config.json and add google maps api key

  6. Install dependencies

    flutter pub get
    
  7. Select your device and run flutter referencing the config file

    flutter run --dart-define-from-file env/config.json
    
  8. (Optional) To run in release mode

    flutter run --dart-define-from-file env/config.json --release
    

Kubernetes Deployment

Disclaimer: This deployment requires a cloud server to provide external endpoints to the 3 core services. Suggestion: Google Kubernetes Engine(GKE)

Prerequistes

  • Have Helm Installed
  • Have Kubernetes and Docker Installed
  1. Package Helm Chart for deployment
    helm package Docker/PlogChart
    
  2. Install and Deploy
    helm install <name-of-deployment> <packaged-file-name>.tgz
    

Ports and IP Addresses on Google Kubernetes Engine

Archived and stored

Configuration and Environment Variables

Variables are stored in Config Map and Secrets in the Kubernetes Cluster

plogathon's People

Contributors

skyish242 avatar lionel-sim avatar ptrpfa avatar dinieaziz avatar jrrzz avatar rynshao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.