Shitty-Search is the worst search engine you have ever seen.
- Create a new mysql database
- Run the crawler
- Run the pagerank algorithm
- Start the server and upload the client to a free hosting platform
git clone https://github.com/Tracer1337/shitty-search.git
cd shitty-search
yarn
This project uses yarn, primarily for the monorepo design. Some packages from /packages
depend on other packages stored there and yarn will link them through the node_modules
folder. Keep in mind that in order to use the code from a package in another package, it has to be compiled and imported through the /dist
folder. This also means that in development you will often use yarn build
to use code changes in another package.
The website which queries and displays search results from a given endpoint. The endpoint can be defined at build-time through the API_ENDPOINT
environment variable.
Crawls the internet and stores the data it found in the database.
Implementation of the pagerank algorithm as desribed on Wikipedia. The Runner
class adapts the pagerank algorithm to the database, but this package can be used in any situation.
Finds and ranks the results of a given query, where the query is a sequence of keywords. This package contains the scoring mechanism.
The only thing this one really does is exposing a single API endpoint which runs the search package so the client can query it.
Contains the functionality which all packages need, like the database stuff and some utilities.