Shivam Kumar commited on
Commit
5301d09
β€’
1 Parent(s): 6963d00

πŸ“ Typo correction and Grammatical in the `features` and `installation` documentation page (#355)

Browse files

* πŸ“ docs: Fix typos in the `features` documentation page (#355)

* πŸ“ docs: Fix typos in the `installation` documentation page (#355)

Files changed (2) hide show
  1. docs/features.md +5 -5
  2. docs/installation.md +30 -30
docs/features.md CHANGED
@@ -8,11 +8,11 @@ The different caching features provided are as follows:
8
  - In memory cache
9
  - Hybrid cache
10
 
11
- ## Explaination
12
 
13
  ### No Cache
14
 
15
- This feature can drastically reduce binary size but with the cost that subsequent search requests and previous & next page search results are not cached which can make navigating between pages slower. As well as page refreshes of the same page also becomes slower as each refresh has to fetch the results from the upstream search engines.
16
 
17
  ### Redis Cache
18
 
@@ -20,11 +20,11 @@ This feature allows the search engine to cache the results on the redis server.
20
 
21
  ### In Memory Cache
22
 
23
- This feature is the default feature provided by the project. This feature allows the search engine to cache the results in the memory which can help increase the speed of the fetched cache results and it also has an advantage that it is extremely reliable as all the results are stored in memory within the search engine. Though the disadvantage of this solution are that caching of results is slightly slower than the `redis-cache` solution, it requires a good amount of memory on the system and as such is not ideal for very low memory devices and is highly unscalable.
24
 
25
  ### Hybrid Cache
26
 
27
- This feature provides the advantages of both `In Memory` caching and `Redis` caching and it is an ideal solution if you need a very resiliant and reliable solution for the `Websurfx` which can provide both speed and reliability. Like for example if the `Redis` server becomes unavailable then the search engine switches to `In Memory` caching until the server becomes available again. This solution can be useful for hosting `Websurfx` instance which will be used by hundreds or thousands of users over the world.
28
 
29
  ## Tabular Summary
30
 
@@ -34,7 +34,7 @@ This feature provides the advantages of both `In Memory` caching and `Redis` cac
34
  | **Speed** | Fast | Caching is slow, but retrieval of cache data is fast | Slow | Fastest |
35
  | **Reliability** | βœ… | βœ… | βœ… | ❌ |
36
  | **Scalability** | βœ… | ❌ | - | βœ… |
37
- | **Resiliancy** | βœ… | βœ… | βœ… | ❌ |
38
  | **Production/Large Scale/Instance use** | βœ… | Not Recommended | Not Recommended | Not Recommended |
39
  | **Low Memory Support** | ❌ | ❌ | βœ… | ❌ |
40
  | **Binary Size** | Big | Bigger than `No Cache` | small | Bigger than `No Cache` |
 
8
  - In memory cache
9
  - Hybrid cache
10
 
11
+ ## Explanation
12
 
13
  ### No Cache
14
 
15
+ This feature can drastically reduce binary size but with the cost that subsequent search requests and previous & next page search results are not cached which can make navigating between pages slower. As well as Page refreshes of the same page also become slower as each refresh has to fetch the results from the upstream search engines.
16
 
17
  ### Redis Cache
18
 
 
20
 
21
  ### In Memory Cache
22
 
23
+ This feature is the default feature provided by the project. This feature allows the search engine to cache the results in the memory which can help increase the speed of the fetched cache results and it also has the advantage that it is extremely reliable as all the results are stored in memory within the search engine. Though the disadvantage of this solution is that caching of results is slightly slower than the `redis-cache` solution, it requires a good amount of memory on the system and as such is not ideal for very low memory devices and is highly unscalable.
24
 
25
  ### Hybrid Cache
26
 
27
+ This feature provides the advantages of both `In Memory` caching and `Redis` caching and it is an ideal solution if you need a very resilient and reliable solution for the `Websurfx` which can provide both speed and reliability. Like for example if the `Redis` server becomes unavailable then the search engine switches to `In Memory` caching until the server becomes available again. This solution can be useful for hosting a `Websurfx` instance which will be used by hundreds or thousands of users all over the world.
28
 
29
  ## Tabular Summary
30
 
 
34
  | **Speed** | Fast | Caching is slow, but retrieval of cache data is fast | Slow | Fastest |
35
  | **Reliability** | βœ… | βœ… | βœ… | ❌ |
36
  | **Scalability** | βœ… | ❌ | - | βœ… |
37
+ | **Resiliency** | βœ… | βœ… | βœ… | ❌ |
38
  | **Production/Large Scale/Instance use** | βœ… | Not Recommended | Not Recommended | Not Recommended |
39
  | **Low Memory Support** | ❌ | ❌ | βœ… | ❌ |
40
  | **Binary Size** | Big | Bigger than `No Cache` | small | Bigger than `No Cache` |
docs/installation.md CHANGED
@@ -18,11 +18,11 @@ websurfx
18
 
19
  Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
20
 
21
- If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
22
 
23
  ### Stable
24
 
25
- For the stable version, follow the same steps as above (as mentioned for the `unstable/rolling/edge` version) with the only difference being that the package to be installed for stable version is called `websurfx-git` instead of `websurfx-edge-git`.
26
 
27
  ## NixOS
28
 
@@ -32,7 +32,7 @@ The Websurfx project provides 2 versions/flavours for the flake `stable` and `ro
32
 
33
  ### Rolling/Edge/Unstable
34
 
35
- To get started, First clone the repository, edit the config file which is located in the `websurfx` directory and then build and run the websurfx server by running the following commands:
36
 
37
  ```shell
38
  git clone https://github.com/neon-mmd/websurfx.git
@@ -45,11 +45,11 @@ nix run .#websurfx
45
  ```
46
 
47
  > **Note**
48
- > In the above command the dollar sign(**$**) refers to running the command in privilaged mode by using utilities `sudo`, `doas`, `pkgexec` or any other privilage access methods.
49
 
50
- Once you have run the above set of commands, then open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
51
 
52
- If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
53
 
54
  > Optionally, you may include it in your own flake by adding this repo to its inputs and adding it to `environment.systemPackages` as follows:
55
  >
@@ -76,7 +76,7 @@ If you want to change the port or the ip or any other configuration setting chec
76
 
77
  ### Stable
78
 
79
- For the stable version, follow the same steps as above (as mentioned for the `unstable/rolling/edge version`) with an addition of one command which has to be performed after cloning and changing directory into the repository which makes the building step as follows:
80
 
81
  ```shell
82
  git clone https://github.com/neon-mmd/websurfx.git
@@ -90,7 +90,7 @@ nix run .#websurfx
90
  ```
91
 
92
  > **Note**
93
- > In the above command the dollar sign(**$**) refers to running the command in privilaged mode by using utilities `sudo`, `doas`, `pkgexec` or any other privilage access methods.
94
 
95
  ## Other Distros
96
 
@@ -102,7 +102,7 @@ Before you can start building `websurfx`, you will need to have `Cargo` installe
102
 
103
  ## Stable
104
 
105
- To get started with Websurfx, clone the repository, edit the config file which is located in the `websurfx` directory and install redis server by following the instructions located [here](https://redis.io/docs/getting-started/) and then build and run the websurfx server by running the following commands:
106
 
107
  ```shell
108
  git clone https://github.com/neon-mmd/websurfx.git
@@ -115,7 +115,7 @@ redis-server --port 8082 &
115
 
116
  Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
117
 
118
- If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
119
 
120
  ## Rolling/Edge/Unstable
121
 
@@ -138,7 +138,7 @@ To build the search engine with the `Hybrid caching` feature. Run the following
138
  cargo build -r --features redis-cache
139
  ```
140
 
141
- ### Memory Cache (Default Feature)
142
 
143
  > For more information on the features and their pros and cons. see: [**Features**](./features.md)
144
 
@@ -168,7 +168,7 @@ To build the search engine with the `hybrid caching` feature. Run the following
168
  cargo build -r --no-default-features --features redis-cache
169
  ```
170
 
171
- > Optionally, If you have build the app with the `Redis cache`or `Hybrid cache` feature (as mentioned above) then before launching the search engine run the following command:
172
  >
173
  > ```shell
174
  > redis-server --port 8082 &
@@ -180,9 +180,9 @@ Once you have finished building the `search engine`. then run the following comm
180
  ./target/release/websurfx
181
  ```
182
 
183
- Once you have started the server, then launch your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
184
 
185
- If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
186
 
187
  # Docker Deployment
188
 
@@ -190,7 +190,7 @@ Before you start, you will need [Docker](https://docs.docker.com/get-docker/) in
190
 
191
  ## Prebuild
192
 
193
- The Websurfx project provides several prebuild images based on the different features provided by the search engine. To get started using the prebuild image, you will first need to create a `docker-compose.yml` file with the following content:
194
 
195
  ```yaml
196
  ---
@@ -235,8 +235,8 @@ production_use = false -- whether to use production mode or not (in other words
235
  -- There will be a random delay before sending the request to the search engines, this is to prevent DDoSing the upstream search engines from a large number of simultaneous requests.
236
  request_timeout = 30 -- timeout for the search requests sent to the upstream search engines to be fetched (value in seconds).
237
  rate_limiter = {
238
- number_of_requests = 20, -- The number of request that are allowed within a provided time limit.
239
- time_limit = 3, -- The time limit in which the quantity of requests that should be accepted.
240
  }
241
 
242
  -- ### Search ###
@@ -266,8 +266,8 @@ safe_search = 2
266
  -- tokyo-night
267
  -- tomorrow-night
268
  -- }}
269
- colorscheme = "catppuccin-mocha" -- the colorscheme name which should be used for the website theme
270
- theme = "simple" -- the theme name which should be used for the website
271
 
272
  -- ### Caching ###
273
  redis_url = "redis://redis:6379" -- redis connection url address on which the client should connect on.
@@ -286,33 +286,33 @@ $ docker compose up -d
286
  ```
287
 
288
  > **Note**
289
- > In the above command the dollar sign(**$**) refers to running the command in privilaged mode by using utilities `sudo`, `doas`, `pkgexec` or any other privilage access methods.
290
 
291
  Then launch the browser of your choice and navigate to http://<ip_address_of_the_device>:<whatever_port_you_provided_in_the_config>.
292
 
293
  > **Note**
294
- > The official prebuild images only support `stable` versions of the app and will not support `rolling/edge/unstable` versions. But with support and contribution it could be made available for these versions as well πŸ™‚.
295
 
296
  ## Manual Deployment
297
 
298
  This section covers how to deploy the app with docker manually by manually building the image and deploying it.
299
 
300
  > **Note**
301
- > This section is provided for those who want to futher customize the docker image or for those who are extra cautious about security.
302
 
303
  > **Warning**
304
  > A note of caution the project currently only supports **x86-64** architecture and as such we do not recommend deploying the project on devices with other architectures. Though if you still want to do it then **do it at your own risk**.
305
 
306
  ### Unstable/Edge/Rolling
307
 
308
- First clone the the repository by running the following command:
309
 
310
  ```bash
311
  git clone https://github.com/neon-mmd/websurfx.git
312
  cd websurfx
313
  ```
314
 
315
- After that edit the config.lua file located under `websurfx` directory. In the config file you will specifically need to change to values which is `binding_ip_addr` and `redis_connection_url` which should make the config look something like this:
316
 
317
  ```lua
318
  -- ### General ###
@@ -322,14 +322,14 @@ threads = 8 -- the amount of threads that the app will use to run (the value sho
322
 
323
  -- ### Server ###
324
  port = "8080" -- port on which server should be launched
325
- binding_ip = "0.0.0.0" --ip address on the which server should be launched.
326
  production_use = false -- whether to use production mode or not (in other words this option should be used if it is to be used to host it on the server to provide a service to a large number of users (more than one))
327
  -- if production_use is set to true
328
  -- There will be a random delay before sending the request to the search engines, this is to prevent DDoSing the upstream search engines from a large number of simultaneous requests.
329
  request_timeout = 30 -- timeout for the search requests sent to the upstream search engines to be fetched (value in seconds).
330
  rate_limiter = {
331
- number_of_requests = 20, -- The number of request that are allowed within a provided time limit.
332
- time_limit = 3, -- The time limit in which the quantity of requests that should be accepted.
333
  }
334
 
335
  -- ### Search ###
@@ -379,13 +379,13 @@ $ docker compose up -d --build
379
  ```
380
 
381
  > **Note**
382
- > In the above command the dollar sign(**$**) refers to running the command in privilaged mode by using utilities `sudo`, `doas`, `pkgexec` or any other privilage access methods.
383
 
384
- This will take around 5-10 mins for first deployment, afterwards the docker build stages will be cached so it will be faster to be build from next time onwards. After the above step finishes launch your preferred browser and then navigate to `http://<ip_address_of_the_device>:<whatever_port_you_provided_in_the_config>`.
385
 
386
  ### Stable
387
 
388
- For the stable version, follow the same steps as above (as mentioned for the unstable/rolling/edge version) with an addition of one command which has to be performed after cloning and changing directory into the repository which makes the cloning step as follows:
389
 
390
  ```bash
391
  git clone https://github.com/neon-mmd/websurfx.git
 
18
 
19
  Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
20
 
21
+ If you want to change the port or the IP or any other configuration setting check out the [configuration docs](./configuration.md).
22
 
23
  ### Stable
24
 
25
+ For the stable version, follow the same steps as above (as mentioned for the `unstable/rolling/edge` version) with the only difference being that the package to be installed for the stable version is called `websurfx-git` instead of `websurfx-edge-git`.
26
 
27
  ## NixOS
28
 
 
32
 
33
  ### Rolling/Edge/Unstable
34
 
35
+ To get started, First, clone the repository, edit the config file which is located in the `websurfx` directory, and then build and run the websurfx server by running the following commands:
36
 
37
  ```shell
38
  git clone https://github.com/neon-mmd/websurfx.git
 
45
  ```
46
 
47
  > **Note**
48
+ > In the above command the dollar sign(**$**) refers to running the command in Privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods.
49
 
50
+ Once you have run the above set of commands, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
51
 
52
+ If you want to change the port or the IP or any other configuration setting check out the [configuration docs](./configuration.md).
53
 
54
  > Optionally, you may include it in your own flake by adding this repo to its inputs and adding it to `environment.systemPackages` as follows:
55
  >
 
76
 
77
  ### Stable
78
 
79
+ For the stable version, follow the same steps as above (as mentioned for the `unstable/rolling/edge version`) with an addition of one command which has to be performed after cloning and changing the directory into the repository which makes the building step as follows:
80
 
81
  ```shell
82
  git clone https://github.com/neon-mmd/websurfx.git
 
90
  ```
91
 
92
  > **Note**
93
+ > In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods.
94
 
95
  ## Other Distros
96
 
 
102
 
103
  ## Stable
104
 
105
+ To get started with Websurfx, clone the repository, edit the config file which is located in the `websurfx` directory, and install redis server by following the instructions located [here](https://redis.io/docs/getting-started/) and then build and run the websurfx server by running the following commands:
106
 
107
  ```shell
108
  git clone https://github.com/neon-mmd/websurfx.git
 
115
 
116
  Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
117
 
118
+ If you want to change the port or the IP or any other configuration setting check out the [configuration docs](./configuration.md).
119
 
120
  ## Rolling/Edge/Unstable
121
 
 
138
  cargo build -r --features redis-cache
139
  ```
140
 
141
+ ### Memory Cache (Default Features)
142
 
143
  > For more information on the features and their pros and cons. see: [**Features**](./features.md)
144
 
 
168
  cargo build -r --no-default-features --features redis-cache
169
  ```
170
 
171
+ > Optionally, If you have built the app with the `Redis cache`or `Hybrid cache` feature (as mentioned above) then before launching the search engine run the following command:
172
  >
173
  > ```shell
174
  > redis-server --port 8082 &
 
180
  ./target/release/websurfx
181
  ```
182
 
183
+ Once you have started the server, launch your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
184
 
185
+ If you want to change the port or the IP or any other configuration setting check out the [configuration docs](./configuration.md).
186
 
187
  # Docker Deployment
188
 
 
190
 
191
  ## Prebuild
192
 
193
+ The Websurfx project provides several prebuilt images based on the different features provided by the search engine. To get started using the prebuild image, you will first need to create a `docker-compose.yml` file with the following content:
194
 
195
  ```yaml
196
  ---
 
235
  -- There will be a random delay before sending the request to the search engines, this is to prevent DDoSing the upstream search engines from a large number of simultaneous requests.
236
  request_timeout = 30 -- timeout for the search requests sent to the upstream search engines to be fetched (value in seconds).
237
  rate_limiter = {
238
+ number_of_requests = 20, -- The number of requests that are allowed within a provided time limit.
239
+ time_limit = 3, -- The time limit in which the number of requests that should be accepted.
240
  }
241
 
242
  -- ### Search ###
 
266
  -- tokyo-night
267
  -- tomorrow-night
268
  -- }}
269
+ colorscheme = "catppuccin-mocha" -- the colorscheme name that should be used for the website theme
270
+ theme = "simple" -- the theme name that should be used for the website
271
 
272
  -- ### Caching ###
273
  redis_url = "redis://redis:6379" -- redis connection url address on which the client should connect on.
 
286
  ```
287
 
288
  > **Note**
289
+ > In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec` or any other privileged access methods.
290
 
291
  Then launch the browser of your choice and navigate to http://<ip_address_of_the_device>:<whatever_port_you_provided_in_the_config>.
292
 
293
  > **Note**
294
+ > The official prebuild images only support `stable` versions of the app and will not support `rolling/edge/unstable` versions. But with support and contribution, it could be made available for these versions as well πŸ™‚.
295
 
296
  ## Manual Deployment
297
 
298
  This section covers how to deploy the app with docker manually by manually building the image and deploying it.
299
 
300
  > **Note**
301
+ > This section is provided for those who want to further customize the docker image or for those who are extra cautious about security.
302
 
303
  > **Warning**
304
  > A note of caution the project currently only supports **x86-64** architecture and as such we do not recommend deploying the project on devices with other architectures. Though if you still want to do it then **do it at your own risk**.
305
 
306
  ### Unstable/Edge/Rolling
307
 
308
+ First, clone the repository by running the following command:
309
 
310
  ```bash
311
  git clone https://github.com/neon-mmd/websurfx.git
312
  cd websurfx
313
  ```
314
 
315
+ After that edit the config.lua file located under `websurfx` directory. In the config file, you will specifically need to change to values which are `binding_ip_addr` and `redis_connection_url` which should make the config look something like this:
316
 
317
  ```lua
318
  -- ### General ###
 
322
 
323
  -- ### Server ###
324
  port = "8080" -- port on which server should be launched
325
+ binding_ip = "0.0.0.0" --ip address on the server should be launched.
326
  production_use = false -- whether to use production mode or not (in other words this option should be used if it is to be used to host it on the server to provide a service to a large number of users (more than one))
327
  -- if production_use is set to true
328
  -- There will be a random delay before sending the request to the search engines, this is to prevent DDoSing the upstream search engines from a large number of simultaneous requests.
329
  request_timeout = 30 -- timeout for the search requests sent to the upstream search engines to be fetched (value in seconds).
330
  rate_limiter = {
331
+ number_of_requests = 20, -- The number of requests that are allowed within a provided time limit.
332
+ time_limit = 3, -- The time limit in which the number of requests that should be accepted.
333
  }
334
 
335
  -- ### Search ###
 
379
  ```
380
 
381
  > **Note**
382
+ > In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods.
383
 
384
+ This will take around 5-10 mins for the first deployment, afterwards, the docker build stages will be cached so it will be faster to build from next time onwards. After the above step finishes launch your preferred browser and then navigate to `http://<ip_address_of_the_device>:<whatever_port_you_provided_in_the_config>`.
385
 
386
  ### Stable
387
 
388
+ For the stable version, follow the same steps as above (as mentioned for the unstable/rolling/edge version) with an addition of one command which has to be performed after cloning and changing the directory into the repository which makes the cloning step as follows:
389
 
390
  ```bash
391
  git clone https://github.com/neon-mmd/websurfx.git