diff --git a/apps/web/.gitignore b/apps/web/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/apps/web/.gitignore @@ -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? diff --git a/apps/web/eslint.config.js b/apps/web/eslint.config.js new file mode 100644 index 00000000..5e6b472f --- /dev/null +++ b/apps/web/eslint.config.js @@ -0,0 +1,23 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' +import { defineConfig, globalIgnores } from 'eslint/config' + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + js.configs.recommended, + tseslint.configs.recommended, + reactHooks.configs.flat.recommended, + reactRefresh.configs.vite, + ], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + }, +]) diff --git a/apps/web/index.html b/apps/web/index.html new file mode 100644 index 00000000..ae9502bc --- /dev/null +++ b/apps/web/index.html @@ -0,0 +1,13 @@ + + + + + + + 롤림푸스 - 내전 관리 + + +
+ + + diff --git a/apps/web/package.json b/apps/web/package.json new file mode 100644 index 00000000..03e56ae4 --- /dev/null +++ b/apps/web/package.json @@ -0,0 +1,45 @@ +{ + "name": "web", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "build:test": "tsc -b && vite build --mode test", + "build:prod": "tsc -b && vite build --mode production", + "deploy:test": "node ../../scripts/deploy-cloudflare-pages.mjs test", + "deploy:prod": "node ../../scripts/deploy-cloudflare-pages.mjs prod", + "pages:login": "wrangler login", + "pages:whoami": "wrangler whoami", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "@azure/msal-browser": "^5.8.0", + "@azure/msal-react": "^5.3.1", + "@tanstack/react-query": "^5.100.1", + "react": "^19.2.4", + "react-dom": "^19.2.4", + "react-router": "^7.14.0", + "socket.io-client": "^4.8.3" + }, + "devDependencies": { + "@eslint/js": "^9.39.4", + "@tailwindcss/vite": "^4.2.2", + "@types/node": "^24.12.2", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^6.0.1", + "daisyui": "^5.5.19", + "eslint": "^9.39.4", + "eslint-plugin-react-hooks": "^7.0.1", + "eslint-plugin-react-refresh": "^0.5.2", + "globals": "^17.4.0", + "tailwindcss": "^4.2.2", + "typescript": "~6.0.2", + "typescript-eslint": "^8.58.0", + "vite": "^8.0.4", + "wrangler": "^4.85.0" + } +} diff --git a/apps/web/public/_headers b/apps/web/public/_headers new file mode 100644 index 00000000..05a20c9e --- /dev/null +++ b/apps/web/public/_headers @@ -0,0 +1,9 @@ +/* + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin + +/assets/* + Cache-Control: public, max-age=31536000, immutable + +/index.html + Cache-Control: no-cache diff --git a/apps/web/public/_redirects b/apps/web/public/_redirects new file mode 100644 index 00000000..7797f7c6 --- /dev/null +++ b/apps/web/public/_redirects @@ -0,0 +1 @@ +/* /index.html 200 diff --git a/apps/web/public/auth/silent-callback.html b/apps/web/public/auth/silent-callback.html new file mode 100644 index 00000000..5db0a78d --- /dev/null +++ b/apps/web/public/auth/silent-callback.html @@ -0,0 +1,8 @@ + + + + + Silent Auth + + + diff --git a/apps/web/public/favicon.svg b/apps/web/public/favicon.svg new file mode 100644 index 00000000..6893eb13 --- /dev/null +++ b/apps/web/public/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/icons.svg b/apps/web/public/icons.svg new file mode 100644 index 00000000..e9522193 --- /dev/null +++ b/apps/web/public/icons.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/web/public/riot.txt b/apps/web/public/riot.txt new file mode 100644 index 00000000..3028f46b --- /dev/null +++ b/apps/web/public/riot.txt @@ -0,0 +1 @@ +c47e5251-44c8-4569-a3f6-3cab42fdec98 \ No newline at end of file diff --git a/apps/web/src/assets/hero.png b/apps/web/src/assets/hero.png new file mode 100644 index 00000000..cc51a3d2 Binary files /dev/null and b/apps/web/src/assets/hero.png differ diff --git a/apps/web/src/assets/position/Bottom_icon.png b/apps/web/src/assets/position/Bottom_icon.png new file mode 100644 index 00000000..c49002d3 Binary files /dev/null and b/apps/web/src/assets/position/Bottom_icon.png differ diff --git a/apps/web/src/assets/position/Jungle_icon.png b/apps/web/src/assets/position/Jungle_icon.png new file mode 100644 index 00000000..88daaf69 Binary files /dev/null and b/apps/web/src/assets/position/Jungle_icon.png differ diff --git a/apps/web/src/assets/position/Middle_icon.png b/apps/web/src/assets/position/Middle_icon.png new file mode 100644 index 00000000..c16810c7 Binary files /dev/null and b/apps/web/src/assets/position/Middle_icon.png differ diff --git a/apps/web/src/assets/position/Specialist_icon.png b/apps/web/src/assets/position/Specialist_icon.png new file mode 100644 index 00000000..0ed35aee Binary files /dev/null and b/apps/web/src/assets/position/Specialist_icon.png differ diff --git a/apps/web/src/assets/position/Support_icon.png b/apps/web/src/assets/position/Support_icon.png new file mode 100644 index 00000000..724f6c8c Binary files /dev/null and b/apps/web/src/assets/position/Support_icon.png differ diff --git a/apps/web/src/assets/position/Top_icon.png b/apps/web/src/assets/position/Top_icon.png new file mode 100644 index 00000000..fa923fce Binary files /dev/null and b/apps/web/src/assets/position/Top_icon.png differ diff --git a/apps/web/src/assets/react.svg b/apps/web/src/assets/react.svg new file mode 100644 index 00000000..6c87de9b --- /dev/null +++ b/apps/web/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/src/assets/vite.svg b/apps/web/src/assets/vite.svg new file mode 100644 index 00000000..5101b674 --- /dev/null +++ b/apps/web/src/assets/vite.svg @@ -0,0 +1 @@ +Vite diff --git a/apps/web/src/index.css b/apps/web/src/index.css new file mode 100644 index 00000000..45ade146 --- /dev/null +++ b/apps/web/src/index.css @@ -0,0 +1,46 @@ +@import url("https://fonts.googleapis.com/css2?family=Asta+Sans:wght@300..800&family=Gamja+Flower&display=swap"); + +@import "tailwindcss"; +@plugin "daisyui" { + themes: + light --default, + dark --prefersdark; +} + +body { + margin: 0; + font-family: + "Asta Sans", + -apple-system, + BlinkMacSystemFont, + system-ui, + Roboto, + "Helvetica Neue", + "Segoe UI", + "Apple SD Gothic Neo", + "Noto Sans KR", + "Malgun Gothic", + "Apple Color Emoji", + "Segoe UI Emoji", + "Segoe UI Symbol", + sans-serif; + font-size: 14px; + line-height: 1.5; +} + +/* poro.gg style: 모든 모서리 각지게 */ +*, +*::before, +*::after { + border-radius: 0 !important; +} + +/* daisyUI badge만 살짝 둥글게 (pill 형태) */ +.badge { + border-radius: 2px !important; +} + +/* 버튼도 각지게 */ +.btn { + border-radius: 0 !important; +} diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx new file mode 100644 index 00000000..5487c4df --- /dev/null +++ b/apps/web/src/main.tsx @@ -0,0 +1,26 @@ +import { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import './index.css'; +import App from './App.tsx'; +import { MsalAppProvider } from './lib/auth/MsalAppProvider.tsx'; + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + staleTime: 10 * 1000, + gcTime: 5 * 60 * 1000, + refetchOnWindowFocus: false, + }, + }, +}); + +createRoot(document.getElementById('root')!).render( + + + + + + + , +); diff --git a/apps/web/tsconfig.app.json b/apps/web/tsconfig.app.json new file mode 100644 index 00000000..1d29c885 --- /dev/null +++ b/apps/web/tsconfig.app.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023", "DOM", "DOM.Iterable"], + "module": "esnext", + "types": ["vite/client"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json new file mode 100644 index 00000000..1ffef600 --- /dev/null +++ b/apps/web/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/apps/web/tsconfig.node.json b/apps/web/tsconfig.node.json new file mode 100644 index 00000000..d3c52ea6 --- /dev/null +++ b/apps/web/tsconfig.node.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023"], + "module": "esnext", + "types": ["node"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["vite.config.ts"] +} diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts new file mode 100644 index 00000000..828a1bc1 --- /dev/null +++ b/apps/web/vite.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +import tailwindcss from "@tailwindcss/vite"; + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react(), tailwindcss()], + server: { + host: "0.0.0.0", + allowedHosts: ["126.dahyeon.us"], + }, +});