Skip to content

Commit b85e8b5

Browse files
committed
Initial implementation of fe
1 parent 50ebf4b commit b85e8b5

29 files changed

+6013
-263
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.vscode/*
2+
!.vscode/extensions.json
3+
.idea
4+
.DS_Store
5+
6+
7+
logs
8+
*.log
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
pnpm-debug.log*
13+
lerna-debug.log*
14+
15+
node_modules
16+
dist
17+
dist-ssr
18+
*.local
19+
20+
.env
21+
docs

.vite/deps_temp_1831ef45/package.json

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

frontend/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*]
2+
indent_size = 2

frontend/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_API_URL=

frontend/.eslintignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
build
2+
dist
3+
node_modules
4+
*.test.js
5+
vite.config.ts
6+
postcss.config.js
7+
tailwind.config.js
8+
i18n.ts
9+
public/firebase-messaging-sw.js
10+
src/components/ui/*

frontend/.eslintrc.cjs

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
module.exports = {
2+
env: {
3+
node: true,
4+
browser: true,
5+
es6: true,
6+
},
7+
ignorePatterns: ['./tsconfig.json'],
8+
extends: [
9+
'eslint:recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
'plugin:jsx-a11y/recommended',
12+
'plugin:react/recommended',
13+
'plugin:prettier/recommended',
14+
'plugin:testing-library/react',
15+
'plugin:react-hooks/recommended',
16+
'plugin:prettier/recommended',
17+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
18+
],
19+
overrides: [
20+
{
21+
env: {
22+
node: true,
23+
},
24+
files: ['.eslintrc.{js,cjs}'],
25+
parserOptions: {
26+
sourceType: 'script',
27+
},
28+
},
29+
],
30+
parser: '@typescript-eslint/parser',
31+
parserOptions: {
32+
ecmaVersion: 'latest',
33+
sourceType: 'module',
34+
project: ['./tsconfig.json', './.eslintrc.cjs'],
35+
tsconfigRootDir: __dirname,
36+
},
37+
plugins: ['@typescript-eslint', 'import', 'simple-import-sort'],
38+
rules: {
39+
'no-console': 2,
40+
'react-hooks/rules-of-hooks': 2,
41+
'react-hooks/exhaustive-deps': 2,
42+
'react/no-array-index-key': 2,
43+
'react/react-in-jsx-scope': 'off',
44+
'react/prop-types': 'off',
45+
'@typescript-eslint/no-non-null-assertion': 0,
46+
'no-unused-vars': 'off',
47+
'@typescript-eslint/no-misused-promises': 'off',
48+
'@typescript-eslint/no-unused-vars': [
49+
2,
50+
{
51+
argsIgnorePattern: '^_',
52+
varsIgnorePattern: '^_',
53+
ignoreRestSiblings: true,
54+
},
55+
],
56+
'prettier/prettier': ['off', { singleQuote: true }],
57+
'no-restricted-imports': [
58+
2,
59+
{
60+
patterns: [
61+
'@/features/*/*',
62+
'@/components/*',
63+
'@/hooks/*',
64+
'@/utils/*',
65+
'@/ts/*/*',
66+
],
67+
},
68+
],
69+
'import/order': [
70+
'error',
71+
{
72+
groups: ['builtin', 'external', 'internal'],
73+
pathGroups: [
74+
{
75+
pattern: 'react',
76+
group: 'external',
77+
position: 'before',
78+
},
79+
],
80+
pathGroupsExcludedImportTypes: ['react'],
81+
'newlines-between': 'always',
82+
alphabetize: {
83+
order: 'asc',
84+
caseInsensitive: true,
85+
},
86+
},
87+
],
88+
'no-implied-eval': 'off',
89+
'require-await': 'off',
90+
},
91+
settings: {
92+
react: {
93+
version: 'detect',
94+
},
95+
},
96+
};

frontend/.gitignore

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# Logs
1+
.vscode/*
2+
!.vscode/extensions.json
3+
.idea
4+
.DS_Store
5+
6+
27
logs
38
*.log
49
npm-debug.log*
@@ -12,13 +17,5 @@ dist
1217
dist-ssr
1318
*.local
1419

15-
# Editor directories and files
16-
.vscode/*
17-
!.vscode/extensions.json
18-
.idea
19-
.DS_Store
20-
*.suo
21-
*.ntvs*
22-
*.njsproj
23-
*.sln
24-
*.sw?
20+
.env
21+
docs

frontend/.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
pnpm lint-staged

frontend/.huskyrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export NVM_DIR="$HOME/.nvm"
2+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

frontend/.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**/node_modules
2+
node_modules
3+
build
4+
tools
5+
.idea
6+
.history
7+
coverage
8+

frontend/.prettierrc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"tabWidth": 2,
3+
"printWidth": 111,
4+
"bracketSpacing": true,
5+
"endOfLine": "auto",
6+
"arrowParens": "always",
7+
"embeddedLanguageFormatting": "auto",
8+
"bracketSameLine": true,
9+
"jsxSingleQuote": false,
10+
"trailingComma": "es5",
11+
"singleQuote": true,
12+
"editor.formatOnSave": true,
13+
"editor.defaultFormatter": "esbenp.prettier-vscode",
14+
"editor.codeActionsOnSave": {
15+
"source.fixAll.eslint": true
16+
},
17+
"eslint.alwaysShowStatus": true,
18+
"eslint.format.enable": true,
19+
"eslint.packageManager": "pnpm",
20+
"eslint.run": "onSave",
21+
"eslint.workingDirectories": ["./"],
22+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
23+
"editor.codeActionsOnSaveTimeout": 1500,
24+
"editor.formatOnSaveTimeout": 1500
25+
}

frontend/eslint.config.js

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

frontend/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + React + TS</title>
7+
<title>Cafe Employee</title>
88
</head>
99
<body>
1010
<div id="root"></div>

frontend/package.json

Lines changed: 76 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,91 @@
11
{
22
"name": "docker-react-node-mysql-app",
3-
"private": true,
43
"version": "0.0.0",
4+
"author": "fsabado",
5+
"private": true,
56
"type": "module",
67
"scripts": {
78
"dev": "vite",
8-
"build": "tsc -b && vite build",
9-
"lint": "eslint .",
10-
"preview": "vite preview"
9+
"preinstall": "npx only-allow pnpm",
10+
"build": "tsc && vite build",
11+
"lint": "eslint . --ext js,ts,tsx",
12+
"format": "prettier --write **/*.{js,ts,tsx} && eslint . --ext js,ts,tsx --fix",
13+
"preview": "vite preview",
14+
"postinstall": "bash postinstall.sh",
15+
"prepare": "husky install"
1116
},
1217
"dependencies": {
13-
"react": "^18.3.1",
14-
"react-dom": "^18.3.1"
18+
"@emotion/babel-plugin": "^11.11.0",
19+
"@emotion/react": "^11.11.1",
20+
"@emotion/styled": "^11.11.0",
21+
"@hookform/resolvers": "^3.3.1",
22+
"@lukemorales/query-key-factory": "^1.3.2",
23+
"@mui/icons-material": "^5.14.18",
24+
"@mui/material": "^5.14.17",
25+
"@tanstack/react-query": "^4.35.3",
26+
"@types/styled-components": "^5.1.27",
27+
"axios": "1.6.0",
28+
"class-variance-authority": "^0.7.0",
29+
"clsx": "^2.0.0",
30+
"lodash": "^4.17.21",
31+
"lucide-react": "^0.279.0",
32+
"react": "^18.2.0",
33+
"react-dom": "^18.2.0",
34+
"react-error-boundary": "^4.0.11",
35+
"react-hook-form": "^7.47.0",
36+
"react-hot-toast": "^2.4.1",
37+
"react-icons": "^4.11.0",
38+
"react-router-dom": "^6.16.0",
39+
"styled-components": "^5.3.11",
40+
"tailwind-merge": "^1.14.0",
41+
"tailwindcss-animate": "^1.0.7",
42+
"zod": "^3.22.2",
43+
"zustand": "^4.4.1"
1544
},
1645
"devDependencies": {
17-
"@eslint/js": "^9.9.0",
18-
"@types/react": "^18.3.3",
46+
"@optimize-lodash/rollup-plugin": "^4.0.4",
47+
"@types/lodash": "^4.14.198",
48+
"@types/node": "^20.6.2",
49+
"@types/react": "^18.3.6",
1950
"@types/react-dom": "^18.3.0",
51+
"@typescript-eslint/eslint-plugin": "^6.7.2",
52+
"@typescript-eslint/parser": "^6.7.2",
2053
"@vitejs/plugin-react": "^4.3.1",
21-
"eslint": "^9.9.0",
22-
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
23-
"eslint-plugin-react-refresh": "^0.4.9",
54+
"autoprefixer": "^10.4.15",
55+
"eslint": "^9.10.0",
56+
"eslint-config-prettier": "^9.0.0",
57+
"eslint-plugin-import": "^2.28.1",
58+
"eslint-plugin-jsx-a11y": "^6.7.1",
59+
"eslint-plugin-prettier": "^5.0.0",
60+
"eslint-plugin-react": "^7.33.2",
61+
"eslint-plugin-react-hooks": "^4.6.0",
62+
"eslint-plugin-react-refresh": "^0.4.12",
63+
"eslint-plugin-simple-import-sort": "^10.0.0",
64+
"eslint-plugin-testing-library": "^6.0.1",
2465
"globals": "^15.9.0",
25-
"typescript": "^5.5.3",
26-
"typescript-eslint": "^8.0.1",
27-
"vite": "^5.4.1"
66+
"husky": "^8.0.3",
67+
"lint-staged": "^14.0.1",
68+
"postcss": "^8.4.30",
69+
"prettier": "^3.0.3",
70+
"tailwindcss": "^3.3.3",
71+
"typescript": "^5.6.2",
72+
"typescript-eslint": "^8.5.0",
73+
"vite": "^5.4.5"
74+
},
75+
"husky": {
76+
"hooks": {
77+
"pre-commint": "lint-staged"
78+
}
79+
},
80+
"lint-staged": {
81+
"src/**/*": [
82+
"eslint --ext ./src --fix"
83+
],
84+
"./src/**": [
85+
"prettier --write ."
86+
]
87+
},
88+
"resolutions": {
89+
"styled-components": "^5"
2890
}
2991
}

0 commit comments

Comments
 (0)