Skip to content

Backend written in Typescript Express for the Detox-chrome extension.

Notifications You must be signed in to change notification settings

Team-Jalapeno/detox-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

detox-backend

Keep your browsing free from sensitive content.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

Detox is an AI-powered chrome-extension that lets you control what you see when you are browsing the web. With the help of Detox, you can choose to blur out obscene images, videos, and text, and concentrate on your work/scroll through social media peacefully.

On the chrome-extension popup, you can choose the strictness with which you want Detox to filter text and media on the webpage. You can also choose the type of content you want to filter by enabling/disabling switches on the extension. By default, text, images, and videos will be enabled.

Detox only uses Open-Source APIs and libraries. Image content detection is performed on the client-side. Text is sent to the server (the source code for which is also Open Source). However, the text sent to our servers is not stored and not linked to a user in any way.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • npm

Installation

  1. Clone the repo.
git clone https://github.com/Team-WhiteHatSr/detox-backend.git
cd detox-backend
  1. Install NPM packages.
npm install
  1. Run the project.
npm run dev

Usage

Check text to filter

  POST /check/text
Parameter Type Description
body string Required. The text to check

Response format

{
  "success": true,
  "data": {
    "INSULT": 0.02562259,
    "SEXUALLY_EXPLICIT": 0.0659871,
    "IDENTITY_ATTACK": 0.036624417,
    "PROFANITY": 0.043232616,
    "TOXICITY": 0.052431956,
    "FLIRTATION": 0.24988943,
    "THREAT": 0.062780865
  }
}

Ping

  GET /util/ping
Parameter Type Description
none none Returns pong if sever is active

Report

  GET /community/report
Parameter Type Description
url string, query param URL of the website in question

Response Format

{
  "reports": [
    {
      "pageScore": 0,
      "vote": 70,
      "users": [],
      "_id": "60d76b74f0c7801e3a0bd5b6",
      "contentType": "something",
      "url": "https://something.com",
      "selector": "html > body > section > p > something",
      "__v": 0
    }
  ]
}
  POST /community/report
Parameter Type Description
url string URL of the website in question
contentType string, (either text or image) type of content to report
vote number User's rating of the page
selector string CSS path of the element in the HTML page
userId string unique id of extension, auto generated

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'feat: Add some AmazingFeature')
  4. Push to the Branch (git push -u origin feature/AmazingFeature)
  5. Open a Pull Request

You are requested to follow the contribution guidelines specified in CONTRIBUTING.md while contributing to the project 😄.

License

Distributed under the MIT License. See LICENSE for more information.

About

Backend written in Typescript Express for the Detox-chrome extension.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published