Commit graph

100 commits

Author SHA1 Message Date
Christian Fehmer
5026f41954
impr: add custom error codes to contracts and api doc (@fehmer) (#6976) 2025-09-19 18:59:46 +02:00
Christian Fehmer
344e467f87
fix: password validation rules (@fehmer) (#6967)
fixes #6966 , #6965
2025-09-19 18:14:27 +02:00
Miodec
a33b464511 chore: change oxlint config to jsonc
also disable one rule
2025-09-11 22:04:48 +02:00
Miodec
1fa473744a chore: bump oxlint 2025-09-11 22:04:48 +02:00
Miodec
5a39049035 chore: bump compatibility header 2025-09-04 19:38:26 +02:00
Jack
e4c0c28150
chore: bump eslint typescript plugin (@miodec) (#6915) 2025-08-26 22:12:27 +02:00
Miodec
b54052913c chore: bump oxlint version 2025-08-26 17:41:51 +02:00
Miodec
057fdf3fed chore: bump oxlint version 2025-08-18 15:38:13 +02:00
Christian Fehmer
33e3acc70f
refactor(login): use inputValidation on login page (@fehmer) (#6866) 2025-08-14 11:26:28 +02:00
Christian Fehmer
119649bc9e
test: don't use globals for vitest (@fehmer) (#6871)
- **test: support to run/watch all tests in vscode (@fehmer)**
- **packages/contracts**
- **move schema tests to schema package**
- **packages/funbox**
- **packages/utils**
- **frontend**
- **backend**

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-08-14 11:25:44 +02:00
Miodec
5183caf91e chore: upgrade oxlint 2025-08-10 15:08:46 +02:00
Christian Fehmer
f9b22ade56
chore: remove unused dependencies (@fehmer) (#6841)
- **remove chokidar**
- **remove path, node-fetch, ioredis-mock**
- **remove nodemon**
2025-08-07 15:02:19 +02:00
Christian Fehmer
01ed9322ec
test: update to vitest3 (@fehmer) (#6811)
- **test: use mongodb testcontainer (@fehmer)**
- **don't run integration tests in parallel**
- **fix premium test**
- **refactor, cleanup**
- **refactor, cleanup**
- **test: add integration tests for daily leaderboards (@fehmer)**
- **trigger**
- **trigger**
- **test: update to vitest3 (@fehmer)**
2025-08-04 15:55:10 +02:00
Cameron
2180e3b603
chore(deps): upgrade oxlint to 1.8.0, fix errors (@camc314) (#6776)
### Description

This PR updates oxlint to 1.8.0 and fixes the resulting errors in order
to keep oxlint's ecosystem CI green.

Thanks for using oxlint

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-07-24 14:32:12 +02:00
Jack
69cbbe4ab2
refactor(contracts / schemas): move schemas into their own package (@miodec) (#6754) 2025-07-21 14:55:54 +02:00
Jack
92790f3682
refactor(config): config metadata (@miodec) (#6753)
Create config metadata object
Move all the special code on config change to config listeners
Create a generic set function which will work with the metadata object
to update any config key
Update all setters to use the generic set.
(Later probably only use the generic settter and remove all the specific
ones)
Also orders config groups and config schema.

---------

Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
2025-07-21 13:50:33 +02:00
Miodec
41495981a8 chore: bump oxlint version 2025-07-19 15:02:14 +02:00
Jack
5e4478c97a
feat(funbox): add no quit (@miodec) (#6741)
Brrrr
2025-07-16 15:53:36 +02:00
Sam Lonneman
06f6d0ab53
impr(settings): clarified 'reset settings' wording (@SamLonneman) (#6717)
### Description

**`impr`** - Clarified description for "Reset Settings" feature,
emphasizing that in addition to tags, settings presets are also
preserved.

**`refactor`** - the unused type `PresetName` was misspelled as
`PresentName`.
2025-07-15 14:35:21 +02:00
Christian Fehmer
a4de8dfda6
impr(leaderboard): daily mode/language buttons based on backend configuration (@fehmer) (#6713)
Co-authored-by: Miodec <jack@monkeytype.com>
2025-07-14 15:32:09 +02:00
Christian Fehmer
83cc7590fb
impr(commandline): validate input for polyglot and layoutfluid (@fehmer) (#6709) 2025-07-09 18:03:27 +02:00
Christian Fehmer
9b26793a6d
chore: update express to 5.1.0 (@fehmer) (#6691) 2025-07-03 15:43:01 +02:00
Christian Fehmer
e50d5e9cdd
feat(settings): add deep links to specific sections (@fehmer) (#6661)
Allow to deep-link to  a specific config setting.

Users in discord often ask how to enable a specific setting. Instead of
guiding them manually to the correct settings we can use a deep-link:


https://github.com/user-attachments/assets/90b99660-13ae-49bf-8ff2-c5e6da290070

Added a link next to the group on mouse over to copy the deep link to
the clipboard:


![image](https://github.com/user-attachments/assets/d389754e-f43a-4638-b18f-729e818ef170)

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-07-01 20:46:43 +02:00
Khaÿtshi
4a4a6ab8bf
feat(language): add viossa njutro (@khautshi) (#6659)
### Description

This adds Njutro (An idiolect of Viossa) to Monkeytype. 

### Checks

- [X] Adding a language
  - [X] Added language to `packages/contracts/src/schemas/languages.ts`
- [X] Added language to exactly one group in
`frontend/src/ts/constants/languages.ts`
  - [X] Added language json file to `frontend/static/languages` 
  
- [X] Checked if there are any open issues are related to this PR.
- [X] PR title follows Conventional Commits standard.
- [X] Included GitHub username prefixed with @ inside parentheses at the
end of the PR title.

---------

Co-authored-by: Nginearing <142851004+Nginearing@users.noreply.github.com>
2025-06-26 15:28:10 +02:00
Christian Fehmer
79cc330852
fix(account): fix not all results shown if result has a funbox unknown to stored filter (@fehmer) (#6608)
Merge with default filters to ensure all languages and funboxes are
present in the result filter.
2025-06-23 14:52:23 +02:00
Miodec
4c05dd8326 chore: bump oxlint version 2025-06-14 14:43:05 +02:00
Miodec
04fbd81c10 chore: bump oxlint version 2025-05-29 13:23:13 +02:00
Christian Fehmer
47de0c8a40
refactor: cleanup schema and types for CustomText (@fehmer) (#6605) 2025-05-27 16:30:49 +02:00
siilyg
1826948886
feat(layout): add Tarmak layouts (@siily-g) (#6574)
### Description

The tarmak layout(s) is a set of transition layouts for qwerty user
switching to colemak, it changes only about 3-4 keys for every stage.

[More about tarmak](https://dreymar.colemak.org/tarmak-intro.html)

### Checks

- [ ] Adding quotes?
- [ ] Make sure to include translations for the quotes in the
description (or another comment) so we can verify their content.
- [ ] Adding a language?
- Make sure to follow the [languages
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LANGUAGES.md)
  - [ ] Add language to `packages/contracts/src/schemas/languages.ts`
- [ ] Add language to exactly one group in
`frontend/src/ts/constants/languages.ts`
  - [ ] 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/contracts/src/schemas/themes.ts`
  - [ ] Add theme to `frontend/src/ts/constants/themes.ts`
  - [ ] Add theme css file to `frontend/static/themes` 
- [x] Adding a layout?
- [x] Make sure to follow the [layouts
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LAYOUTS.md)
  - [x] Add layout to `packages/contracts/src/schemas/layouts.ts`
  - [x] Add layout json file to `frontend/static/layouts` 
  
- [x] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [x] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [x] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.
2025-05-26 16:03:25 +02:00
Nginearing
e28aa97285
feat(language): add viossa (@nginearing) (#6571)
### Description

This adds Viosssa as a language to Monkeytype. 
Viossa is a constructed language and has even been added to Minecraft
Java Edition, and has also been assigned an ISO-639-3 Code by the
ConLang Code Registry (https://www.kreativekorp.com/clcr/)

### Checks

- [X] Adding a language
  - [X] Added language to `packages/contracts/src/schemas/languages.ts`
- [X] Added language to exactly one group in
`frontend/src/ts/constants/languages.ts`
  - [X] Added language json file to `frontend/static/languages` 
  
- [X] Checked if there are any open issues are related to this PR.
- [X] PR title follows Conventional Commits standard.
- [X] Included GitHub username prefixed with @ inside parentheses at the
end of the PR title.
2025-05-26 15:44:57 +02:00
Christian Fehmer
f1f4d17932
impr(profile): validate inputs for twitter, github and website (@fehmer) (#6544)
fixes #6543
2025-05-12 14:02:28 +02:00
Miodec
8370de1fa4 impr: add function to clearstreakhouroffset
!nuf
2025-05-12 13:52:37 +02:00
JN03
69d9b3814f
feat(language): add Thai 1K, 5K, 10K, 50K, and 60K (@jnx03) (#6498) 2025-05-07 15:30:26 +02:00
Christian Fehmer
eb092cea1c
refactor: move languages to contracts (@fehmer) (#6497) 2025-05-07 14:02:27 +02:00
Christian Fehmer
5ab7bfb438
refactor: move themes list to typescript (@fehmer) (#6489)
Co-authored-by: fehmer <3728838+fehmer@users.noreply.github.com>
2025-05-05 13:30:09 +02:00
Miodec
e8c0fc08d0 chore: temporairly allow null discordIds 2025-04-29 13:51:53 +02:00
Christian Fehmer
c253d2fd18
refactor: make customLayoutfluid an array (@fehmer) (#6494)
merge after #6487
2025-04-29 12:46:24 +02:00
Christian Fehmer
212b8d38cb
refactor: make funbox settings an array (@fehmer) (#6487)
change funbox from "hash separated values" to array.

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-04-29 11:31:44 +02:00
Christian Fehmer
b36bc9f39e
refactor: move layout names to contracts (@fehmer) (#6495) 2025-04-28 11:29:52 +02:00
Miodec
f60dd0ac3c chore: remove false positive 2025-04-24 16:39:30 +02:00
Seif Soliman
86383cf9ef
refactor(backend): improve redis and json.parse type safety with zod (@byseif21, @miodec) (#6481)
### Description

refactored backend files to enhance type safety and reliability using
Zod validation and Redis instead of JSON.parse , I tried to avoid the
files that isn't necessary tho so I hope I don't miss any or included
unnecessary ones!! didn't fully test only verified code compilation and
partial tests without Redis!!.


Should Close #5881 
Related to #6207

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-04-24 16:25:43 +02:00
Miodec
a424f96480 chore: upgrade oxlint 2025-04-23 18:54:33 +02:00
Christian Fehmer
da671337c5
feat(funbox): add polyglot (@fehmer) (#6454)
Add polyglot funbox which let you practice on multiple languages at once
in a single test.

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-04-18 16:48:35 +02:00
Jack
cac8835c77
chore: add oxlint (@miodec) (#6455)
Use oxlint for general linting to provide much quicker feedback. Keep
eslint for type-aware rules. Fully switch to oxlint once it supports
type-aware.
2025-04-16 17:18:50 +02:00
Christian Fehmer
f6d9b7c3ef
impr: lazy load chartData on results (@fehmer) (#6428)
Optimize results endpoint by removing heavy or unused data. 

We load the whole result chart data for up to 1000 results each time,
but it is very unlikely the user will view the charts for all old
results. By removing the size in my tests went down from 1152kb to
276kb.

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-04-08 13:46:40 +02:00
Christian Fehmer
cef3ff57c7
impr(result page): clicking on daily leaderboard rank opens the leaderboards page the user is on (@fehmer) (#6380)
Co-authored-by: Miodec <jack@monkeytype.com>
2025-03-18 13:18:12 +01:00
Christian Fehmer
9e3f795380
fix: protect against stored xss in custom background url (@fehmer) (#6355)
!nuf

closes #6354
2025-03-12 16:52:57 +01:00
Nad Alaba
932d0e166e
build: fix openapi spec path for docs & stats endpoints on dev (@NadAlaba) (#6343)
### Description

1. fix openapi specification path so that /docs endpoint would work on
dev.

> Error: ENOENT: no such file or directory, stat
'backend/src/static/api/public.html' Stack: Error: ENOENT: no such file
or directory

2. fix openapi specification path so that API Operation would work on
/stats endpoint on dev.

> Cannot read openApi specification from
backend/src/api/routes/../../static/api/openapi.json. Swagger stats will
not fully work.

![stats](https://github.com/user-attachments/assets/82f3e8b4-814c-4ede-ba67-8da53dacad87)

3. remove unneeded `files` & `ts-node` options from `tsconfig.json` in
various places.

> File 'backend/src/types/types.d.ts' not found.
  The file is in the program because:
    Part of 'files' list in tsconfig.json

4. add the missing `pnpm test` script to the funbox package.
2025-03-12 16:20:46 +01:00
Miodec
420d049a59 impr(server): better leaderboard request validation schema
stop mongo from trying to handle pointless queries

!nuf
2025-03-12 13:13:56 +01:00
Christian Fehmer
f80dde4c89
chore(self hosting): run selfhosted backend in prod mode (@fehmer) (#6326)
Co-authored-by: Miodec <jack@monkeytype.com>
2025-03-03 17:43:08 +01:00