Skip to content

Commit 0bdf593

Browse files
authored
feat(web): overhaul UI architecture and harden search flow (#87)
* feat(web): overhaul UI architecture and harden search flow - refactor app/pages/components structure for the web v2 redesign - modernize lint/build/test setup and supporting config - improve message search UX, including mobile overlay close-on-navigate - expand test coverage across routes, components, hooks, and API handlers * fix: pin pnpm version to resolve Vercel build failure Add packageManager field to lock pnpm@10.15.0, preventing Vercel from using an incompatible default version that causes ERR_INVALID_THIS errors when fetching packages from the npm registry. * chore: update package.json to specify pnpm and Node.js versions Added packageManager field to lock pnpm to version 10.15.0 and defined compatible Node.js version as 22.x, ensuring consistent environment setup. * chore: add Vercel configuration file for deployment setup Created a new vercel.json file to define the installation command for the Vercel deployment, ensuring the correct version of pnpm is used during the build process. * chore: update Vercel install command for consistency Modified the install command in vercel.json to use 'corepack pnpm install' for improved clarity and consistency in the deployment process. * chore: add build command to Vercel configuration Enhanced vercel.json by adding a build command to ensure consistent build processes during deployment, utilizing the same corepack and pnpm setup as the install command.
1 parent 8c74123 commit 0bdf593

164 files changed

Lines changed: 14876 additions & 5396 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ build
3030
*.tsbuildinfo
3131
.env
3232
*.db
33-
*.db-journal
33+
*.db-journal

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@ringdao/msgscan",
33
"version": "0.1.0",
44
"private": true,
5+
"packageManager": "pnpm@10.15.0",
56
"scripts": {
67
"start:web": "pnpm --filter @ringdao/msgscan-ui start",
78
"build:web": "pnpm --filter @ringdao/msgscan-ui build",

packages/web/.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/web/.eslintrc.cjs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
module.exports = {
2+
extends: [
3+
'prettier',
4+
'plugin:@tanstack/eslint-plugin-query/recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'next/core-web-vitals'
7+
],
8+
parserOptions: {
9+
ecmaVersion: 'latest',
10+
sourceType: 'module',
11+
project: ['./tsconfig.json'],
12+
tsconfigRootDir: __dirname
13+
},
14+
settings: {
15+
'import/parsers': {
16+
'@typescript-eslint/parser': ['.ts', '.tsx']
17+
},
18+
'import/resolver': {
19+
typescript: true,
20+
node: true
21+
}
22+
},
23+
plugins: ['@typescript-eslint'],
24+
parser: '@typescript-eslint/parser',
25+
rules: {
26+
'@typescript-eslint/no-explicit-any': 'warn',
27+
'import/order': [
28+
'error',
29+
{
30+
groups: ['builtin', 'external', 'internal', 'parent', 'index', 'sibling', 'object', 'type'],
31+
pathGroups: [
32+
{
33+
pattern: 'react',
34+
group: 'external'
35+
},
36+
{
37+
pattern: '@/**',
38+
group: 'internal',
39+
position: 'after'
40+
}
41+
],
42+
pathGroupsExcludedImportTypes: ['type'],
43+
'newlines-between': 'always'
44+
}
45+
],
46+
'@typescript-eslint/consistent-type-exports': 'error',
47+
'@typescript-eslint/consistent-type-imports': 'error',
48+
'@typescript-eslint/no-import-type-side-effects': 'error'
49+
}
50+
};

packages/web/.eslintrc.json

Lines changed: 0 additions & 67 deletions
This file was deleted.

packages/web/components.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
{
22
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "default",
3+
"style": "base-vega",
44
"rsc": true,
55
"tsx": true,
66
"tailwind": {
7-
"config": "tailwind.config.ts",
7+
"config": "tailwind.config.mjs",
88
"css": "src/app/globals.css",
99
"baseColor": "slate",
1010
"cssVariables": true,
1111
"prefix": ""
1212
},
1313
"aliases": {
1414
"components": "@/components",
15-
"utils": "@/lib/utils"
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
1619
}
17-
}
20+
}

packages/web/eslint.config.mjs

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import path from 'node:path';
2+
import { fileURLToPath } from 'node:url';
3+
import nextCoreWebVitals from 'eslint-config-next/core-web-vitals';
4+
import nextTypescript from 'eslint-config-next/typescript';
5+
import prettier from 'eslint-config-prettier';
6+
import tanstackQuery from '@tanstack/eslint-plugin-query';
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
11+
const config = [
12+
...nextCoreWebVitals,
13+
...nextTypescript,
14+
...tanstackQuery.configs['flat/recommended'],
15+
{
16+
files: ['**/*.{js,jsx,ts,tsx}'],
17+
languageOptions: {
18+
parserOptions: {
19+
ecmaVersion: 'latest',
20+
sourceType: 'module',
21+
project: ['./tsconfig.json'],
22+
tsconfigRootDir: __dirname
23+
}
24+
},
25+
settings: {
26+
'import/parsers': {
27+
'@typescript-eslint/parser': ['.ts', '.tsx']
28+
},
29+
'import/resolver': {
30+
typescript: true,
31+
node: true
32+
}
33+
},
34+
rules: {
35+
'@typescript-eslint/no-explicit-any': 'warn',
36+
'@typescript-eslint/no-empty-object-type': 'off',
37+
'react-hooks/set-state-in-effect': 'off',
38+
'import/order': [
39+
'error',
40+
{
41+
groups: [
42+
'builtin',
43+
'external',
44+
'internal',
45+
'parent',
46+
'index',
47+
'sibling',
48+
'object',
49+
'type'
50+
],
51+
pathGroups: [
52+
{
53+
pattern: 'react',
54+
group: 'external'
55+
},
56+
{
57+
pattern: '@/**',
58+
group: 'internal',
59+
position: 'after'
60+
}
61+
],
62+
pathGroupsExcludedImportTypes: ['type'],
63+
'newlines-between': 'always'
64+
}
65+
],
66+
'@typescript-eslint/consistent-type-exports': 'error',
67+
'@typescript-eslint/consistent-type-imports': 'error',
68+
'@typescript-eslint/no-import-type-side-effects': 'error'
69+
}
70+
},
71+
prettier,
72+
{
73+
ignores: ['node_modules/**', '.next/**', 'public/sw.js', 'next.config.mjs']
74+
}
75+
];
76+
77+
export default config;

packages/web/next.config.mjs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import withSerwistInit from '@serwist/next';
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {};
23

3-
const withSerwist = withSerwistInit({
4-
swSrc: 'src/app/sw.ts',
5-
swDest: 'public/sw.js'
6-
});
7-
8-
export default withSerwist({});
4+
export default nextConfig;

packages/web/package.json

Lines changed: 47 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,61 @@
11
{
22
"name": "@ringdao/msgscan-ui",
33
"version": "0.1.0",
4+
"packageManager": "pnpm@10.15.0",
5+
"engines": {
6+
"node": "22.x",
7+
"pnpm": "10.x"
8+
},
49
"scripts": {
510
"dev": "next dev -p 3200",
611
"build": "next build",
712
"start": "next start",
8-
"lint": "next lint"
13+
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
14+
"test": "vitest run"
915
},
1016
"dependencies": {
11-
"@radix-ui/react-avatar": "^1.0.4",
12-
"@radix-ui/react-checkbox": "^1.0.4",
13-
"@radix-ui/react-dialog": "^1.0.5",
14-
"@radix-ui/react-dropdown-menu": "^2.0.6",
15-
"@radix-ui/react-icons": "^1.3.0",
16-
"@radix-ui/react-popover": "^1.0.7",
17-
"@radix-ui/react-select": "^2.0.0",
18-
"@radix-ui/react-separator": "^1.0.3",
19-
"@radix-ui/react-slot": "^1.0.2",
20-
"@radix-ui/react-tooltip": "^1.0.7",
21-
"@serwist/next": "^9.0.3",
22-
"@tanstack/react-query": "^5.40.0",
23-
"@tanstack/react-table": "^8.17.3",
24-
"add": "^2.0.6",
25-
"class-variance-authority": "^0.7.0",
17+
"@base-ui/react": "^1.2.0",
18+
"@tanstack/react-query": "^5.90.21",
19+
"class-variance-authority": "^0.7.1",
2620
"clsx": "^2.1.1",
27-
"cmdk": "^1.0.0",
28-
"dayjs": "^1.11.11",
29-
"framer-motion": "^11.2.9",
30-
"graphql-request": "^7.0.1",
31-
"immer": "^10.1.1",
32-
"lodash-es": "^4.17.21",
33-
"lucide-react": "^0.379.0",
34-
"next": "14.2.3",
35-
"next-themes": "^0.3.0",
36-
"nuqs": "^1.17.4",
37-
"pnpm": "^9.5.0",
38-
"react": "^18",
39-
"react-day-picker": "^8.10.1",
40-
"react-dom": "^18",
41-
"react-use": "^17.5.0",
42-
"tailwind-merge": "^2.3.0",
43-
"tailwindcss-animate": "^1.0.7",
44-
"zustand": "^4.5.2"
21+
"cmdk": "^1.1.1",
22+
"date-fns": "^4.1.0",
23+
"framer-motion": "^12.34.0",
24+
"graphql-request": "^7.4.0",
25+
"lucide-react": "^0.563.0",
26+
"next": "16.1.6",
27+
"next-themes": "0.4.6",
28+
"nuqs": "2.8.8",
29+
"react": "19.2.4",
30+
"react-day-picker": "^9.13.2",
31+
"react-dom": "19.2.4",
32+
"recharts": "^3.7.0",
33+
"sonner": "^2.0.7",
34+
"tailwind-merge": "^3.4.0",
35+
"tailwindcss-animate": "^1.0.7"
4536
},
4637
"devDependencies": {
47-
"@tanstack/eslint-plugin-query": "^5.35.6",
48-
"@types/lodash-es": "^4.17.12",
49-
"@types/node": "^20",
50-
"@types/react": "^18",
51-
"@types/react-dom": "^18",
52-
"@typescript-eslint/eslint-plugin": "^7.16.0",
53-
"@typescript-eslint/parser": "^7.16.0",
54-
"eslint": "^8",
55-
"eslint-config-next": "14.2.3",
56-
"eslint-config-prettier": "^9.1.0",
57-
"eslint-import-resolver-typescript": "^3.6.1",
58-
"eslint-plugin-import": "^2.29.1",
59-
"postcss": "^8",
60-
"prettier": "^3.3.1",
61-
"prettier-plugin-tailwindcss": "^0.6.1",
62-
"serwist": "^9.0.3",
63-
"tailwindcss": "^3.4.1",
64-
"typescript": "^5"
38+
"@tailwindcss/postcss": "4.1.18",
39+
"@tanstack/eslint-plugin-query": "^5.91.4",
40+
"@testing-library/react": "^16.3.2",
41+
"@testing-library/user-event": "^14.6.1",
42+
"@types/node": "^25.2.3",
43+
"@types/react": "19.2.14",
44+
"@types/react-dom": "19.2.3",
45+
"@typescript-eslint/eslint-plugin": "8.55.0",
46+
"@typescript-eslint/parser": "8.55.0",
47+
"eslint": "9.39.2",
48+
"eslint-config-next": "16.1.6",
49+
"eslint-config-prettier": "^10.1.8",
50+
"eslint-import-resolver-typescript": "^4.4.4",
51+
"eslint-plugin-import": "^2.32.0",
52+
"jsdom": "^28.0.0",
53+
"postcss": "^8.5.6",
54+
"prettier": "^3.8.1",
55+
"prettier-plugin-tailwindcss": "^0.7.2",
56+
"tailwindcss": "4.1.18",
57+
"typescript": "5.9.3",
58+
"vite-tsconfig-paths": "^6.1.1",
59+
"vitest": "^4.0.18"
6560
}
6661
}

packages/web/postcss.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/** @type {import('postcss-load-config').Config} */
22
const config = {
33
plugins: {
4-
tailwindcss: {},
5-
},
4+
'@tailwindcss/postcss': {}
5+
}
66
};
77

88
export default config;

0 commit comments

Comments
 (0)