Skip to content

Commit dc1ac8f

Browse files
authored
Merge branch 'master' into master
2 parents ac53a6a + 2dc99e9 commit dc1ac8f

File tree

95 files changed

+1253
-1188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1253
-1188
lines changed

.github/pull_request_template.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212
- Make sure to follow the [languages documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LANGUAGES.md)
1313
- [ ] Add language to `packages/schemas/src/languages.ts`
1414
- [ ] Add language to exactly one group in `frontend/src/ts/constants/languages.ts`
15-
- [ ] Add language json file to `frontend/static/languages`
15+
- [ ] Add language json file to `frontend/static/languages`
1616
- [ ] Adding a theme?
1717
- Make sure to follow the [themes documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/THEMES.md)
1818
- [ ] Add theme to `packages/schemas/src/themes.ts`
1919
- [ ] Add theme to `frontend/src/ts/constants/themes.ts`
2020
- [ ] Add theme css file to `frontend/static/themes`
21-
- [ ] Add some screenshots of the theme, especially with different test settings (colorful, flip colors) to your pull request
21+
- [ ] Add some screenshots of the theme, especially with different test settings (colorful, flip colors) to your pull request
2222
- [ ] Adding a layout?
2323
- [ ] Make sure to follow the [layouts documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LAYOUTS.md)
2424
- [ ] Add layout to `packages/schemas/src/layouts.ts`
25-
- [ ] Add layout json file to `frontend/static/layouts`
25+
- [ ] Add layout json file to `frontend/static/layouts`
2626
- [ ] Adding a font?
2727
- Make sure to follow the [themes documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/FONTS.md)
28-
- [ ] Add font file to `frontend/static/webfonts`
28+
- [ ] Add font file to `frontend/static/webfonts`
2929
- [ ] Add font to `packages/schemas/src/fonts.ts`
3030
- [ ] Add font to `frontend/src/ts/constants/fonts.ts`
3131
- [ ] Check if any open issues are related to this PR; if so, be sure to tag them below.

backend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
"@vitest/coverage-v8": "4.0.15",
8181
"concurrently": "8.2.2",
8282
"openapi3-ts": "2.0.2",
83-
"oxlint": "1.34.0",
84-
"oxlint-tsgolint": "0.9.2",
83+
"oxlint": "1.36.0",
84+
"oxlint-tsgolint": "0.10.0",
8585
"readline-sync": "1.4.10",
8686
"supertest": "7.1.4",
8787
"testcontainers": "11.10.0",

backend/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async function bootServer(port: number): Promise<Server> {
8989
return process.exit(1);
9090
}
9191

92-
return app.listen(PORT, () => {
92+
return app.listen(port, () => {
9393
Logger.success(`API server listening on port ${port}`);
9494
});
9595
}

docker/BUILD.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## Build locally
22

3-
From root directoy:
3+
From root directoy:
44

55
```
66
docker buildx build --progress=plain --no-cache -t monkeytype/monkeytype-backend:latest . -f ./docker/backend/Dockerfile
77
docker buildx build --progress=plain --no-cache -t monkeytype/monkeytype-frontend:latest . -f ./docker/frontend/Dockerfile
8-
```
8+
```

docs/CODE_OF_CONDUCT.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Contributor Covenant Code of Conduct
32

43
## Our Pledge
@@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
1817
Examples of behavior that contributes to a positive environment for our
1918
community includes:
2019

21-
* Demonstrating empathy and kindness toward other people
22-
* Being respectful of differing opinions, viewpoints, and experiences
23-
* Giving and gracefully accepting constructive feedback
24-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2524
and learning from the experience
26-
* Focusing on what is best not just for us as individuals, but for the overall
25+
- Focusing on what is best not just for us as individuals, but for the overall
2726
community
2827

2928
Examples of unacceptable behavior include:
3029

31-
* The use of sexualized language or imagery, and sexual attention or advances of
30+
- The use of sexualized language or imagery, and sexual attention or advances of
3231
any kind
33-
* Trolling, insulting or derogatory comments, and personal or political attacks
34-
* Public or private harassment
35-
* Publishing others' private information, such as a physical or email address,
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
3635
without their explicit permission
37-
* Other conduct that could reasonably be considered inappropriate in a
36+
- Other conduct that could reasonably be considered inappropriate in a
3837
professional setting
3938

4039
## Enforcement Responsibilities
@@ -60,7 +59,7 @@ representative at an online or offline event.
6059
## Enforcement
6160

6261
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63-
reported to the community leaders responsible for enforcement at
62+
reported to the community leaders responsible for enforcement at
6463
6564
All complaints will be reviewed and investigated promptly and fairly.
6665

docs/CONTRIBUTING.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ Below is a set of general guidelines for different types of changes.
2727

2828
### Pull Request Naming Guidelines
2929

30-
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.
31-
30+
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.
3231

3332
For types, we use the following:
3433

@@ -62,7 +61,7 @@ Before submitting a theme make sure...
6261
- your theme has been added to the `_list` file and the `textColor` property is the theme's main color
6362
- your theme is clear and readable with both `flip test colors` and `colorful mode` enabled and disabled
6463

65-
If you want to contribute themes but don't know how, check [THEMES.md](/docs/THEMES.md)
64+
If you want to contribute themes but don't know how, check [THEMES.md](/docs/THEMES.md)
6665

6766
### Language Guidelines
6867

@@ -84,7 +83,6 @@ If you want to contribute languages but don't know how, check [LANGUAGES.md](/do
8483
- 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.
8584
- 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`.
8685

87-
8886
If you want to contribute quotes but don't know how, check [QUOTES.md](/docs/QUOTES.md)
8987

9088
### Layout Guidelines

docs/CONTRIBUTING_ADVANCED.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ This contribution guide is for cases in which you need to test the functionality
2525

2626
### Git
2727

28-
2928
> [!WARNING]
30-
> **If you are on Windows, run `git config --global core.autocrlf false` before cloning this repo to prevent CRLF errors.**
29+
> **If you are on Windows, run `git config --global core.autocrlf false` before cloning this repo to prevent CRLF errors.**
3130
3231
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.**
3332

@@ -51,26 +50,22 @@ The account system will not let you create an account without a Firebase project
5150

5251
1. Create a Firebase account if you already haven't done so.
5352
1. [Create a new Firebase project.](https://console.firebase.google.com/u/0/)
54-
5553
- The project name doesn't matter, but the name `monkeytype` would be preferred.
5654
- Google Analytics is not necessary.
5755

5856
1. Enable Firebase Authentication
59-
6057
- In the Firebase console, go to `Build > Authentication > Sign-in method`
6158
- Click on `Email/Password`, enable it, and save
6259
- Click on `Google`, add a support email, and save
6360

6461
1. Generate a Firebase Admin private key (optional, only needed if you want to work on the backend)
65-
6662
- In your Firebase console, go to Project Settings > Service Accounts
6763
- Click "Generate New Private Key"
6864
- Save as `serviceAccountKey.json` inside the `backend/src/credentials/` directory.
6965

7066
1. Run `pnpm add -g firebase-tools` to install the Firebase Command Line Interface.
7167
1. Run `firebase login` on your terminal to log in to the same Google account you just used to create the project.
7268
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.
73-
7469
- Run `firebase projects:list` to find your firebase project ID.
7570
- If `.firebaserc_example` does not exist after cloning, create your own with:
7671

@@ -109,8 +104,8 @@ Follow these steps if you want to work on anything involving the database/accoun
109104

110105
2. Setup the database server
111106

112-
| Manual | Docker (recommended) |
113-
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
107+
| Manual | Docker (recommended) |
108+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
114109
| <ol><li>Install [MongoDB Community Edition](https://docs.mongodb.com/manual/administration/install-community/)</li><li>Install [Redis](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/)</li><li>Make sure both are running</li></ol> | <ol><li>Install [Docker](http://www.docker.io/gettingstarted/#h_installation) on your machine</li><li>Run `npm run docker-db-only` from the `./backend` directory</li></ol> |
115110

116111
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
134129

135130
### Backend only
136131

137-
| Manual | Docker |
138-
| --------------------------- | ------------------------------ |
139-
| `npm run dev-be` | `cd backend && npm run docker` |
132+
| Manual | Docker |
133+
| ---------------- | ------------------------------ |
134+
| `npm run dev-be` | `cd backend && npm run docker` |
140135

141136
### Frontend only
142137

143-
| Manual | Docker |
144-
| ---------------------------- | ------------------------------- |
145-
| `npm run dev-fe` | `cd frontend && npm run docker` |
138+
| Manual | Docker |
139+
| ---------------- | ------------------------------- |
140+
| `npm run dev-fe` | `cd frontend && npm run docker` |
146141

147142
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 <kbd>Ctrl+C</kbd> to stop them.
148143

docs/FONTS.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ First, you will have to make a personal copy of the Monkeytype repository, also
1313

1414
## Adding Fonts
1515

16-
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`.
16+
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`.
1717

1818
> [!NOTE]
1919
> 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(
2929
"My_Font",
3030
```
3131
32-
Call it whatever you want but make sure you replace spaces with underscores and the font does not start with a number.
32+
Call it whatever you want but make sure you replace spaces with underscores and the font does not start with a number.
3333
3434
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:
3535
@@ -54,4 +54,3 @@ Create a pull request:
5454
## Language Guidelines
5555
5656
Make sure your language follows the [Language guidelines](./CONTRIBUTING.md#language-guidelines).
57-

docs/LANGUAGES.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,20 @@ The contents of the file should be as follows:
2929
```
3030

3131
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`.
32-
`ligatures` A ligature occurs when multiple letters are joined together to form a character [more details](<https://en.wikipedia.org/wiki/Ligature_(writing)>). 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.
32+
`ligatures` A ligature occurs when multiple letters are joined together to form a character [more details](<https://en.wikipedia.org/wiki/Ligature_(writing)>). 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.
3333

34-
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.
34+
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.
3535

3636
```typescript
3737
export const LanguageSchema = z.enum([
3838
"english",
3939
"english_1k",
40-
...
41-
"your_language_name",
40+
..."your_language_name",
4241
"your_language_name_10k",
4342
]);
4443
```
4544

46-
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.
45+
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.
4746

4847
```typescript
4948
export const LanguageGroups: Record<string, Language[]> = {
@@ -68,4 +67,3 @@ Create a pull request:
6867
## Language Guidelines
6968

7069
Make sure your language follows the [Language guidelines](./CONTRIBUTING.md#language-guidelines).
71-

docs/LAYOUTS.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### **Table of Contents**
22

33
- [Forking Monkeytype](#forking-monkeytype)
4-
- [Creating Layouts](#creating-layouts )
4+
- [Creating Layouts](#creating-layouts)
55
- [Committing Layouts](#committing-layouts)
66

77
### Forking Monkeytype
@@ -79,36 +79,31 @@ The contents of the file should be as follows:
7979
"row5": [[" "]]
8080
}
8181
}
82-
83-
8482
```
8583

8684
It is recommended that you familiarize yourselves with JSON before adding a layout.
8785

8886
`keymapShowTopRow` indicates whether to always show the first row of the layout.
89-
`type` can be `ansi` or `iso`.
87+
`type` can be `ansi` or `iso`.
9088

91-
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.
89+
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.
9290

93-
**Note:** Quote and backslash characters need to be escaped: `\"` and `\\`.
91+
**Note:** Quote and backslash characters need to be escaped: `\"` and `\\`.
9492

9593
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`.
9694

97-
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`.
98-
95+
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`.
9996

100-
101-
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:
97+
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:
10298

10399
```ts
104-
export const LayoutNameSchema = z.enum([
105-
"qwerty",
106-
"dvorak",
107-
"colemak",
108-
...
109-
"your_layout_name",
100+
export const LayoutNameSchema = z.enum([
101+
"qwerty",
102+
"dvorak",
103+
"colemak",
104+
..."your_layout_name",
110105
]);
111-
```
106+
```
112107

113108
### Committing Layouts
114109

@@ -124,4 +119,4 @@ Make sure your PR title follow the syntax `feat(layout): add <YOUR_LAYOUT> layou
124119

125120
## Layout Guidelines
126121

127-
Make sure your layout follows the [Layout guidelines](./CONTRIBUTING.md#layout-guidelines).
122+
Make sure your layout follows the [Layout guidelines](./CONTRIBUTING.md#layout-guidelines).

0 commit comments

Comments
 (0)