diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 943ffa4d0d4a..dad9bfb5985e 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -12,20 +12,20 @@
- Make sure to follow the [languages documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LANGUAGES.md)
- [ ] Add language to `packages/schemas/src/languages.ts`
- [ ] Add language to exactly one group in `frontend/src/ts/constants/languages.ts`
- - [ ] Add language json file to `frontend/static/languages`
+ - [ ] Add language json file to `frontend/static/languages`
- [ ] Adding a theme?
- Make sure to follow the [themes documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/THEMES.md)
- [ ] Add theme to `packages/schemas/src/themes.ts`
- [ ] Add theme to `frontend/src/ts/constants/themes.ts`
- [ ] Add theme css file to `frontend/static/themes`
- - [ ] Add some screenshots of the theme, especially with different test settings (colorful, flip colors) to your pull request
+ - [ ] Add some screenshots of the theme, especially with different test settings (colorful, flip colors) to your pull request
- [ ] Adding a layout?
- [ ] Make sure to follow the [layouts documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LAYOUTS.md)
- [ ] Add layout to `packages/schemas/src/layouts.ts`
- - [ ] Add layout json file to `frontend/static/layouts`
+ - [ ] Add layout json file to `frontend/static/layouts`
- [ ] Adding a font?
- Make sure to follow the [themes documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/FONTS.md)
- - [ ] Add font file to `frontend/static/webfonts`
+ - [ ] Add font file to `frontend/static/webfonts`
- [ ] Add font to `packages/schemas/src/fonts.ts`
- [ ] Add font to `frontend/src/ts/constants/fonts.ts`
- [ ] Check if any open issues are related to this PR; if so, be sure to tag them below.
diff --git a/docker/BUILD.md b/docker/BUILD.md
index 36c36dd26db8..5306d66b9b0a 100644
--- a/docker/BUILD.md
+++ b/docker/BUILD.md
@@ -1,8 +1,8 @@
## Build locally
-From root directoy:
+From root directoy:
```
docker buildx build --progress=plain --no-cache -t monkeytype/monkeytype-backend:latest . -f ./docker/backend/Dockerfile
docker buildx build --progress=plain --no-cache -t monkeytype/monkeytype-frontend:latest . -f ./docker/frontend/Dockerfile
-```
\ No newline at end of file
+```
diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md
index f509eaab9c13..b30d355dce84 100644
--- a/docs/CODE_OF_CONDUCT.md
+++ b/docs/CODE_OF_CONDUCT.md
@@ -1,4 +1,3 @@
-
# Contributor Covenant Code of Conduct
## Our Pledge
@@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community includes:
-* Demonstrating empathy and kindness toward other people
-* Being respectful of differing opinions, viewpoints, and experiences
-* Giving and gracefully accepting constructive feedback
-* Accepting responsibility and apologizing to those affected by our mistakes,
+- Demonstrating empathy and kindness toward other people
+- Being respectful of differing opinions, viewpoints, and experiences
+- Giving and gracefully accepting constructive feedback
+- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
-* Focusing on what is best not just for us as individuals, but for the overall
+- Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
-* The use of sexualized language or imagery, and sexual attention or advances of
+- The use of sexualized language or imagery, and sexual attention or advances of
any kind
-* Trolling, insulting or derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or email address,
+- Trolling, insulting or derogatory comments, and personal or political attacks
+- Public or private harassment
+- Publishing others' private information, such as a physical or email address,
without their explicit permission
-* Other conduct that could reasonably be considered inappropriate in a
+- Other conduct that could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
@@ -60,7 +59,7 @@ representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported to the community leaders responsible for enforcement at
+reported to the community leaders responsible for enforcement at
jack@monkeytype.com.
All complaints will be reviewed and investigated promptly and fairly.
diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md
index 968f9be8431e..1915930207fb 100644
--- a/docs/CONTRIBUTING.md
+++ b/docs/CONTRIBUTING.md
@@ -27,8 +27,7 @@ Below is a set of general guidelines for different types of changes.
### Pull Request Naming Guidelines
-We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for our pull request titles (and commit messages on the master branch) and also include the author name at the end inside parenthesis. Please follow the guidelines below when naming pull requests.
-
+We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for our pull request titles (and commit messages on the master branch) and also include the author name at the end inside parenthesis. Please follow the guidelines below when naming pull requests.
For types, we use the following:
@@ -62,7 +61,7 @@ Before submitting a theme make sure...
- your theme has been added to the `_list` file and the `textColor` property is the theme's main color
- your theme is clear and readable with both `flip test colors` and `colorful mode` enabled and disabled
-If you want to contribute themes but don't know how, check [THEMES.md](/docs/THEMES.md)
+If you want to contribute themes but don't know how, check [THEMES.md](/docs/THEMES.md)
### Language Guidelines
@@ -84,7 +83,6 @@ If you want to contribute languages but don't know how, check [LANGUAGES.md](/do
- For quotes not in English, please include translations of quotes in the description of your pull request. This assists in the verification process to ensure the integrity of the quotes.
- Remember to name your pull request properly. For example, if you are adding new quotes for the language `French`, your pull request should be named `impr(quotes): add French quotes`.
-
If you want to contribute quotes but don't know how, check [QUOTES.md](/docs/QUOTES.md)
### Layout Guidelines
diff --git a/docs/CONTRIBUTING_ADVANCED.md b/docs/CONTRIBUTING_ADVANCED.md
index 13c5d774c6d1..5eb1f71220f5 100644
--- a/docs/CONTRIBUTING_ADVANCED.md
+++ b/docs/CONTRIBUTING_ADVANCED.md
@@ -25,9 +25,8 @@ This contribution guide is for cases in which you need to test the functionality
### Git
-
> [!WARNING]
-> **If you are on Windows, run `git config --global core.autocrlf false` before cloning this repo to prevent CRLF errors.**
+> **If you are on Windows, run `git config --global core.autocrlf false` before cloning this repo to prevent CRLF errors.**
Git is optional but we recommend you utilize it. Monkeytype uses the Git source control management (SCM) system for its version control. Assuming you don't have experience typing commands in the command line, we suggest installing [Sourcetree](https://www.sourcetreeapp.com/). You will be able to utilize the power of Git without needing to remember any cryptic commands. Using a Git client such as Sourcetree won't give you access to the full functionality of Git, but provides an easy-to-understand graphical user interface (GUI). Once you have downloaded Sourcetree, run the installer. While installing Sourcetree, keep your eyes peeled for the option to also install Git with Sourcetree. This is the option you will need to look for in order to install Git. **Make sure to click yes in the installer to install Git with Sourcetree.**
@@ -51,18 +50,15 @@ The account system will not let you create an account without a Firebase project
1. Create a Firebase account if you already haven't done so.
1. [Create a new Firebase project.](https://console.firebase.google.com/u/0/)
-
- The project name doesn't matter, but the name `monkeytype` would be preferred.
- Google Analytics is not necessary.
1. Enable Firebase Authentication
-
- In the Firebase console, go to `Build > Authentication > Sign-in method`
- Click on `Email/Password`, enable it, and save
- Click on `Google`, add a support email, and save
1. Generate a Firebase Admin private key (optional, only needed if you want to work on the backend)
-
- In your Firebase console, go to Project Settings > Service Accounts
- Click "Generate New Private Key"
- Save as `serviceAccountKey.json` inside the `backend/src/credentials/` directory.
@@ -70,7 +66,6 @@ The account system will not let you create an account without a Firebase project
1. Run `pnpm add -g firebase-tools` to install the Firebase Command Line Interface.
1. Run `firebase login` on your terminal to log in to the same Google account you just used to create the project.
1. Within the `frontend` directory, duplicate `.firebaserc_example`, rename the new file to `.firebaserc` and change the project name to the firebase project id you just created.
-
- Run `firebase projects:list` to find your firebase project ID.
- If `.firebaserc_example` does not exist after cloning, create your own with:
@@ -109,8 +104,8 @@ Follow these steps if you want to work on anything involving the database/accoun
2. Setup the database server
-| Manual | Docker (recommended) |
-| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Manual | Docker (recommended) |
+| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
Install [MongoDB Community Edition](https://docs.mongodb.com/manual/administration/install-community/)
Install [Docker](http://www.docker.io/gettingstarted/#h_installation) on your machine
Run `npm run docker-db-only` from the `./backend` directory
|
3. (Optional) Install [MongoDB-compass](https://www.mongodb.com/try/download/compass?tck=docs_compass). This tool can be used to see and manipulate your database visually.
@@ -134,15 +129,15 @@ npm run dev
### Backend only
-| Manual | Docker |
-| --------------------------- | ------------------------------ |
-| `npm run dev-be` | `cd backend && npm run docker` |
+| Manual | Docker |
+| ---------------- | ------------------------------ |
+| `npm run dev-be` | `cd backend && npm run docker` |
### Frontend only
-| Manual | Docker |
-| ---------------------------- | ------------------------------- |
-| `npm run dev-fe` | `cd frontend && npm run docker` |
+| Manual | Docker |
+| ---------------- | ------------------------------- |
+| `npm run dev-fe` | `cd frontend && npm run docker` |
These commands will start a local development website on [port 3000](http://localhost:3000) and a local development server on [port 5005](http://localhost:5005). They will automatically rebuild the website/server when you make changes in the `src/` directory. Use Ctrl+C to stop them.
diff --git a/docs/FONTS.md b/docs/FONTS.md
index 8cb1e194bf39..cbf2cec476c5 100644
--- a/docs/FONTS.md
+++ b/docs/FONTS.md
@@ -13,7 +13,7 @@ First, you will have to make a personal copy of the Monkeytype repository, also
## Adding Fonts
-Once you have forked the repository you can now add your font. Place the font file in `./frontend/static/webfonts` e.g. `My-Font.woff2`.
+Once you have forked the repository you can now add your font. Place the font file in `./frontend/static/webfonts` e.g. `My-Font.woff2`.
> [!NOTE]
> Your font needs to be in the `.woff2` format. Your filename cannot include spaces or start with a number.
@@ -29,7 +29,7 @@ const KnownFontNameSchema = z.enum(
"My_Font",
```
-Call it whatever you want but make sure you replace spaces with underscores and the font does not start with a number.
+Call it whatever you want but make sure you replace spaces with underscores and the font does not start with a number.
Then, go to `./frontend/src/ts/constants/fonts.ts` and add the following code to the _end_ of the `Fonts` object near to the very end of the file:
@@ -54,4 +54,3 @@ Create a pull request:
## Language Guidelines
Make sure your language follows the [Language guidelines](./CONTRIBUTING.md#language-guidelines).
-
diff --git a/docs/LANGUAGES.md b/docs/LANGUAGES.md
index 9900d2114faf..e65156da5992 100644
--- a/docs/LANGUAGES.md
+++ b/docs/LANGUAGES.md
@@ -29,21 +29,20 @@ The contents of the file should be as follows:
```
It is recommended that you familiarize yourselves with JSON before adding a language. For the `name` field, put the name of your language. `rightToLeft` indicates how the language is written. If it is written right to left then put `true`, otherwise put `false`.
-`ligatures` A ligature occurs when multiple letters are joined together to form a character [more details](). If there's joining in the words, which is the case in languages like (Arabic, Malayalam, Persian, Sanskrit, Central_Kurdish... etc.), then set the value to `true`, otherwise set it to `false`. For `bcp47` put your languages [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag). If the words you're adding are ordered by frequency (most common words at the top, least at the bottom) set the value of `orderedByFrequency` to `true`, otherwise `false`. Finally, add your list of words to the `words` field.
+`ligatures` A ligature occurs when multiple letters are joined together to form a character [more details](). If there's joining in the words, which is the case in languages like (Arabic, Malayalam, Persian, Sanskrit, Central_Kurdish... etc.), then set the value to `true`, otherwise set it to `false`. For `bcp47` put your languages [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag). If the words you're adding are ordered by frequency (most common words at the top, least at the bottom) set the value of `orderedByFrequency` to `true`, otherwise `false`. Finally, add your list of words to the `words` field.
-Then, go to `packages/schemas/src/languages.ts` and add your new language name at the _end_ of the `LanguageSchema` enum. Make sure to end the line with a comma. Make sure to add all your language names if you have created multiple word lists of differing lengths in the same language.
+Then, go to `packages/schemas/src/languages.ts` and add your new language name at the _end_ of the `LanguageSchema` enum. Make sure to end the line with a comma. Make sure to add all your language names if you have created multiple word lists of differing lengths in the same language.
```typescript
export const LanguageSchema = z.enum([
"english",
"english_1k",
- ...
- "your_language_name",
+ ..."your_language_name",
"your_language_name_10k",
]);
```
-Then, go to `frontend/src/ts/constants/language.ts` and add your new language name to the `LanguageGroups` map. You can either add it to an existing group or add a new one. Make sure to add all your language names if you have created multiple word lists of differing lengths in the same language.
+Then, go to `frontend/src/ts/constants/language.ts` and add your new language name to the `LanguageGroups` map. You can either add it to an existing group or add a new one. Make sure to add all your language names if you have created multiple word lists of differing lengths in the same language.
```typescript
export const LanguageGroups: Record = {
@@ -68,4 +67,3 @@ Create a pull request:
## Language Guidelines
Make sure your language follows the [Language guidelines](./CONTRIBUTING.md#language-guidelines).
-
diff --git a/docs/LAYOUTS.md b/docs/LAYOUTS.md
index 5652ca1724f5..fca143d36ca5 100644
--- a/docs/LAYOUTS.md
+++ b/docs/LAYOUTS.md
@@ -1,7 +1,7 @@
### **Table of Contents**
- [Forking Monkeytype](#forking-monkeytype)
-- [Creating Layouts](#creating-layouts )
+- [Creating Layouts](#creating-layouts)
- [Committing Layouts](#committing-layouts)
### Forking Monkeytype
@@ -79,36 +79,31 @@ The contents of the file should be as follows:
"row5": [[" "]]
}
}
-
-
```
It is recommended that you familiarize yourselves with JSON before adding a layout.
`keymapShowTopRow` indicates whether to always show the first row of the layout.
-`type` can be `ansi` or `iso`.
+`type` can be `ansi` or `iso`.
-In `keys` you need to specify `row1` to `row5`. Add the keys within the row as string-array. The string-array can have up to four character. The character define unshifted, shifted, alt-gr and shifted alt-gr character in this order. For example `["e","E","€"]` defines `e` on regular key press, `E` if `shift` is held and `€` if `alt-gr` is held.
+In `keys` you need to specify `row1` to `row5`. Add the keys within the row as string-array. The string-array can have up to four character. The character define unshifted, shifted, alt-gr and shifted alt-gr character in this order. For example `["e","E","€"]` defines `e` on regular key press, `E` if `shift` is held and `€` if `alt-gr` is held.
-**Note:** Quote and backslash characters need to be escaped: `\"` and `\\`.
+**Note:** Quote and backslash characters need to be escaped: `\"` and `\\`.
For ansi layouts the number of keys need to be exactly thirteen for `row1` and `row2`, eleven for `row3`, ten for `row4` and one or two for `row5`.
-For iso the number of keys need to be exactly thirteen for `row1`, twelve for `row2` and `row3`, eleven for `row4` and one or two for `row5`.
-
+For iso the number of keys need to be exactly thirteen for `row1`, twelve for `row2` and `row3`, eleven for `row4` and one or two for `row5`.
-
-In addition to the layout file you need to add your layout to the `packages/schemas/src/layouts.ts` file. Just append your layout name (without the `.json`) at the __end__ of the `LayoutNameSchema`. Remember to add a comma like this:
+In addition to the layout file you need to add your layout to the `packages/schemas/src/layouts.ts` file. Just append your layout name (without the `.json`) at the **end** of the `LayoutNameSchema`. Remember to add a comma like this:
```ts
- export const LayoutNameSchema = z.enum([
- "qwerty",
- "dvorak",
- "colemak",
- ...
- "your_layout_name",
+export const LayoutNameSchema = z.enum([
+ "qwerty",
+ "dvorak",
+ "colemak",
+ ..."your_layout_name",
]);
-```
+```
### Committing Layouts
@@ -124,4 +119,4 @@ Make sure your PR title follow the syntax `feat(layout): add layou
## Layout Guidelines
-Make sure your layout follows the [Layout guidelines](./CONTRIBUTING.md#layout-guidelines).
\ No newline at end of file
+Make sure your layout follows the [Layout guidelines](./CONTRIBUTING.md#layout-guidelines).
diff --git a/docs/QUOTES.md b/docs/QUOTES.md
index d2ae30b3e6d4..2d3b84cb1927 100644
--- a/docs/QUOTES.md
+++ b/docs/QUOTES.md
@@ -39,4 +39,3 @@ Create a pull request:
## Quote Guidelines
Make sure your quote(s) follows the [Quote guidelines](./CONTRIBUTING.md#quote-guidelines).
-
diff --git a/docs/SELF_HOSTING.md b/docs/SELF_HOSTING.md
index 72a6e1416225..4862ed7123da 100644
--- a/docs/SELF_HOSTING.md
+++ b/docs/SELF_HOSTING.md
@@ -7,39 +7,38 @@
- [Monkeytype Self Hosting](#monkeytype-self-hosting)
- - [Table of contents](#table-of-contents)
- - [Prerequisites](#prerequisites)
- - [Quickstart](#quickstart)
- - [Account System](#account-system)
- - [Setup Firebase](#setup-firebase)
- - [Update backend configuration](#update-backend-configuration)
- - [Setup Recaptcha](#setup-recaptcha)
- - [Setup email optional](#setup-email-optional)
- - [Enable daily leaderboards](#enable-daily-leaderboards)
- - [Configuration files](#configuration-files)
- - [env file](#env-file)
- - [serviceAccountKey.json](#serviceaccountkeyjson)
- - [backend-configuration.json](#backend-configurationjson)
+ - [Table of contents](#table-of-contents)
+ - [Prerequisites](#prerequisites)
+ - [Quickstart](#quickstart)
+ - [Account System](#account-system)
+ - [Setup Firebase](#setup-firebase)
+ - [Update backend configuration](#update-backend-configuration)
+ - [Setup Recaptcha](#setup-recaptcha)
+ - [Setup email optional](#setup-email-optional)
+ - [Enable daily leaderboards](#enable-daily-leaderboards)
+ - [Configuration files](#configuration-files)
+ - [env file](#env-file)
+ - [serviceAccountKey.json](#serviceaccountkeyjson)
+ - [backend-configuration.json](#backend-configurationjson)
-
## Prerequisites
+
- you need to have `docker` and `docker-compose-plugin` installed. Follow the [docker documentation](https://docs.docker.com/compose/install/) on how to do this.
## Quickstart
-- create a new directory (e.g. `monkeytype`) and navigate into it.
+- create a new directory (e.g. `monkeytype`) and navigate into it.
- download the [docker-compose.yml](https://github.com/monkeytypegame/monkeytype/tree/master/docker/docker-compose.yml) file.
- create an `.env` file, you can copy the content from the [example.env](https://github.com/monkeytypegame/monkeytype/tree/master/docker/example.env).
- download the [backend-configuration.json](https://github.com/monkeytypegame/monkeytype/tree/master/docker/backend-configuration.json)
- run `docker compose up -d`
- after the command exits successfully you can access [http://localhost:8080](http://localhost:8080)
-
## Account System
-By default, user sign-up and login are disabled. To enable this, you'll need to set up a Firebase project.
+By default, user sign-up and login are disabled. To enable this, you'll need to set up a Firebase project.
Stop the running docker containers using `docker compose down` before making any changes.
### Setup Firebase
@@ -50,7 +49,7 @@ Stop the running docker containers using `docker compose down` before making any
- uncheck "enable google analytics"
- enable authentication
- open the [firebase console](https://console.firebase.google.com/) and open your project
- - go to `Authentication > Sign-in method`
+ - go to `Authentication > Sign-in method`
- enable `Email/Password` and save
- whitelist your domain
- In the Firebase console, go to `Authentication > Sign-in method`
@@ -63,11 +62,11 @@ Stop the running docker containers using `docker compose down` before making any
- save it as `serviceAccountKey.json`
- update `docker-compose.yml` and uncomment the volume block in the `monkeytype-backend` container to mount the Firebase service account:
```yaml
- #uncomment to enable the account system, check the SELF_HOSTING.md file
- - type: bind
- source: ./serviceAccountKey.json
- target: /app/backend/src/credentials/serviceAccountKey.json
- read_only: true
+ #uncomment to enable the account system, check the SELF_HOSTING.md file
+ - type: bind
+ source: ./serviceAccountKey.json
+ target: /app/backend/src/credentials/serviceAccountKey.json
+ read_only: true
```
- update the `.env` file
@@ -76,56 +75,57 @@ Stop the running docker containers using `docker compose down` before making any
- if your project has no apps yet, create a new Web app (`>` icon)
- nickname `monkeytype`
- uncheck `set up firebase hosting`
- - click `Register app`
- - select your app and select `Config` for `SDK setup and configuration`
- - it will display something like this:
- ```
- const firebaseConfig = {
- apiKey: "AAAAAAAA",
- authDomain: "monkeytype-00000.firebaseapp.com",
- projectId: "monkeytype-00000",
- storageBucket: "monkeytype-00000.appspot.com",
- messagingSenderId: "90000000000",
- appId: "1:90000000000:web:000000000000"
- };
- ```
- - update the `.env` file with the values above:
- ```
- FIREBASE_APIKEY=AAAAAAAA
- FIREBASE_AUTHDOMAIN=monkeytype-00000.firebaseapp.com
- FIREBASE_PROJECTID=monkeytype-00000
- FIREBASE_STORAGEBUCKET=monkeytype-00000.appspot.com
- FIREBASE_MESSAGINGSENDERID=90000000000
- FIREBASE_APPID=1:90000000000:web:000000000000
- ```
+ - click `Register app`
+ - select your app and select `Config` for `SDK setup and configuration`
+ - it will display something like this:
+ ```
+ const firebaseConfig = {
+ apiKey: "AAAAAAAA",
+ authDomain: "monkeytype-00000.firebaseapp.com",
+ projectId: "monkeytype-00000",
+ storageBucket: "monkeytype-00000.appspot.com",
+ messagingSenderId: "90000000000",
+ appId: "1:90000000000:web:000000000000"
+ };
+ ```
+ - update the `.env` file with the values above:
+ ```
+ FIREBASE_APIKEY=AAAAAAAA
+ FIREBASE_AUTHDOMAIN=monkeytype-00000.firebaseapp.com
+ FIREBASE_PROJECTID=monkeytype-00000
+ FIREBASE_STORAGEBUCKET=monkeytype-00000.appspot.com
+ FIREBASE_MESSAGINGSENDERID=90000000000
+ FIREBASE_APPID=1:90000000000:web:000000000000
+ ```
### Update backend configuration
- update the `backend-configuration.json` file and add/modify
- ```json
- {
- "users": {
- "signUp": true,
- "profiles": {
- "enabled": true
- }
- }
+ ```json
+ {
+ "users": {
+ "signUp": true,
+ "profiles": {
+ "enabled": true
+ }
}
- ```
+ }
+ ```
### Setup Recaptcha
- [create](https://www.google.com/recaptcha/admin/create) a new recaptcha token
- - label: `monkeytype`
- - type: v2
- - domain: the domain of the frontend
+ - label: `monkeytype`
+ - type: v2
+ - domain: the domain of the frontend
- update the `.env` file with the site key from the previous step
- ```
- RECAPTCHA_SITE_KEY="your site key"
- RECAPTCHA_SECRET="your secret key"
- ```
+ ```
+ RECAPTCHA_SITE_KEY="your site key"
+ RECAPTCHA_SECRET="your secret key"
+ ```
If you host privately you can use these defaults:
+
```
RECAPTCHA_SITE_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
RECAPTCHA_SECRET=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
@@ -143,30 +143,31 @@ EMAIL_USER=mailuser # username to authenticate with your mailserver
EMAIL_PASS=mailpass # password for the user
EMAIL_PORT=465 # port, likely 465 or 587
EMAIL_FROM="Support "
-```
+```
## Enable daily leaderboards
To enable daily leaderboards update the `backend-configuration.json` file and add/modify
+
```json
{
- "dailyLeaderboards": {
- "enabled": true,
- "maxResults": 250,
- "leaderboardExpirationTimeInDays": 1,
- "validModeRules": [
- {
- "language": "english",
- "mode": "time",
- "mode2": "15"
- },
- {
- "language": "english",
- "mode": "time",
- "mode2": "60"
- }
- ]
- }
+ "dailyLeaderboards": {
+ "enabled": true,
+ "maxResults": 250,
+ "leaderboardExpirationTimeInDays": 1,
+ "validModeRules": [
+ {
+ "language": "english",
+ "mode": "time",
+ "mode2": "15"
+ },
+ {
+ "language": "english",
+ "mode": "time",
+ "mode2": "60"
+ }
+ ]
+ }
}
```
@@ -189,4 +190,4 @@ Contains your firebase config, only needed if you want to allow users to signup.
Configuration of the backend. Check the [default configuration](https://github.com/monkeytypegame/monkeytype/blob/master/backend/src/constants/base-configuration.ts#L8) for possible values.
> [!NOTE]
-> Configuration changes are applied only on container startup. You must restart the container for your updates to take effect.
+> Configuration changes are applied only on container startup. You must restart the container for your updates to take effect.
diff --git a/docs/THEMES.md b/docs/THEMES.md
index 6abb11771a17..d796d4b55e19 100644
--- a/docs/THEMES.md
+++ b/docs/THEMES.md
@@ -20,24 +20,24 @@ Then add this code to your file:
```css
:root {
- --bg-color: #ffffff;
- --main-color: #ffffff;
- --caret-color: #ffffff;
- --sub-color: #ffffff;
- --sub-alt-color: #ffffff;
- --text-color: #ffffff;
- --error-color: #ffffff;
- --error-extra-color: #ffffff;
- --colorful-error-color: #ffffff;
- --colorful-error-extra-color: #ffffff;
- }
+ --bg-color: #ffffff;
+ --main-color: #ffffff;
+ --caret-color: #ffffff;
+ --sub-color: #ffffff;
+ --sub-alt-color: #ffffff;
+ --text-color: #ffffff;
+ --error-color: #ffffff;
+ --error-extra-color: #ffffff;
+ --colorful-error-color: #ffffff;
+ --colorful-error-extra-color: #ffffff;
+}
```
Here is an image showing what all the properties correspond to:
-Change the corresponding hex codes to create your theme.
-Then, go to `./packages/schemas/src/themes.ts` and add your new theme name at the _end_ of the `ThemeNameSchema` enum. Make sure to end the line with a comma.
+Change the corresponding hex codes to create your theme.
+Then, go to `./packages/schemas/src/themes.ts` and add your new theme name at the _end_ of the `ThemeNameSchema` enum. Make sure to end the line with a comma.
```typescript
export const ThemeNameSchema = z.enum([
@@ -78,4 +78,3 @@ Add some screenshots of your theme to the pull request. Click "create pull reque
## Theme Guidelines
Make sure your theme follows the [Theme guidelines](./CONTRIBUTING.md#theme-guidelines).
-
diff --git a/frontend/__tests__/utils/url-handler.spec.ts b/frontend/__tests__/utils/url-handler.spec.ts
index a89a7ccdd6c4..d6c372ccaca9 100644
--- a/frontend/__tests__/utils/url-handler.spec.ts
+++ b/frontend/__tests__/utils/url-handler.spec.ts
@@ -3,12 +3,12 @@ import { Difficulty, Mode, Mode2 } from "@monkeytype/schemas/shared";
import { compressToURI } from "lz-ts";
import * as UpdateConfig from "../../src/ts/config";
import * as Notifications from "../../src/ts/elements/notifications";
-import { CustomTextSettings } from "../../src/ts/test/custom-text";
import * as TestLogic from "../../src/ts/test/test-logic";
import * as TestState from "../../src/ts/test/test-state";
import * as Misc from "../../src/ts/utils/misc";
import { loadTestSettingsFromUrl } from "../../src/ts/utils/url-handler";
import { FunboxName } from "@monkeytype/schemas/configs";
+import { CustomTextSettings } from "@monkeytype/schemas/results";
//mock modules to avoid dependencies
vi.mock("../../src/ts/test/test-logic", () => ({
diff --git a/frontend/src/html/header.html b/frontend/src/html/header.html
index cd3116baf2d8..7836586376fc 100644
--- a/frontend/src/html/header.html
+++ b/frontend/src/html/header.html
@@ -58,15 +58,6 @@