Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/frontend/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", {"targets": {"node": "current"}}],
["@babel/preset-react", {"runtime": "automatic"}],
"@babel/preset-typescript"
],
"plugins": ["babel-plugin-styled-components"]
}
61 changes: 61 additions & 0 deletions src/frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
const path = require('path');

module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:import/recommended',
'plugin:react/recommended',
'prettier',
],
ignorePatterns: [
'dist',
'.eslintrc.cjs',
'vite.config.ts',
'tsconfig.json',
'tsconfig.app.json',
'tsconfig.node.json',
],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react/react-in-jsx-scope': 'off',
'react/no-unknown-property': ['error', { ignore: ['css'] }],
'import/order': [
'error',
{
'newlines-between': 'always',
groups: [['builtin', 'external'], 'internal', 'parent', 'sibling', 'index'],
pathGroups: [
{
pattern: 'next',
group: 'builtin',
},
{
pattern: 'react',
group: 'builtin',
},
{
pattern: './src/**',
group: 'internal',
},
],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
},
settings: {
'import/resolver': {
alias: {
map: [['@', path.resolve(__dirname, './src')]],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
};
24 changes: 24 additions & 0 deletions src/frontend/.gitignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.env는 필요시 추가하실 예정인가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.env를 깜빡했네요😅
파일 추가 시 함께 추가하면 될 것 같아요!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네 좋아요!! 고생많으셨어요! 🙇‍♀️

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
Empty file removed src/frontend/.gitkeep
Empty file.
11 changes: 11 additions & 0 deletions src/frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"endOfLine": "auto",
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 120,
"bracketSpacing": true,
"arrowParens": "always",
"prefer-const": true
}
4 changes: 4 additions & 0 deletions src/frontend/.stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": ["stylelint-config-standard", "stylelint-config-clean-order"],
"customSyntax": "postcss-styled-syntax"
}
1 change: 1 addition & 0 deletions src/frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AsyncGate Frontend
12 changes: 12 additions & 0 deletions src/frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AsyncGate</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions src/frontend/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
testEnvironment: 'jsdom',
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
},
};
63 changes: 63 additions & 0 deletions src/frontend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "frontend",
"private": true,
"version": "0.0.0",
"type": "module",
"main": "index.js",
"license": "MIT",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint . --fix",
"preview": "vite preview",
"lint:css": "stylelint ./src/**/*.ts",
"test": "jest"
},
"dependencies": {
"@tanstack/react-query": "^5.66.0",
"@tanstack/react-query-devtools": "^5.66.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^7.1.5",
"styled-components": "^6.1.14",
"zustand": "^5.0.3"
},
"devDependencies": {
"@babel/core": "^7.26.7",
"@babel/preset-env": "^7.26.7",
"@babel/preset-react": "^7.26.3",
"@babel/preset-typescript": "^7.26.0",
"@eslint/js": "^9.17.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.2.0",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^29.5.14",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@typescript-eslint/eslint-plugin": "^8.22.0",
"@typescript-eslint/parser": "^8.22.0",
"@vitejs/plugin-react": "^4.3.4",
"babel-jest": "^29.7.0",
"babel-plugin-styled-components": "^2.1.4",
"eslint": "8.57.1",
"eslint-config-prettier": "^10.0.1",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.18",
"globals": "^15.14.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8.5.1",
"postcss-styled-syntax": "^0.7.1",
"prettier": "^3.4.2",
"stylelint": "^16.14.1",
"stylelint-config-clean-order": "^7.0.0",
"stylelint-config-standard": "^37.0.0",
"typescript": "~5.6.2",
"vite": "^6.0.11"
}
}
5 changes: 5 additions & 0 deletions src/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const App = () => {
return <div></div>;
};

export default App;
1 change: 1 addition & 0 deletions src/frontend/src/assets/empty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
폴더 생성을 위해 만든 빈 파일입니다.
1 change: 1 addition & 0 deletions src/frontend/src/components/common/empty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
폴더 생성을 위해 만든 빈 파일입니다.
1 change: 1 addition & 0 deletions src/frontend/src/hooks/empty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
폴더 생성을 위해 만든 빈 파일입니다.
25 changes: 25 additions & 0 deletions src/frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';

import App from './App';

const queryClient = new QueryClient({
defaultOptions: {
queries: {
throwOnError: true,
refetchOnWindowFocus: false,
},
mutations: {
throwOnError: true,
},
},
});

createRoot(document.getElementById('root')!).render(
<StrictMode>
<QueryClientProvider client={queryClient}>
<App />
</QueryClientProvider>
</StrictMode>,
);
1 change: 1 addition & 0 deletions src/frontend/src/pages/empty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
폴더 생성을 위해 만든 빈 파일입니다.
1 change: 1 addition & 0 deletions src/frontend/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
26 changes: 26 additions & 0 deletions src/frontend/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["src"]
}
14 changes: 14 additions & 0 deletions src/frontend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
],

"types": ["jest", "@testing-library/jest-dom"],
"compilerOptions": {
"paths":{
"@/*": ["./src/*"]
}
}
}
24 changes: 24 additions & 0 deletions src/frontend/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts"]
}
7 changes: 7 additions & 0 deletions src/frontend/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
})
Loading