/CogniGaurd

A web extension for identifying dark pattern on websites powered by Fine Tuned BERT Model for classificaiton on dark pattern custom dataset,

Primary LanguageJupyter NotebookMIT LicenseMIT

CogniGuard 🕵️‍♂️✨


Overview

CogniGuard is a powerful web extension designed to empower users by identifying and combatting dark patterns on various websites, particularly focusing on E-commerce platforms. Ensuring users a transparent and ethical online experience.

About Dark Patterns => https://www.deceptive.design/

CogniGuard

<iframe width="560" height="315" src="https://www.youtube.com/embed/1DoYa1wVWhA?si=FCnzDxHuiJs5_Q4P" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

GitHub code size GitHub contributors GitHub commit activity GitHub issues GitHub License Python Django JavaScript HTML CSS Markdown

GitHub forks GitHub Repo stars

Cogni-BERT Model Scores

Sweeps Training Hyperparametrs

BERT Fine-Tuned Sweep training

Project Setup Locally 🚀

Link of Cogni-BERT Trained Model

  1. Huggingface spaces link --> https://huggingface.co/spaces/4darsh-Dev/dark_pattern_detector_app/tree/main/models

Setting up Django Backend

  1. clone the git repository locally.
git clone https://github.com/4darsh-Dev/CogniGaurd.git
  1. Install python and setup virtual envionment.

1. Open terminal

pip install virtualenv 
cd CogniGaurd
cd api
python -m venv myenv 

Activating virtual environment named as myenv

1. In Windows 🪟
.\myenv\Scripts\activate  
2. In Linux/Mac 🐧
 source myenv/bin/activate
  1. Installing required modules and libraries
 pip install -r requirements.txt 
  1. Running Django Development Server
python manage.py makemigrations 
python manage.py migrate 
python manage.py runserver 

-- Server will be started at localhost (example: http://127.0.0.1:8000/)

Setting up CogniGuard Web Extension

  1. Open Google Chrome Browser and visit url
 chrome://extensions/ 
  1. Turn on Developer Mode.
  2. Click on load unpacked and then select the cogniguard-web folder with manifest.json
  3. Click on extension icon and you will find the CogniGuard.
  4. Open the desired website URL (https://snapdeal.com/) on web browser and then click on Analyze button.
  5. The Analyzing process will start running on backend.

Tech Stack 🛠️

  • Web Extension: HTML, CSS, JavaScript
  • Python (BeautifulSoup, Scrapy): Web scraping for price data analysis.
  • Django: Backend for API management and Dark pattern report pattern for CogniGuard
  • BERT Model: Fine-tuned for sophisticated pattern recognition.

Screenshots 📸

[Include screenshots of the extension interface in action.] coming soon.

Documentation 📖

Detailed documentation on usage, contribution guidelines, and API integration can be found in the Documentation Link.

Contributors 🧑‍💻

Acknowledgments 🙏

We express our gratitude to the incredible individuals who have contributed to the development and success of CogniGuard. 🌟 Your dedication, passion, and insights have played a pivotal role in shaping this project.

Special thanks to the open-source community for their continuous support and collaborative spirit. 🚀 Your contributions, whether big or small, have contributed to the growth and improvement of CogniGuard.

Feedback 📬

We value your feedback! Report issues at adarsh@onionreads.com Propose features, or submit pull requests. Let's create a fair and transparent digital environment together! 🌐✨