1
0
forked from baron/baron-sso

Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
2026-05-15 18:21:01 +09:00
45 changed files with 4775 additions and 16080 deletions

View File

@@ -1,16 +1,21 @@
FROM node:lts
WORKDIR /app
WORKDIR /workspace
# 패키지 정보 복사 및 의존성 설치
COPY package*.json ./
RUN npm ci
# Install pnpm
RUN npm install -g pnpm
# Copy workspace configs and common package
COPY common ./common
COPY orgfront ./orgfront
# Install dependencies for the workspace
RUN cd common && pnpm install --no-frozen-lockfile --ignore-scripts
# 프로덕션 서빙을 위한 serve 패키지 글로벌 설치
RUN npm install -g serve
# 소스 코드 복사
COPY . .
WORKDIR /workspace/orgfront
# Vite 기본 포트
EXPOSE 5175

View File

@@ -1,30 +1,3 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"formatter": {
"indentStyle": "space"
},
"linter": {
"enabled": true,
"rules": {
"style": {
"useEnumInitializers": "off"
},
"a11y": {
"noLabelWithoutControl": "off"
}
}
},
"organizeImports": {
"enabled": true
},
"files": {
"ignore": [
"dist",
".vite",
"node_modules",
"tsconfig*.json",
"test-results",
"playwright-report"
]
}
"extends": ["../common/config/biome.base.json"]
}

File diff suppressed because it is too large Load Diff

View File

@@ -20,40 +20,41 @@
"test:ui": "playwright test --ui"
},
"dependencies": {
"@radix-ui/react-avatar": "^1.1.4",
"@radix-ui/react-scroll-area": "^1.1.2",
"@radix-ui/react-slot": "^1.1.2",
"@radix-ui/react-switch": "^1.1.2",
"@tanstack/react-query": "^5.66.8",
"@tanstack/react-query-devtools": "^5.66.8",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
"@tanstack/react-query": "^5.100.10",
"@tanstack/react-query-devtools": "^5.100.10",
"@xyflow/react": "^12.10.2",
"axios": "^1.7.9",
"axios": "^1.16.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.563.0",
"oidc-client-ts": "^3.4.1",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-hook-form": "^7.71.1",
"react-oidc-context": "^3.3.0",
"react-router-dom": "^6.28.2",
"tailwind-merge": "^3.4.0",
"zod": "^3.24.1"
"lucide-react": "^1.14.0",
"oidc-client-ts": "^3.5.0",
"react": "^19.2.6",
"react-dom": "^19.2.6",
"react-hook-form": "^7.75.0",
"react-oidc-context": "^3.3.1",
"react-router-dom": "^7.15.0",
"tailwind-merge": "^3.6.0",
"zod": "^4.4.3"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@playwright/test": "^1.58.0",
"@types/node": "^24.10.1",
"@types/react": "^19.2.5",
"@playwright/test": "^1.60.0",
"@types/node": "^25.7.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.1",
"autoprefixer": "^10.4.23",
"jsdom": "^28.1.0",
"postcss": "^8.5.6",
"tailwindcss": "^3.4.14",
"autoprefixer": "^10.5.0",
"postcss": "^8.5.14",
"tailwindcss": "^3.4.19",
"tailwindcss-animate": "^1.0.7",
"typescript": "~5.9.3",
"vite": "^8.0.3",
"vitest": "^4.1.5"
"typescript": "^6.0.3",
"vite": "^8.0.12",
"vitest": "^4.1.6"
}
}

View File

@@ -36,21 +36,35 @@ if [ "${1:-}" = "--print-mode" ]; then
fi
ensure_frontend_dependencies() {
if [ ! -f package.json ] || [ ! -f package-lock.json ]; then
# If common workspace exists, manage dependencies from there
if [ -d /common ] && [ -f /common/package.json ]; then
WORKSPACE_DIR="/common"
LOCK_FILE="/common/pnpm-lock.yaml"
else
WORKSPACE_DIR="."
LOCK_FILE="package-lock.json"
fi
if [ ! -f "$WORKSPACE_DIR/package.json" ]; then
return 0
fi
if command -v sha256sum >/dev/null 2>&1; then
deps_hash="$(sha256sum package.json package-lock.json | sha256sum | awk '{print $1}')"
deps_hash="$(sha256sum "$WORKSPACE_DIR/package.json" "$LOCK_FILE" 2>/dev/null | sha256sum | awk '{print $1}')"
else
deps_hash="$(cksum package.json package-lock.json | cksum | awk '{print $1}')"
deps_hash="$(cksum "$WORKSPACE_DIR/package.json" "$LOCK_FILE" 2>/dev/null | cksum | awk '{print $1}')"
fi
deps_stamp="node_modules/.baron-deps-hash"
installed_hash="$(cat "$deps_stamp" 2>/dev/null || true)"
if [ "$installed_hash" != "$deps_hash" ]; then
echo "Installing frontend dependencies from package-lock.json..."
npm ci
echo "Installing frontend dependencies..."
if [ "$WORKSPACE_DIR" = "/common" ]; then
(cd /common && rm -rf node_modules .pnpm-store package-lock.json && npm install --no-workspaces --no-fund --no-audit)
else
npm ci
fi
mkdir -p node_modules
printf '%s\n' "$deps_hash" > "$deps_stamp"
fi

View File

@@ -1,71 +1,13 @@
import type { Config } from "tailwindcss";
import { fontFamily } from "tailwindcss/defaultTheme";
import commonPreset from "../common/theme/tailwind.preset";
const config: Config = {
darkMode: ["class"],
presets: [commonPreset],
content: [
"./index.html",
"./src/**/*.{ts,tsx}",
"../common/**/*.{ts,tsx,css}",
],
theme: {
container: {
center: true,
padding: "1.5rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
fontFamily: {
sans: ["Space Grotesk", "Pretendard Variable", ...fontFamily.sans],
},
boxShadow: {
card: "0 12px 40px rgba(7, 15, 26, 0.25)",
},
},
},
plugins: [require("tailwindcss-animate")],
};
export default config;

View File

@@ -16,10 +16,11 @@
"noEmit": true,
"jsx": "react-jsx",
"baseUrl": ".",
"ignoreDeprecations": "6.0",
"paths": {
"react": ["./node_modules/@types/react/index.d.ts"],
"react/jsx-dev-runtime": ["./node_modules/@types/react/jsx-dev-runtime.d.ts"],
"react/jsx-runtime": ["./node_modules/@types/react/jsx-runtime.d.ts"]
"react": ["../common/node_modules/@types/react/index.d.ts"],
"react/jsx-dev-runtime": ["../common/node_modules/@types/react/jsx-dev-runtime.d.ts"],
"react/jsx-runtime": ["../common/node_modules/@types/react/jsx-runtime.d.ts"]
},
/* Linting */

View File

@@ -1,68 +1,51 @@
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { defineConfig, mergeConfig } from "vite";
import { commonViteConfig, getAllowedHosts } from "../common/config/vite.base";
const buildOutDir =
process.env.ORGFRONT_BUILD_OUT_DIR ?? "/tmp/baron-sso-orgfront-dist";
const defaultAllowedHosts = [
"baron-orgchart.hmac.kr",
"sorg.hmac.kr",
"sdev.hmac.kr",
"localhost",
"172.16.10.176",
"127.0.0.1",
];
function hostFromUrl(value: string | undefined) {
if (!value) return undefined;
try {
return new URL(value).hostname;
} catch {
return value;
}
}
const allowedHosts = Array.from(
new Set(
[
...defaultAllowedHosts,
hostFromUrl(process.env.ORGFRONT_URL),
...(process.env.ORGFRONT_ALLOWED_HOSTS ?? "")
.split(",")
.map((host) => host.trim())
.filter(Boolean),
].filter((host): host is string => Boolean(host)),
),
const allowedHosts = getAllowedHosts(
[
"baron-orgchart.hmac.kr",
"sorg.hmac.kr",
"sdev.hmac.kr",
"localhost",
"172.16.10.176",
"127.0.0.1",
],
process.env.ORGFRONT_URL,
process.env.ORGFRONT_ALLOWED_HOSTS
);
export default defineConfig({
plugins: [react()],
cacheDir:
process.env.ORGFRONT_VITE_CACHE_DIR ?? "/tmp/baron-sso-orgfront-vite-cache",
build: {
outDir: buildOutDir,
emptyOutDir: true,
},
server: {
host: "0.0.0.0",
port: 5175,
allowedHosts,
proxy: {
"/api": {
target: process.env.API_PROXY_TARGET || "http://localhost:5000",
changeOrigin: true,
export default defineConfig(
mergeConfig(commonViteConfig, {
cacheDir:
process.env.ORGFRONT_VITE_CACHE_DIR ??
"/tmp/baron-sso-orgfront-vite-cache",
build: {
outDir: buildOutDir,
},
server: {
host: "0.0.0.0",
port: 5175,
allowedHosts,
proxy: {
"/api": {
target: process.env.API_PROXY_TARGET || "http://localhost:5000",
changeOrigin: true,
},
},
},
},
preview: {
host: "0.0.0.0",
port: 5175,
allowedHosts,
proxy: {
"/api": {
target: process.env.API_PROXY_TARGET || "http://localhost:5000",
changeOrigin: true,
preview: {
host: "0.0.0.0",
port: 5175,
allowedHosts,
proxy: {
"/api": {
target: process.env.API_PROXY_TARGET || "http://localhost:5000",
changeOrigin: true,
},
},
},
},
});
})
);