GithubHelp home page GithubHelp logo

seeknetextensionbackend's Introduction

SeekNet - Chrome Extension Backend

This repository is the backend flask application for the SeekNet Chrome extension: (https://github.com/abhinav-thimma/SeekNetChromeExtension)

Installing dependencies:

Installing packages

pip install -r src/requirements.txt

Downloading Spacy english dictionary

python -m spacy download en_core_web_sm

Creating a MongoDB Database and Collections:

  1. Create a new MongoDB database with a name "seeknet" ( Can be hosted or local )
  2. In the database, create 2 collections with the names "extension_actions" and "extension_collections"
  3. Make a note of connection URL for your MongoDB instance

Connecting a mongo DB instance:

  1. Create a new file called 'config.json' in src/ with the following content:
    {
      "connection_url": "<CONNECTION_URL>",
      "db_name": "<DB_NAME>"
    }
  1. Replace <CONNECTION_URL> with the connection URL for your mongo DB instance
  2. Replace <DB_NAME> with "seeknet"

To run the backend:

> cd src
> flask run

API documentation summary:

  1. GET '/?url=...': Returns a list of connections with the source url matching the given url.

    Parameters:

    • url: Query parameter indicating the current URL
  2. GET '/ddg?query=...': Returns top DuckDuckGo search results for a given query

    Parameters:

    • query: Query parameter indicating user query
  3. POST '/connect': Connects a src_url with a target_url using the text

    Parameters:

    • Request Body:
      {
        "src_url": ...,
        "tgt_url": ...,
        "text": ...
      }
      
  4. POST '/search': Searches for a query in Seeknet connections

    Parameters:

    • Request Body:
      {
        "query": ...,
        "url": ...
      }
      
  5. POST '/log_clicks': logs user actions like clicking on a link

    Parameters:

    • Request Body:
      {
        "src_url": ...,
        "tgt_url": ...,
        "search_text": ...
      }
      

seeknetextensionbackend's People

Contributors

athimma2 avatar abhinav-thimma avatar nikhithareddy123 avatar trishad21 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.