{"id":26321192,"url":"https://github.com/4darsh-dev/cognigaurd","last_synced_at":"2025-03-15T16:16:33.625Z","repository":{"id":215112218,"uuid":"737077494","full_name":"4darsh-Dev/CogniGaurd","owner":"4darsh-Dev","description":"A web extension for identifying dark pattern on websites powered by Fine Tuned BERT Model for classificaiton on dark pattern custom dataset, ","archived":false,"fork":false,"pushed_at":"2024-08-12T08:40:10.000Z","size":10854,"stargazers_count":22,"open_issues_count":24,"forks_count":50,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T08:52:27.141Z","etag":null,"topics":["bert-fine-tuning","dark-pattern-blocker","dark-patterns","deep-learning","django","gssoc24","html-css-javascript","natural-language-processing","postgresql","python","pytorch"],"latest_commit_sha":null,"homepage":"https://cogniguard.onionreads.com/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4darsh-Dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/funding.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"4darsh-Dev","ko_fi":"adarshmaurya"}},"created_at":"2023-12-29T18:40:38.000Z","updated_at":"2025-02-07T22:43:21.000Z","dependencies_parsed_at":"2024-05-16T06:08:59.268Z","dependency_job_id":"082db306-5d94-4bd1-a30d-7553474dd8d4","html_url":"https://github.com/4darsh-Dev/CogniGaurd","commit_stats":null,"previous_names":["4darsh-dev/cognigaurd"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4darsh-Dev%2FCogniGaurd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4darsh-Dev%2FCogniGaurd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4darsh-Dev%2FCogniGaurd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4darsh-Dev%2FCogniGaurd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4darsh-Dev","download_url":"https://codeload.github.com/4darsh-Dev/CogniGaurd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243754075,"owners_count":20342543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bert-fine-tuning","dark-pattern-blocker","dark-patterns","deep-learning","django","gssoc24","html-css-javascript","natural-language-processing","postgresql","python","pytorch"],"created_at":"2025-03-15T16:16:33.159Z","updated_at":"2025-03-15T16:16:33.614Z","avatar_url":"https://github.com/4darsh-Dev.png","language":"Jupyter Notebook","funding_links":["https://github.com/sponsors/4darsh-Dev","https://ko-fi.com/adarshmaurya"],"categories":[],"sub_categories":[],"readme":"# CogniGuard 🕵️‍♂️✨\n\u003cbr\u003e\n\u003cbr\u003e\n\n![Labeler](https://github.com/4darsh-Dev/CogniGaurd/actions/workflows/label.yml/badge.svg)\n![Greetings](https://github.com/4darsh-Dev/CogniGaurd/actions/workflows/greetings.yml/badge.svg)\n![CodeQL](https://github.com/4darsh-Dev/CogniGaurd/actions/workflows/codeql.yml/badge.svg)\n![Issue Close Greet](https://github.com/4darsh-Dev/CogniGaurd/actions/workflows/issue_close_greet.yml/badge.svg)\n![Dependencies](https://github.com/4darsh-Dev/CogniGaurd/actions/workflows/dependency-review.yml/badge.svg)\n## Overview\n\nCogniGuard 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.\n\n##### About Dark Patterns =\u003e https://www.deceptive.design/\n\n![Screenshot 2024-07-13 024617](https://github.com/user-attachments/assets/e7c2dbe5-7c9c-4759-ab72-042c90fe3b2c)\n\n\n\u003ciframe 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\u003e\u003c/iframe\u003e\n\n\n![GitHub code size](https://img.shields.io/github/languages/code-size/4darsh-Dev/CogniGaurd?style=plastic)\n![GitHub contributors](https://img.shields.io/github/contributors/4darsh-Dev/CogniGaurd?style=plastic)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/t/4darsh-Dev/CogniGaurd)\n![GitHub issues](https://img.shields.io/github/issues/4darsh-Dev/CogniGaurd)\n![GitHub License](https://img.shields.io/github/license/4darsh-Dev/CogniGaurd)\n[![Python](https://img.shields.io/badge/Python-14354C?style=for-the-badge\u0026logo=python\u0026logoColor=white)](https://github.com/4darsh-Dev/CogniGaurd)\n[![Django](https://img.shields.io/badge/Django-092E20?style=for-the-badge\u0026logo=django\u0026logoColor=white)](https://github.com/4darsh-Dev/CogniGaurd)\n[![JavaScript]( \thttps://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge\u0026logo=javascript\u0026logoColor=black)](https://github.com/4darsh-Dev/CogniGaurd)\n[![HTML](https://img.shields.io/badge/HTML5-E34F26?style=for-the-badge\u0026logo=html5\u0026logoColor=white)](https://github.com/4darsh-Dev/CogniGaurd)\n[![CSS](https://img.shields.io/badge/CSS3-1572B6?style=for-the-badge\u0026logo=css3\u0026logoColor=white)](https://github.com/4darsh-Dev/CogniGaurd)\n[![Markdown](https://img.shields.io/badge/Markdown-000000?style=for-the-badge\u0026logo=markdown\u0026logoColor=white)](https://github.com/4darsh-Dev/CogniGaurd)\n\n\u003c!-- ![GitHub Release](https://img.shields.io/github/v/release/4darsh-Dev/CogniGaurd) --\u003e\n![GitHub forks](https://img.shields.io/github/forks/4darsh-Dev/CogniGaurd)\n![GitHub Repo stars](https://img.shields.io/github/stars/4darsh-Dev/CogniGaurd)\n\n\u003c!-- Open Source Programs --\u003e\n  \u003cdiv\u003e\n    \u003ch2\u003e\u003cimg src=\"https://github.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/blob/master/Emojis/Hand%20gestures/Flexed%20Biceps.png?raw=true\" width=\"35\" height=\"35\" \u003e Open Source Programs\u003c/h2\u003e\n  \u003c/div\u003e\n\n  \u003ctable border=\"1\" cellpadding=\"10\"\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=\"2\"\u003e\n                \u003cimg src=\"https://github.com/user-attachments/assets/c450ca4f-935e-4628-8169-86f36bed694c\" alt=\"GSSOC Logo\" width=\"80\" height=\"65\"\u003e\n            \u003c/td\u003e\n            \u003ctd\u003e\n                \u003cstrong\u003eGSSOC 2024\u003c/strong\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003e\n                This project is part of GirlScript Summer of Code. We warmly welcome contributions from the community.\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=\"2\"\u003e\n                \u003cimg src=\"https://github.com/user-attachments/assets/7d08bb33-18ac-455a-8c1f-af811443b1ff\" alt=\"GSSOC Logo\" width=\"80\" height=\"60\"\u003e\n            \u003c/td\u003e\n            \u003ctd\u003e\n                \u003cstrong\u003eVSOC 2024\u003c/strong\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003e\n                This project is part of Vinyasa Summer of Code We warmly welcome contributions from the community.\n            \u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/table\u003e\n\n\u003chr\u003e\n\n## Website SS\n\n  ![Screenshot 2024-07-02 190608](https://github.com/4darsh-Dev/CogniGaurd/assets/109789509/83497dcb-1908-4925-8829-ba1e2138c92f)\n\n\n\n\n## Cogni-BERT Model Scores\n\n### Sweeps Training Hyperparametrs\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://onionreads.com/wp-content/uploads/2024/05/cogni-bert-12sweeps.png\" alt=\"BERT Fine-Tuned Sweep training \" width=\"600px\" /\u003e\n\u003c/p\u003e\n\n\n\n## Project Setup Locally 🚀\n\n### Link of Cogni-BERT Trained Model\n1. Huggingface spaces link --\u003e https://huggingface.co/spaces/4darsh-Dev/dark_pattern_detector_app/tree/main/models\n\n### Setting up project locally\n\n1. clone the git repository locally.\n```bash \ngit clone https://github.com/4darsh-Dev/CogniGaurd.git\n```\n2. Install python and setup virtual envionment. \n#### 1. Open terminal \n```bash \npip install virtualenv \n```\n```bash \ncd CogniGaurd\n```\n##### 1. For setting django-web-app\n```bash \ncd django-web-app\n```\n##### 2. For setting django-mlapi-backend\n```bash \ncd django-mlapi-backend\n```\n#### create a sample .env file in root directory (OPTIONAL)\n```ini\n#.env file\n\n\n# Email server configuration\nEMAIL_HOST=smtp.your-email-provider.com\nEMAIL_HOST_USER=your_email@example.com\nEMAIL_HOST_PASSWORD=your_email_password\n\n\n# database configuration or use default sqlite3 \nDB_NAME=your-database-name\nDB_USER=your-db-user-name\nDB_PASSWORD=your-db-password\nDB_HOST=your-db-host\nDB_PORT=your-db-port\nPJ_SECRET_KEY=your-django-project-secret-key\n\n```\n```bash\npython -m venv myenv \n```\n#### Activating virtual environment named as myenv\n##### 1. In Windows 🪟\n```bash \n.\\myenv\\Scripts\\activate  \n```\n##### 2. In Linux/Mac 🐧\n```bash\n source myenv/bin/activate\n ```\n\n3. Installing required modules and libraries\n```bash\n pip install -r requirements.txt \n ```\n\n4. Running Django Development Server \nDo the following task for contributing to project and you have to revert these changes before committing\nThese steps can be used for working on local device for contribution\n\n##### In cogniguard/settings.py\n```python\n# for vercel deployment \n# SECRET_KEY = os.environ.get(\"PJ_SECRET_KEY\")\nSECRET_KEY=\"default-development-secret-key\"\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\nDATABASES = {\n    #  setting default sqlite3 configuration for development server\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3',\n        'NAME': BASE_DIR / 'db.sqlite3',\n    }\n    # for vercel deployment\n    # 'default': {\n    #     'ENGINE': 'django.db.backends.postgresql_psycopg2',\n    #     'NAME': os.environ.get(\"DB_NAME\"),\n    #     'USER': os.environ.get(\"DB_USER\"),\n    #     'PASSWORD': os.environ.get(\"DB_PASSWORD\"),\n    #     'HOST': os.environ.get(\"DB_HOST\"),\n    #     'PORT': os.environ.get(\"DB_PORT\"),\n    # }\n}\n```\n##### In cogniguard/urls.py\n```python\n\n\n# # vercel deployment configuration\n# urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n# urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)\n\n```\n```bash \npython manage.py makemigrations \n```\n```bash \npython manage.py migrate \n\n```bash \npython manage.py runserver \n```\n-- Server will be started at localhost (example: http://127.0.0.1:8000/)\n\n--- Warning! - Ensure to undo the development settings changes before pushing code for vercel production and PRs.\n\n### Setting up CogniGuard Web Extension\n\n1. Open Google Chrome Browser and visit url\n``` bash\n chrome://extensions/ \n ```\n2. Turn on Developer Mode.\n3. Click on load unpacked and then select the cogniguard-web folder with manifest.json\n4. Click on extension icon and you will find the CogniGuard.\n5. Open the desired website URL (https://snapdeal.com/) on web browser and then click on Analyze button.\n6. The Analyzing process will start running on backend. \n\n\n## Tech Stack 🛠️\n\n- **Web Extension:** HTML, CSS, JavaScript \n- **Python (BeautifulSoup, Scrapy):** Web scraping for price data analysis.\n- **Django:** Backend for API management and Dark pattern report pattern for CogniGuard\n- **BERT Model:** Fine-tuned for sophisticated pattern recognition.\n\n\n\n\n## Screenshots 📸\n\n[Include screenshots of the extension interface in action.] coming soon.\n\n## Documentation 📖\n\nDetailed documentation on usage, contribution guidelines, and API integration can be found in the [Documentation Link](https://github.com/4darsh-Dev/CogniGaurd/wiki).\n\n## Contributors 🧑‍💻\n\n- [@4darsh-Dev (Adarsh Maurya)](https://github.com/4darsh-Dev) - Project Lead\n\n- [@amansingh494 (Aman Singh)](https://github.com/amansingh494) - FrontEnd Developer\n\n- [@Anmolgoel29 (Anmol Goel)](https://github.com/Anmolgoel29) - Machine Learning\n\n- [@DharmeshTanwar56 (Dharmesh Tanwar)](https://github.com/DharmeshTanwar56) - UI/UX Designer\n\n- [@goldy-dev123 (Goldy)](https://github.com/goldy-dev123) - Technical Writing\n\n\n\n## Acknowledgments 🙏\n\nWe 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.\n\nSpecial 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.\n\n## Feedback 📬\n\nWe value your feedback! Report issues at adarsh@onionreads.com \nPropose features, or submit pull requests. Let's create a fair and transparent digital environment together! 🌐✨\n\n\nDon't forget to leave a star ⭐\nHappy Coding!!❤️\n\n\u003chr\u003e\n\n\u003cdiv\u003e\n  \u003ch2 align = \"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Smilies/Red%20Heart.png\" width=\"35\" height=\"35\"\u003eOur Contributors\u003c/h2\u003e\n  \u003cdiv align = \"center\"\u003e\n \u003ch3\u003eThank you for contributing to our repository\u003c/h3\u003e\n\n![Contributors](https://contrib.rocks/image?repo=4darsh-Dev/CogniGaurd)\n\n### Show some ❤️ by starring this awesome repository!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4darsh-dev%2Fcognigaurd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4darsh-dev%2Fcognigaurd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4darsh-dev%2Fcognigaurd/lists"}