Skip to content

Empowering sustainable living with ReVibe: Track your waste reduction journey and earn rewards by scanning reusable items at partnered shops!

Notifications You must be signed in to change notification settings

TishaJhabak1014/ReVibe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 

Repository files navigation

ReVibe

To run the code, navigate to the revibe folder and type 'flutter run' in the terminal.

Data Model

Designing the data model for your Waste Reduction Tracker app:

Entities:

  1. User:

    • UserID (Unique identifier)
    • Username
    • Email
    • Password (Hashed and salted)
    • GooglePayLink (Link to the user's Google Pay account)
  2. Reusable Item:

    • ItemID (Unique identifier)
    • ItemType (e.g., Coffee Cup, Straw, Smoothie Cup, Takeaway Box)
    • Assets (Image etc)
  3. Shop:

    • ShopID (Unique identifier)
    • ShopName
    • Location (Latitude and Longitude, Address, etc)
    • Category (e.g., Cafe, Restaurant)
    • AccumulationThreshold (Total points required for a discount)
    • DiscountAmount (Amount of discount for a certain threshold)
    • NGOList (List of NGOs (IDs) partnering with the shop)
  4. Transaction:

    • TransactionID (Unique identifier)
    • UserID (Reference to the user making the purchase)
    • ShopID (Reference to the shop where the purchase is made)
    • ScannableBarcode (Generated by concatenating UserID and ItemID for scanning)
    • PointsEarned (Points earned for the transaction)
    • DonationOption (Boolean indicating whether the user opted for donation) if applicable
    • DonationAmount (Amount donated if donation option is selected) if applicable
  5. NGO:

    • NGOID (Unique identifier)
    • NGOName
    • Cause (e.g., Reforestation, Hunger)
    • Advertisement (Information about the NGO's cause and promotion)

Relationships:

  • User-Transaction: One-to-Many relationship. A user can have multiple transactions, and each transaction is associated with one user.

  • Shop-Transaction: One-to-Many relationship. A shop can have multiple transactions, and each transaction is associated with one shop.

  • Shop-NGO: Many-to-Many relationship. A shop can partner with multiple NGOs, and an NGO can partner with multiple shops.

  • Shop-ReusableItem: Many-to-Many relationship. A shop can accept multiple types of reusable items, and each reusable item is associated with any shop.

  • User-ReusableItem: Many-to-Many relationship. A user can have multiple reusable items, and each reusable item is associated with any user.

Additional Points Configuration for Each Shop:

  1. ShopPointsConfiguration:
    • ShopID (Reference to the shop)
    • ItemID (Reference to the reusable item)
    • PointsConfig (Customized points for each reusable item type)

Display Information for the Shop:

After a user scans an item at the shop, the shop can retrieve the user's identity and the scanned item(s) using the ScannableBarcode in the transaction record.

This model ensures that each user has a unique identity, and the scannable barcode is generated based on the concatenation of the user ID and item ID. Shops can have their own points configuration for different reusable items, and the transaction records will capture the relevant information for reporting and display at the shop's end.

Wireframes

Figma

About

Empowering sustainable living with ReVibe: Track your waste reduction journey and earn rewards by scanning reusable items at partnered shops!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published