Skip to content

Latest commit

 

History

History
183 lines (147 loc) · 6.41 KB

Learn.md

File metadata and controls

183 lines (147 loc) · 6.41 KB

Learn.md ✍

CogniGuard 🕵️‍♂️✨


[About Dark Patterns]( https://www.deceptive.design/)

Table of Contents

  1. Introduction
  2. Tech Stack
  3. Contributing
  4. Setting Up on your machine
  5. Resources for Beginners
  6. Documentation
  7. Code Reviews
  8. Feature Requests
  9. Spreading the Word
  10. Motivation

Introduction 🖥️

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.

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.

Contributing 📝

Raise and issue; Get assigned and then work on fixing the issue. We welcome contributions to CogniGuard! Follow these steps to contribute:

  1. Fork the Repository: Create your own copy of the repository on your GitHub account. image

  2. Clone the Repository : Clone the repository for making commits.

    git clone https://github.com/4darsh-Dev/CogniGaurd.git

image

  1. Create a New Branch for your feature or bug fix: Make a separate branch to work on specific features or fixes and switch to the correct branch.
git checkout -b <new-branch-name>
  1. Make Changes and commit them: Implement your changes and save them with a descriptive commit message.
git add .
git commit -m "Describe your changes"
  1. Push Your Changes to your fork: Upload your committed changes to your GitHub fork.
    git push origin <branch_name>
  2. Create a Pull Request ✅: Propose your changes to be merged into the original repository.

image

Development Workflow

  • Always work on a new branch for each issue or feature.
  • Keep your branch up to date with the main repository's master branch.
  • Write clear and descriptive commit messages.
  • Test your changes thoroughly before submitting a pull request.

Issue Report Process

  1. Go to the project's issues section.
  2. Select the appropriate template for your issue.
  3. Provide a detailed description of the issue.
  4. Wait for the issue to be assigned before starting to work on it.

Pull Request Process 🚀

  1. Ensure that you have self reviewed your code.
  2. Make sure you have added the proper description for the functionality of the code.
  3. I have commented my code, particularly in hard-to-understand areas.
  4. Add screenshot it help in review.
  5. Submit your PR by giving the necesarry information in PR template and hang tight we will review it really soon.

Setting Up on your machine ⚙️

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.

Resources for Beginners 📚

Basics of Git and GitHub 📂

📍Documentation

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

  • Document any significant changes or additions to the codebase.
  • Provide clear explanations of the functionality, usage, and any relevant considerations.

Code Reviews 🔎

  • Be open to feedback and constructive criticism from other contributors.
  • Participate in code reviews by reviewing and providing feedback.

Feature Requests 🔥

We value your feedback! Report issues at [email protected] Propose features, or submit pull requests. Let's create a fair and transparent digital environment together! 🌐✨

Spreading the Word 👐

  • Share your experience and the project with others.
  • Spread the word about the project on social media, developer forums, or any relevant community platforms.

Thank you for contributing to CogniGuard! Together, we can make a significant impact. Happy coding! 🚀

Don't forget to ⭐ the repository!