This repository is the backend flask application for the SeekNet Chrome extension: (https://github.com/abhinav-thimma/SeekNetChromeExtension)
pip install -r src/requirements.txt
python -m spacy download en_core_web_sm
- Create a new MongoDB database with a name "seeknet" ( Can be hosted or local )
- In the database, create 2 collections with the names "extension_actions" and "extension_collections"
- Make a note of connection URL for your MongoDB instance
- Create a new file called 'config.json' in src/ with the following content:
{
"connection_url": "<CONNECTION_URL>",
"db_name": "<DB_NAME>"
}
- Replace <CONNECTION_URL> with the connection URL for your mongo DB instance
- Replace <DB_NAME> with "seeknet"
> cd src
> flask run
-
GET '/?url=...': Returns a list of connections with the source url matching the given url.
Parameters:
- url: Query parameter indicating the current URL
-
GET '/ddg?query=...': Returns top DuckDuckGo search results for a given query
Parameters:
- query: Query parameter indicating user query
-
POST '/connect': Connects a
src_url
with atarget_url
using thetext
Parameters:
- Request Body:
{ "src_url": ..., "tgt_url": ..., "text": ... }
- Request Body:
-
POST '/search': Searches for a query in Seeknet connections
Parameters:
- Request Body:
{ "query": ..., "url": ... }
- Request Body:
-
POST '/log_clicks': logs user actions like clicking on a link
Parameters:
- Request Body:
{ "src_url": ..., "tgt_url": ..., "search_text": ... }
- Request Body: