feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment
Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped

This commit is contained in:
Yun Chan 2026-08-20 11:12:05 +09:00
parent 5cd1de6859
commit 708e20f747
406 changed files with 42464 additions and 6199 deletions

View file

@ -1,45 +1,278 @@
'use client'
// apps/admin/src/app/login/page.tsx
// Admin 로그인 — Google OAuth
// D3RO Voice — Admin Console Login (Midnight Glass v2)
import { Box, Button } from '@mui/material'
import { Suspense, useState } from 'react'
import { Box, Typography, Button, TextField, Alert } from '@mui/material'
import GoogleIcon from '@mui/icons-material/Google'
import { MetalCard, PhosphorText } from '@d3ro/ui/components/ds'
import { d3roPalette } from '@d3ro/ui/theme'
import LockOutlinedIcon from '@mui/icons-material/LockOutlined'
import { DoubleBezelCard, TactileBadge } from '@d3ro/ui/components/ds'
import { C, FONT_SANS, FONT_MONO, primaryButtonSx } from '@/lib/console-theme'
import { getSupabaseBrowserClient } from '@/lib/supabase-browser'
import { useRouter, useSearchParams } from 'next/navigation'
function LoginForm(): React.ReactElement {
const router = useRouter()
const searchParams = useSearchParams()
const redirectPath = searchParams.get('redirect') || '/'
const [usernameOrEmail, setUsernameOrEmail] = useState('admin')
const [password, setPassword] = useState('Test1234!')
const [loading, setLoading] = useState(false)
const [errorMsg, setErrorMsg] = useState<string | null>(null)
const handleLogin = async (e?: React.FormEvent): Promise<void> => {
if (e) e.preventDefault()
if (!usernameOrEmail || !password) {
setErrorMsg('아이디와 비밀번호를 입력해주세요.')
return
}
setLoading(true)
setErrorMsg(null)
try {
const res = await fetch('/api/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ usernameOrEmail, password }),
})
const data = await res.json()
if (!res.ok || !data.success) {
throw new Error(data.message || '인증에 실패했습니다.')
}
// Successful login
router.push(redirectPath)
router.refresh()
} catch (err) {
setErrorMsg(err instanceof Error ? err.message : '로그인 중 오류가 발생했습니다.')
} finally {
setLoading(false)
}
}
export default function AdminLoginPage(): React.ReactElement {
const handleGoogleLogin = async (): Promise<void> => {
const supabase = getSupabaseBrowserClient()
await supabase.auth.signInWithOAuth({
provider: 'google',
options: {
redirectTo: `${window.location.origin}/auth/callback`,
},
})
try {
const supabase = getSupabaseBrowserClient()
await supabase.auth.signInWithOAuth({
provider: 'google',
options: {
redirectTo: `${window.location.origin}/auth/callback`,
},
})
} catch {
setErrorMsg('Google OAuth 서비스 연결을 확인해주세요.')
}
}
return (
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', minHeight: '100vh', bgcolor: d3roPalette.bg.app }}>
<MetalCard sx={{ p: 5, maxWidth: 400, textAlign: 'center' }}>
<PhosphorText variant="title" sx={{ mb: 1 }}>D3RO ADMIN</PhosphorText>
<PhosphorText variant="dim" sx={{ mb: 4, display: 'block' }}>SaaS Management Console</PhosphorText>
<Button
variant="contained"
startIcon={<GoogleIcon />}
onClick={() => void handleGoogleLogin()}
fullWidth
sx={{
bgcolor: d3roPalette.accent.main,
color: d3roPalette.bg.app,
fontWeight: 600,
'&:hover': { bgcolor: d3roPalette.accent.main, filter: 'brightness(1.1)' },
}}
>
Sign in with Google
</Button>
</MetalCard>
<Box
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
minHeight: '100vh',
bgcolor: '#070b16',
backgroundImage: 'radial-gradient(ellipse 60% 50% at 50% 40%, rgba(59, 130, 246, 0.15) 0%, transparent 80%)',
p: 2,
position: 'relative',
overflow: 'hidden',
}}
>
{/* Background Grid Pattern */}
<Box className="bg-grid" sx={{ position: 'absolute', inset: 0, opacity: 0.04, pointerEvents: 'none' }} />
<DoubleBezelCard
bezelPadding="8px"
innerPadding="36px"
sx={{
width: '100%',
maxWidth: 440,
boxShadow: '0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(59, 130, 246, 0.15)',
}}
>
{/* Brand Header */}
<Box sx={{ textAlign: 'center', mb: 3.5 }}>
<Box
sx={{
width: 52,
height: 52,
borderRadius: '16px',
background: 'linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%)',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
boxShadow: '0 0 25px rgba(59, 130, 246, 0.5)',
mb: 2,
}}
>
<LockOutlinedIcon sx={{ color: '#ffffff', fontSize: 28 }} />
</Box>
<Typography
sx={{
fontFamily: FONT_SANS,
fontSize: '22px',
fontWeight: 800,
letterSpacing: '-0.02em',
color: C.bright,
lineHeight: 1.2,
}}
>
D3RO Voice Admin CRM
</Typography>
<Typography
sx={{
fontFamily: FONT_MONO,
fontSize: '11px',
color: C.dim,
letterSpacing: '0.08em',
mt: 0.5,
}}
>
RESTRICTED ACCESS • SUPER ADMIN CONTROL
</Typography>
<Box sx={{ display: 'flex', justifyContent: 'center', mt: 1.5 }}>
<TactileBadge ledColor="green" ledPulse tone="success" mono>
SECURITY SHIELD ACTIVE
</TactileBadge>
</Box>
</Box>
{errorMsg && (
<Alert
severity="error"
sx={{
mb: 2.5,
bgcolor: 'rgba(239, 68, 68, 0.15)',
color: '#fca5a5',
border: '1px solid rgba(239, 68, 68, 0.3)',
borderRadius: '10px',
fontFamily: FONT_SANS,
fontSize: '12px',
}}
>
{errorMsg}
</Alert>
)}
{/* Login Form */}
<Box component="form" onSubmit={handleLogin} sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
<TextField
label="Admin Identifier (Username / Email)"
value={usernameOrEmail}
onChange={(e) => setUsernameOrEmail(e.target.value)}
fullWidth
size="small"
required
autoComplete="username"
sx={{
'& .MuiOutlinedInput-root': {
bgcolor: 'rgba(10, 17, 31, 0.8)',
color: C.bright,
borderRadius: '10px',
fontFamily: FONT_SANS,
fontSize: '13px',
'& fieldset': { borderColor: C.border },
'&:hover fieldset': { borderColor: C.borderHl },
'&.Mui-focused fieldset': { borderColor: C.accentLight },
},
'& .MuiInputLabel-root': { color: C.dim },
}}
/>
<TextField
label="Password"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
fullWidth
size="small"
required
autoComplete="current-password"
sx={{
'& .MuiOutlinedInput-root': {
bgcolor: 'rgba(10, 17, 31, 0.8)',
color: C.bright,
borderRadius: '10px',
fontFamily: FONT_SANS,
fontSize: '13px',
'& fieldset': { borderColor: C.border },
'&:hover fieldset': { borderColor: C.borderHl },
'&.Mui-focused fieldset': { borderColor: C.accentLight },
},
'& .MuiInputLabel-root': { color: C.dim },
}}
/>
<Button
type="submit"
variant="contained"
disabled={loading}
fullWidth
sx={{
...primaryButtonSx,
py: 1.25,
mt: 1,
}}
>
{loading ? '인증 중...' : 'Sign In as Super Admin'}
</Button>
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5, my: 1 }}>
<Box sx={{ flex: 1, height: '1px', bgcolor: C.border }} />
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>
OR VIA OAUTH
</Typography>
<Box sx={{ flex: 1, height: '1px', bgcolor: C.border }} />
</Box>
<Button
variant="outlined"
startIcon={<GoogleIcon />}
onClick={() => void handleGoogleLogin()}
fullWidth
sx={{
borderColor: C.borderHl,
color: C.bright,
bgcolor: 'rgba(17, 26, 48, 0.5)',
borderRadius: '10px',
fontFamily: FONT_SANS,
fontSize: '13px',
fontWeight: 600,
textTransform: 'none',
py: 1.1,
'&:hover': {
borderColor: C.accentLight,
bgcolor: 'rgba(26, 38, 68, 0.8)',
},
}}
>
Continue with Google OAuth
</Button>
</Box>
{/* Footer Note */}
<Box sx={{ mt: 3.5, textAlign: 'center' }}>
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>
Protected by D3RO Unified Auth & Session Cookie Cryptography
</Typography>
</Box>
</DoubleBezelCard>
</Box>
)
}
export default function AdminLoginPage(): React.ReactElement {
return (
<Suspense fallback={<Box sx={{ minHeight: '100vh', bgcolor: '#070b16' }} />}>
<LoginForm />
</Suspense>
)
}