Inspiration

Everyday, more people fall prey to impulsive purchasing as it is becoming increasingly difficult for them to distinguish between regular behaviour and emotions as they are viewing other users normalizing things like overconsumption on social media. It is a growing problem that takes on many faces such as influencing and de-influencing trends, brand placements, evolved marketing campaigns and so much more. However, many researchers posits that this is due to a user’s social media intensity. Team Swayed believes that a user should not be subjected to certain activities whilst using social media as it may have a long lasting effect on their mental health.

What it does

Swayed is an innovative web application that consolidates real and verified customer reviews from multiple platforms, generating an average sentiment and insightful comments on products. It empowers consumers to make informed purchase decisions, particularly for products they have been influenced to buy, potentially saving them from regret and remorse. On the other hand, users (like influencers) can subscribe to access product insights, verified reviews, and even request additions to the product database. Swayed capitalizes on the prevailing trend of influencing and deinfluencing on social media, guiding users to conduct their own research or simplifying the process without undermining the importance of genuine research efforts.

How we built it

The Swayed web application was built with MongoDB Atlas and MongoDB Compass as its primary database provider and integrated the Google Cloud Natural Language API for sentiment analysis and text generation. Through the Google Cloud SDK Shell, Swayed was also deployed using the Google App Engine tool. Other tools were tried, tested and utilized for the required functions. Thus, a brief overview of how these were utilized are:

  1. Designing the User Interface and Frontend: The team began by designing a very simple yet intuitive and user-friendly UI that allows users to search for products, view average sentiment scores, and read insightful comments and reviews. We wanted to keep it simple as we want the use to jump onto the application, search for the product and get the information with little efforts and confusion. Figma, Html, CSS, Python and JavaScript was utilized.
  2. Set up MongoDB Atlas and Compass: We created a MongoDB Atlas account following tutorials found online and a test cluster was used to define the data schema so the set up of a database with numerous important collections to store product insights (Name, Brand, Manufacturer, Dimensions, Weight, Description as well as the AI generated data), customer reviews (Star Rating, Review Title and Review Content), and other collections within the database were created such as the User Login as well as Sales and Reviews. MongoDB Compass were utilized to upload the larger CSV files with data whilst others were created based on a create database function in Python. In order for the TLS/SSL handshake to be successful between Pymongo and the MongoDB Atlas, we had to include this line client=pymongo.MongoClient(connection,tlsCAFile=certifi.where()).
  3. Integrating Google Cloud Natural Language API: One team member signed up for Google Cloud and all the tools were studied thoroughly. We narrowed down the search between VertexAI, AutoML and Cloud Natural Language APIs. All of which were enabled and obtained the required API credentials as well as we set up the necessary authentication and authorization mechanisms to interact with theses APIs as the owners. However, after running and re-running our codes using the Kaggle IDE, we decided that the Google Cloud Natural Language API would be our main Google Cloud Tool, thus we downloaded the api.json file and uploaded it to our Google Storage Bucket which is accessible to the public. This tool was obtained to obtained the main details for the application which was the average star rating, average sentiment score, sentiment about the score and statement on the review contents. It was also utilized to create the search and filter functionality based on the words people wanted to know about the reviews.
  4. Fetch and Consolidate Reviews: Whilst Team Swayed wanted to implement a data collection mechanism to fetch customer reviews from various platforms by using web scraping techniques or utilizing APIs provided by platforms that offer these review data. For legal and ethical reasons, all verified reviews were collected manually and stored as a CSV which was uploaded to the MongoDB database, utilizing MongoDB Compass.
  5. Sentiment Analysis: Utilizing Python and MongoDB Atlas as the Pymongo Module, the Google Cloud Natural Language API was included in the code to perform sentiment analysis on the collected reviews on Kaggle. The results including the sentiment score for each review and calculate the average sentiment for each product was stored in the database for retrieval when a person wants information. Other calculations like the generation of insightful and a summarized statement based on the reviews were implemented using the text generation mechanism using the Natural Language API and the summarization module Sumy in the Python code. We tried to leverage machine learning models using the Google Cloud AutoML tool (an example code can be shown) in a bid to generate coherent and relevant comments that highlight key aspects of the products as the comments received were not coherent therefore the function was removed.
  6. User Management: User management features were configured to allow users to a simple create account and access additional product insights, verified search queries on reviews, and request additions to the product database. Use MongoDB Atlas to store user profiles.
  7. Implement Search Functionality: As additional features and functions, a search functionality that allows users to find specific products based on their names, categories, or other relevant criteria were created. It was created in such a way using the Google Cloud Natural Language Processing API, users can customize their search query based on the words they associate with the product. It also utilizes MongoDB's query capabilities to retrieve the desired products from the database.
  8. Additional Product Insights - Charts regarding product sentiment timelines, reviews against price and the product’s company stocks based on information from Google Finance through Google Sheets.
  9. Thoughts on Enhancing the Performance and Scalability of the App: Whilst the Swayed Application is currently at a small scale, the team have thought about optimizing database queries, implementing caching mechanisms, and utilizing indexing techniques to ensure efficient retrieval of reviews and sentiments.
  10. Continuous Testing and Deployment: Swayed was thoroughly tested within the 10 days we entered the competition to check that all features and functionalities work as expected. There were numerous challenges encountered such as the legality of web scraping, selecting the right tools, ensuring that all the data was well linked. The greatest challenge was ensuring that the front end looked and performed as required on the Once testing is complete, deploy the web application to a production environment, ensuring proper security measures are in place.

Challenges we ran into

The time and deployment factors were challenging as we only joined the competition 9 days ago.

Accomplishments that we're proud of

Team Swayed is proud to have built their first application ever, no team member had any experience with app building and for most of the team, taken part in a large Hackathon like this.

What we learned

How to build an app. We learnt everything from scratch we knew nothing about app building. We had an idea that would help the deinfluencing trend and we went with that.

What's next for Swayed

We believe that it has a bright future as many people have shared growing intent for combating the promotion of products which become insanely popular overnight and adds little to no real value to our lives. Most persons already have products that are just as good or the products seem to good to be true hence a lot of people are convince to buy it. The kick is, many shopping platforms have biases in its review section thus, sentiments from the site on the viral product are not an accurate representation of the sentiments shared across the board. Hence, our application helps the user get a quick idea of what people are seeing and base their purchasing decision on that. If they want to take it further, they can even Sign Up for more product insights. It is the gateway to research.

Built With

  • canva
  • command-prompt-(or-command-prompt-on-local-computer)
  • figma
  • google-cloud-platform-(gcp-suite-of-tools-and-apis)
  • kaggle
  • localhost
  • mongodb-atlas
  • mongodb-compass
  • node.js
  • notepad
  • visual-studio-code-(vs-code)
  • wordpad
Share this project:

Updates