This application creates an index of the largest collection of cool internet resources called awesome. It exposes querying functionality via REST API.
- flexsearch - Next-Generation full text search library for Browser and Node.js
- bull - Premium Queue package for handling distributed jobs and messages in NodeJS
- typeorm - ORM for TypeScript and JavaScript
-
Clone this repository
Move to your desired directory and run the following git command.
git clone https://github.com/bartolomej/awesomesearch
-
Download and install docker desktop.
-
Create cloudinary account for image storage
-
Generate Github access token (optional)
-
Configure environment variables
Create
.env
file in./server
directory, containing all required environmental variables defined in./server/.env.example
template. -
Build and run docker containers
Simply run
docker-compose up
to run all services required for the app to work (redis, mysql, web and worker processes). -
Start client applications
You can then finally start the app in development mode with the following commands:
- website:
cd website && yarn start
- dashboard:
cd dashboard && yarn start
- website:
You can run this app on your local machine as well, but you will need to set up a few things first:
-
Clone this repository
Move to your desired directory and run the following git command.
git clone https://github.com/bartolomej/awesomesearch
-
Install and run Redis server
This is needed for job queue functionality. Install from here.
-
Create cloudinary account for image storage
-
Generate Github access token (optional)
-
Setup environmental variables
Here we will define private credentials for our app to use. This follows 12 factor app methodology. Required environmental variables are listed in
.env.example
file. -
Install dependencies
In your project root run
sh install.sh
to install required dependencies. -
Start applications
You can then finally start the app in development mode with the following commands:
- server:
cd server && yarn start:dev
- website:
cd website && yarn start
- dashboard:
cd dashboard && yarn start
- server:
-
Unit & integration tests
These tests validate that isolated and connected modules of code work well. Run with
yarn run test
. -
Performance tests
These test real life performance of our application by simulating what normal users would do. To run these you will need to install artillery tool and then run
yarn run test:load:staging
.
Licensed under the MIT License.