Implementation of search engine based on GSE API with additional adds filtering and search result storage.
For unix sytem:
pip install -r requirements.txt
cd client
npm i
For windows:
py -m pip install -r requirements.txt
cd client
npm i
Create credentials file with variables where describe your main configuration settings: API, PosgreSQL login etc.
File .env has to look like this:
# Google Search API block
SEARCH_KEY = "YOUR-GOOGLE-API-SEARCH-KEY"
SEARCH_ID = "YOUR-SEARCH-ID"
COUNTRY = "ua"
SEARCH_URL = "https://www.googleapis.com/customsearch/v1?key={key}&cx={cx}&q={query}&start={start}&num=10&gl=" + COUNTRY
RESULT_COUNT = 20
# PostgreSQL DB block
DBNAME = "NAME-POSTGRE-DB"
DBUSER = "NAME-ACC-FOR-YOUR-POSTGRE-SERV"
DBPASSWORD = "PASSWORD-ACC-FOR-YOUR-POSTGRE-SERV"
DBHOST = "DB-serv" # < - your DB serv host
DBPORT = 5432 # < - your DB serv port
For the Frontend create .env.local inside ./client
with following value:
REACT_APP_BACKEND_URL="YOUR PYTHON BACKEND URL"
Launch backend.
For unix sytems:
uvicorn app:app --reload
For windows:
py -m uvicorn app:app --reload
Launch frontend.
cd client
npm start