Skip to content

Commit 8083409

Browse files
committed
feat: add word stats with counts and acquainted percentage
1 parent 4368f7e commit 8083409

Some content is hidden

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

80 files changed

+4043
-3942
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ pnpm-debug.log*
1818
# Editor directories and files
1919
.fleet
2020
.idea
21-
.vscode
2221
*.suo
2322
*.ntvs*
2423
*.njsproj
2524
*.sln
2625
*.sw?
27-
settings.json
26+
launch.json
2827

2928
.turbo
3029

.vscode/settings.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"cSpell.words": [
3+
"Auths",
4+
"bigserial",
5+
"callees",
6+
"chartjs",
7+
"clsx",
8+
"cmdk",
9+
"fkey",
10+
"foxact",
11+
"hookform",
12+
"hookz",
13+
"iconify",
14+
"immer",
15+
"lucide",
16+
"nolyfill",
17+
"nums",
18+
"ofetch",
19+
"opensubtitles",
20+
"overscroll",
21+
"Retimer",
22+
"shadcn",
23+
"sonner",
24+
"Squircle",
25+
"subvocab",
26+
"tanstack",
27+
"taze",
28+
"themoviedb",
29+
"tmdb",
30+
"unplugin",
31+
"valtio",
32+
"vaul",
33+
"VITE",
34+
"zustand"
35+
],
36+
"i18n-ally.localesPaths": ["ui/src/i18n"],
37+
38+
// Enable the ESlint flat config support
39+
"eslint.useFlatConfig": true,
40+
41+
// Disable the default formatter, use eslint instead
42+
"prettier.enable": false,
43+
"editor.formatOnSave": false,
44+
45+
// Auto fix
46+
"editor.codeActionsOnSave": {
47+
"source.fixAll.eslint": "explicit",
48+
"source.organizeImports": "never"
49+
},
50+
51+
// Silent the stylistic rules in you IDE, but still auto fix them
52+
"eslint.rules.customizations": [
53+
{
54+
"rule": "*",
55+
"severity": "warn"
56+
},
57+
{ "rule": "style/*", "severity": "off" },
58+
{ "rule": "format/*", "severity": "off" },
59+
{ "rule": "*-indent", "severity": "off" },
60+
{ "rule": "*-spacing", "severity": "off" },
61+
{ "rule": "*-spaces", "severity": "off" },
62+
{ "rule": "*-order", "severity": "off" },
63+
{ "rule": "*-dangle", "severity": "off" },
64+
{ "rule": "*-newline", "severity": "off" },
65+
{ "rule": "*quotes", "severity": "off" },
66+
{ "rule": "*semi", "severity": "off" }
67+
],
68+
69+
// Enable eslint for all supported languages
70+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "html", "markdown", "json", "jsonc", "yaml", "toml", "astro"],
71+
72+
"css.customData": [".vscode/tailwind.json"]
73+
}

.vscode/tailwind.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"version": 1.1,
3+
"atDirectives": [
4+
{
5+
"name": "@tailwind",
6+
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.",
7+
"references": [
8+
{
9+
"name": "Tailwind Documentation",
10+
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind"
11+
}
12+
]
13+
},
14+
{
15+
"name": "@apply",
16+
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.",
17+
"references": [
18+
{
19+
"name": "Tailwind Documentation",
20+
"url": "https://tailwindcss.com/docs/functions-and-directives#apply"
21+
}
22+
]
23+
},
24+
{
25+
"name": "@responsive",
26+
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n",
27+
"references": [
28+
{
29+
"name": "Tailwind Documentation",
30+
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive"
31+
}
32+
]
33+
},
34+
{
35+
"name": "@screen",
36+
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n",
37+
"references": [
38+
{
39+
"name": "Tailwind Documentation",
40+
"url": "https://tailwindcss.com/docs/functions-and-directives#screen"
41+
}
42+
]
43+
},
44+
{
45+
"name": "@variants",
46+
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n",
47+
"references": [
48+
{
49+
"name": "Tailwind Documentation",
50+
"url": "https://tailwindcss.com/docs/functions-and-directives#variants"
51+
}
52+
]
53+
}
54+
]
55+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SubVocab transforms your preparation for watching movies or reading books in English. Just input any text, such as subtitles, articles, or books, and SubVocab will efficiently categorize words into familiar and new groups, enhancing both your understanding and enjoyment.
22

3-
<img width="1422" alt="Screenshot" src="https://github.com/user-attachments/assets/1945d43c-e3b3-4715-83d4-19b216e69246" />
3+
<img width="1422" alt="Screenshot" src="https://github.com/user-attachments/assets/6e1cf65b-b65b-4294-96a3-3a32077a709f" />
44

55
[Visualization of this repo](https://mango-dune-07a8b7110.1.azurestaticapps.net/?repo=kyle1an%2FSubVocab)
66

backend/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"type": "module",
44
"version": "0.0.0",
55
"private": true,
6-
"packageManager": "[email protected].3",
6+
"packageManager": "[email protected].4",
77
"scripts": {
8-
"dev": "tsx watch --env-file=.env app",
8+
"dev": "tsx watch --trace-deprecation --env-file=.env app",
99
"introspect": "drizzle-kit introspect",
1010
"build": "tsc && node --run copy-files",
1111
"copy-files": "cp -R public dist/backend",
@@ -14,12 +14,12 @@
1414
"lint:fix": "eslint . --fix"
1515
},
1616
"dependencies": {
17-
"@trpc/server": "11.0.0-rc.566",
17+
"@trpc/server": "11.0.0-rc.700",
1818
"cookie": "^1.0.2",
1919
"cookie-parser": "^1.4.7",
2020
"cors": "^2.8.5",
2121
"debug": "^4.4.0",
22-
"drizzle-orm": "^0.38.3",
22+
"drizzle-orm": "^0.38.4",
2323
"express": "^5.0.1",
2424
"http-errors": "^2.0.0",
2525
"http-proxy-middleware": "^3.0.3",

backend/src/utils/db.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Database } from '@subvocab/ui/database.types.js'
1+
import type { Database } from '@ui/database.types.js'
22

33
import { createClient } from '@supabase/supabase-js'
44
import { drizzle } from 'drizzle-orm/postgres-js'

eslint.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default antfu(
88
},
99
stylistic.configs.customize({
1010
arrowParens: true,
11-
braceStyle: '1tbs',
11+
braceStyle: 'stroustrup',
1212
quoteProps: 'as-needed',
1313
}),
1414
{
@@ -19,16 +19,16 @@ export default antfu(
1919
'no-extra-semi': 'off',
2020
'@stylistic/switch-colon-spacing': 'warn',
2121
'@stylistic/quotes': [1, 'single', { avoidEscape: true, allowTemplateLiterals: true }],
22-
'@stylistic/brace-style': ['error', '1tbs'],
2322
'unused-imports/no-unused-vars': 'off',
2423
'prefer-arrow-callback': 'off',
24+
curly: ['error', 'multi-or-nest', 'consistent'],
2525
},
2626
},
2727
{
2828
...packageJson,
2929
rules: {
3030
'package-json/sort-collections': [
31-
'error',
31+
'warn',
3232
[
3333
'dependencies',
3434
'devDependencies',
@@ -41,7 +41,7 @@ export default antfu(
4141
name: 'root/perfectionist',
4242
rules: {
4343
'perfectionist/sort-imports': [
44-
'error',
44+
'warn',
4545
{
4646
type: 'natural',
4747
internalPattern: ['^@/.+'],

package.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "module",
44
"version": "0.3.0",
55
"private": true,
6-
"packageManager": "[email protected].3",
6+
"packageManager": "[email protected].4",
77
"scripts": {
88
"backend": "pnpm --filter @sub-vocab/backend",
99
"ui": "pnpm --filter @sub-vocab/ui",
@@ -13,24 +13,24 @@
1313
"lint:fix": "pnpm --recursive run lint:fix"
1414
},
1515
"dependencies": {
16-
"@supabase/supabase-js": "^2.47.12",
16+
"@supabase/supabase-js": "^2.48.0",
1717
"date-fns": "^4.1.0",
18-
"type-fest": "^4.32.0",
18+
"type-fest": "^4.33.0",
1919
"zod": "3.23.8"
2020
},
2121
"devDependencies": {
22-
"@antfu/eslint-config": "^3.13.0",
23-
"@stylistic/eslint-plugin": "^2.12.1",
22+
"@antfu/eslint-config": "^3.14.0",
23+
"@stylistic/eslint-plugin": "^2.13.0",
2424
"@t3-oss/env-core": "^0.11.1",
2525
"@total-typescript/ts-reset": "^0.6.1",
26-
"@types/node": "^22.10.5",
27-
"eslint": "^9.17.0",
28-
"eslint-plugin-package-json": "^0.19.0",
26+
"@types/node": "^22.10.7",
27+
"eslint": "^9.18.0",
28+
"eslint-plugin-package-json": "^0.20.1",
2929
"jsonc-eslint-parser": "^2.4.0",
3030
"openapi-typescript": "^7.5.2",
31-
"pathe": "^2.0.1",
31+
"pathe": "^2.0.2",
3232
"prettier": "^3.4.2",
33-
"taze": "^18.1.0",
33+
"taze": "^18.2.0",
3434
"typescript": "5.7.2"
3535
},
3636
"pnpm": {
@@ -40,7 +40,11 @@
4040
"is-core-module": "npm:@nolyfill/is-core-module@^1.0.39",
4141
"safe-buffer": "npm:@nolyfill/safe-buffer@^1.0.41",
4242
"safer-buffer": "npm:@nolyfill/safer-buffer@^1.0.41",
43-
"side-channel": "npm:@nolyfill/side-channel@^1.0.29"
43+
"side-channel": "npm:@nolyfill/side-channel@^1.0.29",
44+
"whatwg-url": "^14.1.0"
45+
},
46+
"patchedDependencies": {
47+
4448
}
4549
},
4650
"resolutions": {

patches/[email protected]

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
diff --git a/lib/http-proxy/common.js b/lib/http-proxy/common.js
2+
index 6513e81d80d5250ea249ea833f819ece67897c7e..486d4c896d65a3bb7cf63307af68facb3ddb886b 100644
3+
--- a/lib/http-proxy/common.js
4+
+++ b/lib/http-proxy/common.js
5+
@@ -1,6 +1,5 @@
6+
var common = exports,
7+
url = require('url'),
8+
- extend = require('util')._extend,
9+
required = require('requires-port');
10+
11+
var upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i,
12+
@@ -40,10 +39,10 @@ common.setupOutgoing = function(outgoing, options, req, forward) {
13+
);
14+
15+
outgoing.method = options.method || req.method;
16+
- outgoing.headers = extend({}, req.headers);
17+
+ outgoing.headers = Object.assign({}, req.headers);
18+
19+
if (options.headers){
20+
- extend(outgoing.headers, options.headers);
21+
+ Object.assign(outgoing.headers, options.headers);
22+
}
23+
24+
if (options.auth) {
25+
diff --git a/lib/http-proxy/index.js b/lib/http-proxy/index.js
26+
index 977a4b3622b9eaac27689f06347ea4c5173a96cd..88b2d0fcfa03c3aafa47c7e6d38e64412c45a7cc 100644
27+
--- a/lib/http-proxy/index.js
28+
+++ b/lib/http-proxy/index.js
29+
@@ -1,5 +1,4 @@
30+
var httpProxy = module.exports,
31+
- extend = require('util')._extend,
32+
parse_url = require('url').parse,
33+
EE3 = require('eventemitter3'),
34+
http = require('http'),
35+
@@ -47,9 +46,9 @@ function createRightProxy(type) {
36+
args[cntr] !== res
37+
) {
38+
//Copy global options
39+
- requestOptions = extend({}, options);
40+
+ requestOptions = Object.assign({}, options);
41+
//Overwrite with request options
42+
- extend(requestOptions, args[cntr]);
43+
+ Object.assign(requestOptions, args[cntr]);
44+
45+
cntr--;
46+
}

0 commit comments

Comments
 (0)