feat: Complete Material-UI migration for all pages

- Updated Dashboard page to use Material-UI components
- Updated SignupPage to use Material-UI with Google OAuth style
- Fixed Material-UI icon import issues (replaced Activity with Timeline)
- Updated CLAUDE.md to reflect UI framework migration from Lucide/Tailwind to Material-UI
- All pages now follow consistent Google OAuth design pattern

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2025-08-31 11:35:05 +09:00
parent fabcc986f9
commit 0aa6db1b3b
3 changed files with 580 additions and 459 deletions

View File

@ -25,7 +25,10 @@
### 기술 스택
- **API Gateway**: Apache APISIX 3.8.0
- **Frontend**: React 18 + Vite + TypeScript + shadcn/ui + Tailwind CSS
- **Frontend**: React 18 + Vite + TypeScript + Material-UI (MUI)
- 이전: Lucide React + Tailwind CSS
- 현재: Material-UI (@mui/material, @emotion/react, @emotion/styled, @mui/icons-material)
- 디자인: Google OAuth 스타일 UI/UX
- **Backend**: Python 3.11 + FastAPI + Motor (MongoDB async)
- **Database**: MongoDB 7.0
- **Cache/Queue**: Redis 7

View File

@ -1,31 +1,82 @@
import { useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { useAuth } from '../contexts/AuthContext'
import {
LayoutDashboard,
Users,
Settings,
LogOut,
ChevronDown,
Bell,
Search,
Box,
Container,
Grid,
Card,
CardContent,
Typography,
Button,
AppBar,
Toolbar,
IconButton,
Avatar,
Menu,
X,
Shield,
Key,
Activity,
Clock
} from 'lucide-react'
MenuItem,
Drawer,
List,
ListItem,
ListItemIcon,
ListItemText,
ListItemButton,
Divider,
Paper,
LinearProgress,
Chip,
InputBase,
Badge
} from '@mui/material'
import {
Dashboard as DashboardIcon,
Apps,
Person,
AdminPanelSettings,
Menu as MenuIcon,
Logout,
Settings,
TrendingUp,
Security,
Speed,
AccessTime,
Notifications,
Search,
VpnKey,
Timeline
} from '@mui/icons-material'
const Dashboard = () => {
const [drawerOpen, setDrawerOpen] = useState(false)
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)
const { user, logout } = useAuth()
const [isSidebarOpen, setIsSidebarOpen] = useState(true)
const [isProfileOpen, setIsProfileOpen] = useState(false)
const navigate = useNavigate()
const handleLogout = async () => {
await logout()
navigate('/login')
}
const handleProfileMenuOpen = (event: React.MouseEvent<HTMLElement>) => {
setAnchorEl(event.currentTarget)
}
const handleProfileMenuClose = () => {
setAnchorEl(null)
}
const menuItems = [
{ text: '대시보드', icon: <DashboardIcon />, path: '/dashboard' },
{ text: '애플리케이션', icon: <VpnKey />, path: '/applications' },
{ text: '프로필 설정', icon: <Settings />, path: '/profile' },
{ text: '관리자 패널', icon: <AdminPanelSettings />, path: '/admin', adminOnly: true },
]
const stats = [
{ title: '활성 세션', value: '24', icon: Users, change: '+12%' },
{ title: '등록된 앱', value: '8', icon: Key, change: '+2' },
{ title: '이번 달 로그인', value: '1,429', icon: Activity, change: '+48%' },
{ title: '평균 응답시간', value: '132ms', icon: Clock, change: '-12%' },
{ title: '활성 세션', value: '24', icon: <Person />, change: '+12%', color: '#1a73e8' },
{ title: '등록된 앱', value: '8', icon: <VpnKey />, change: '+2', color: '#34a853' },
{ title: '이번 달 로그인', value: '1,429', icon: <Timeline />, change: '+48%', color: '#fbbc04' },
{ title: '평균 응답시간', value: '132ms', icon: <AccessTime />, change: '-12%', color: '#ea4335' },
]
const recentActivities = [
@ -36,154 +87,209 @@ const Dashboard = () => {
]
return (
<div className="min-h-screen bg-gray-50">
{/* Sidebar */}
<aside className={`fixed top-0 left-0 z-40 h-screen transition-transform ${
isSidebarOpen ? 'translate-x-0' : '-translate-x-full'
} bg-white border-r border-gray-200 w-64`}>
<div className="flex items-center justify-between p-4 border-b">
<h1 className="text-xl font-bold text-gray-900">OAuth System</h1>
<button onClick={() => setIsSidebarOpen(false)} className="lg:hidden">
<X size={20} />
</button>
</div>
<nav className="p-4 space-y-2">
<a href="/dashboard" className="flex items-center space-x-3 p-3 bg-blue-50 text-blue-600 rounded-lg">
<LayoutDashboard size={20} />
<span></span>
</a>
<a href="/applications" className="flex items-center space-x-3 p-3 text-gray-700 hover:bg-gray-50 rounded-lg">
<Key size={20} />
<span></span>
</a>
<a href="/profile" className="flex items-center space-x-3 p-3 text-gray-700 hover:bg-gray-50 rounded-lg">
<Settings size={20} />
<span> </span>
</a>
{user?.role === 'system_admin' && (
<a href="/admin" className="flex items-center space-x-3 p-3 text-gray-700 hover:bg-gray-50 rounded-lg">
<Shield size={20} />
<span> </span>
</a>
)}
</nav>
<div className="absolute bottom-4 left-4 right-4">
<button
onClick={logout}
className="flex items-center space-x-3 p-3 text-red-600 hover:bg-red-50 rounded-lg w-full"
<Box sx={{ display: 'flex', minHeight: '100vh', backgroundColor: '#f8f9fa' }}>
{/* AppBar */}
<AppBar position="fixed" elevation={0} sx={{ backgroundColor: '#fff', borderBottom: '1px solid #dadce0' }}>
<Toolbar>
<IconButton
edge="start"
color="inherit"
aria-label="menu"
onClick={() => setDrawerOpen(true)}
sx={{ mr: 2, color: '#5f6368' }}
>
<LogOut size={20} />
<span></span>
</button>
</div>
</aside>
<MenuIcon />
</IconButton>
<Typography variant="h6" sx={{ flexGrow: 0, color: '#202124', fontWeight: 500, mr: 4 }}>
OAuth System
</Typography>
{/* Search Bar */}
<Box sx={{
flexGrow: 1,
maxWidth: 600,
backgroundColor: '#f1f3f4',
borderRadius: 2,
px: 2,
display: 'flex',
alignItems: 'center'
}}>
<Search sx={{ color: '#5f6368', mr: 1 }} />
<InputBase
placeholder="검색..."
sx={{ flex: 1, py: 1 }}
/>
</Box>
<Box sx={{ flexGrow: 1 }} />
<IconButton sx={{ mr: 2 }}>
<Badge badgeContent={3} color="error">
<Notifications sx={{ color: '#5f6368' }} />
</Badge>
</IconButton>
<IconButton onClick={handleProfileMenuOpen}>
<Avatar sx={{ width: 32, height: 32, bgcolor: '#1a73e8' }}>
{user?.name?.[0] || user?.email?.[0]?.toUpperCase() || 'U'}
</Avatar>
</IconButton>
<Menu
anchorEl={anchorEl}
open={Boolean(anchorEl)}
onClose={handleProfileMenuClose}
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
>
<MenuItem onClick={() => { handleProfileMenuClose(); navigate('/profile'); }}>
<ListItemIcon><Person fontSize="small" /></ListItemIcon>
</MenuItem>
<Divider />
<MenuItem onClick={handleLogout}>
<ListItemIcon><Logout fontSize="small" /></ListItemIcon>
</MenuItem>
</Menu>
</Toolbar>
</AppBar>
{/* Drawer */}
<Drawer
anchor="left"
open={drawerOpen}
onClose={() => setDrawerOpen(false)}
>
<Box sx={{ width: 250 }}>
<Box sx={{ p: 2, borderBottom: '1px solid #dadce0' }}>
<Typography variant="h6" sx={{ fontWeight: 500, color: '#202124' }}>
OAuth System
</Typography>
</Box>
<List>
{menuItems.map((item) => {
if (item.adminOnly && user?.role !== 'system_admin') return null
return (
<ListItemButton
key={item.text}
onClick={() => {
navigate(item.path)
setDrawerOpen(false)
}}
selected={location.pathname === item.path}
sx={{
'&.Mui-selected': {
backgroundColor: '#e8f0fe',
color: '#1967d2',
'& .MuiListItemIcon-root': {
color: '#1967d2',
}
}
}}
>
<ListItemIcon sx={{ color: '#5f6368' }}>{item.icon}</ListItemIcon>
<ListItemText primary={item.text} sx={{ color: 'inherit' }} />
</ListItemButton>
)
})}
</List>
<Divider />
<List>
<ListItemButton onClick={handleLogout}>
<ListItemIcon sx={{ color: '#ea4335' }}><Logout /></ListItemIcon>
<ListItemText primary="로그아웃" sx={{ color: '#ea4335' }} />
</ListItemButton>
</List>
</Box>
</Drawer>
{/* Main Content */}
<div className={`${isSidebarOpen ? 'lg:ml-64' : ''}`}>
{/* Header */}
<header className="bg-white border-b border-gray-200">
<div className="flex items-center justify-between p-4">
<div className="flex items-center space-x-4">
<button onClick={() => setIsSidebarOpen(!isSidebarOpen)}>
<Menu size={24} />
</button>
<div className="relative">
<Search className="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400" size={20} />
<input
type="text"
placeholder="검색..."
className="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
/>
</div>
</div>
<div className="flex items-center space-x-4">
<button className="relative p-2 text-gray-600 hover:text-gray-900">
<Bell size={20} />
<span className="absolute top-0 right-0 w-2 h-2 bg-red-500 rounded-full"></span>
</button>
<div className="relative">
<button
onClick={() => setIsProfileOpen(!isProfileOpen)}
className="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-50"
>
<div className="w-8 h-8 bg-blue-600 rounded-full flex items-center justify-center text-white">
{user?.name?.[0] || user?.email?.[0]?.toUpperCase()}
</div>
<span className="hidden md:block text-sm font-medium text-gray-700">
{user?.name || user?.email}
</span>
<ChevronDown size={16} />
</button>
{isProfileOpen && (
<div className="absolute right-0 mt-2 w-48 bg-white border border-gray-200 rounded-lg shadow-lg">
<a href="/profile" className="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50">
</a>
<hr className="border-gray-200" />
<button onClick={logout} className="block w-full text-left px-4 py-2 text-sm text-red-600 hover:bg-red-50">
</button>
</div>
)}
</div>
</div>
</div>
</header>
{/* Dashboard Content */}
<main className="p-6">
<div className="mb-6">
<h2 className="text-2xl font-bold text-gray-900"></h2>
<p className="text-gray-600">OAuth </p>
</div>
<Box component="main" sx={{ flexGrow: 1, mt: 8, p: 3 }}>
<Container maxWidth="xl">
{/* Page Header */}
<Box sx={{ mb: 4 }}>
<Typography variant="h4" sx={{ mb: 1, fontWeight: 400, color: '#202124' }}>
</Typography>
<Typography sx={{ color: '#5f6368' }}>
OAuth
</Typography>
</Box>
{/* Stats Grid */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<Grid container spacing={3} sx={{ mb: 4 }}>
{stats.map((stat) => (
<div key={stat.title} className="bg-white p-6 rounded-lg shadow">
<div className="flex items-center justify-between mb-4">
<div className="p-2 bg-blue-50 rounded-lg">
<stat.icon className="text-blue-600" size={24} />
</div>
<span className={`text-sm font-medium ${
stat.change.startsWith('+') ? 'text-green-600' : 'text-red-600'
}`}>
{stat.change}
</span>
</div>
<h3 className="text-2xl font-bold text-gray-900">{stat.value}</h3>
<p className="text-sm text-gray-600">{stat.title}</p>
</div>
<Grid item xs={12} sm={6} md={3} key={stat.title}>
<Card elevation={0} sx={{ border: '1px solid #dadce0' }}>
<CardContent>
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', mb: 2 }}>
<Box sx={{
p: 1,
borderRadius: 1,
backgroundColor: `${stat.color}20`,
color: stat.color
}}>
{stat.icon}
</Box>
<Chip
label={stat.change}
size="small"
sx={{
backgroundColor: stat.change.startsWith('+') ? '#e6f4ea' : '#fce8e6',
color: stat.change.startsWith('+') ? '#1e8e3e' : '#d33b27',
fontWeight: 500
}}
/>
</Box>
<Typography variant="h4" sx={{ fontWeight: 500, color: '#202124', mb: 0.5 }}>
{stat.value}
</Typography>
<Typography sx={{ color: '#5f6368', fontSize: '14px' }}>
{stat.title}
</Typography>
</CardContent>
</Card>
</Grid>
))}
</div>
</Grid>
{/* Recent Activities */}
<div className="bg-white rounded-lg shadow">
<div className="p-6 border-b border-gray-200">
<h3 className="text-lg font-semibold text-gray-900"> </h3>
</div>
<div className="p-6">
<div className="space-y-4">
{recentActivities.map((activity) => (
<div key={activity.id} className="flex items-center justify-between py-3 border-b border-gray-100 last:border-0">
<div>
<p className="text-sm font-medium text-gray-900">{activity.action}</p>
<p className="text-sm text-gray-600">{activity.app}</p>
</div>
<span className="text-sm text-gray-500">{activity.time}</span>
</div>
{/* Recent Activity */}
<Paper elevation={0} sx={{ border: '1px solid #dadce0', borderRadius: 2 }}>
<Box sx={{ p: 3, borderBottom: '1px solid #dadce0' }}>
<Typography variant="h6" sx={{ fontWeight: 500, color: '#202124' }}>
</Typography>
</Box>
<List>
{recentActivities.map((activity, index) => (
<React.Fragment key={activity.id}>
<ListItem sx={{ py: 2.5 }}>
<ListItemText
primary={
<Typography sx={{ fontWeight: 500, color: '#202124' }}>
{activity.action}
</Typography>
}
secondary={
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1, mt: 0.5 }}>
<Typography variant="body2" sx={{ color: '#5f6368' }}>
{activity.app}
</Typography>
<Typography variant="caption" sx={{ color: '#5f6368' }}>
{activity.time}
</Typography>
</Box>
}
/>
</ListItem>
{index < recentActivities.length - 1 && <Divider />}
</React.Fragment>
))}
</div>
</div>
</div>
</main>
</div>
</div>
</List>
</Paper>
</Container>
</Box>
</Box>
)
}

View File

@ -1,17 +1,30 @@
import { useState } from 'react'
import { useNavigate } from 'react-router-dom'
import {
Eye,
EyeOff,
Loader2,
Shield,
Box,
Container,
TextField,
Button,
Typography,
Link,
Paper,
IconButton,
InputAdornment,
Checkbox,
FormControlLabel,
LinearProgress,
Alert,
Stack
} from '@mui/material'
import {
Visibility,
VisibilityOff,
Person,
Email,
Lock,
Mail,
ArrowRight,
User,
Building,
Check
} from 'lucide-react'
Business,
ArrowForward
} from '@mui/icons-material'
const SignupPage = () => {
const [formData, setFormData] = useState({
@ -25,7 +38,6 @@ const SignupPage = () => {
const [showPassword, setShowPassword] = useState(false)
const [showConfirmPassword, setShowConfirmPassword] = useState(false)
const [isLoading, setIsLoading] = useState(false)
const [focusedInput, setFocusedInput] = useState<string | null>(null)
const [passwordStrength, setPasswordStrength] = useState(0)
const navigate = useNavigate()
@ -89,12 +101,12 @@ const SignupPage = () => {
const getPasswordStrengthColor = () => {
switch(passwordStrength) {
case 0: return 'bg-gray-400'
case 1: return 'bg-red-500'
case 2: return 'bg-yellow-500'
case 3: return 'bg-blue-500'
case 4: return 'bg-green-500'
default: return 'bg-gray-400'
case 0: return '#bdbdbd'
case 1: return '#f44336'
case 2: return '#ff9800'
case 3: return '#2196f3'
case 4: return '#4caf50'
default: return '#bdbdbd'
}
}
@ -110,293 +122,293 @@ const SignupPage = () => {
}
return (
<div className="min-h-screen flex relative overflow-hidden bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900">
{/* Animated background elements */}
<div className="absolute inset-0">
<div className="absolute top-20 left-20 w-72 h-72 bg-purple-600 rounded-full mix-blend-multiply filter blur-xl opacity-30 animate-float"></div>
<div className="absolute top-40 right-20 w-72 h-72 bg-pink-600 rounded-full mix-blend-multiply filter blur-xl opacity-30 animate-float" style={{ animationDelay: '2s' }}></div>
<div className="absolute bottom-20 left-1/2 w-72 h-72 bg-blue-600 rounded-full mix-blend-multiply filter blur-xl opacity-30 animate-float" style={{ animationDelay: '4s' }}></div>
</div>
{/* Grid pattern overlay */}
<div className="absolute inset-0 opacity-20"
style={{
backgroundImage: `url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`
}}></div>
{/* Main content */}
<div className="relative z-10 w-full flex items-center justify-center p-4">
<div className="w-full max-w-5xl grid lg:grid-cols-2 gap-12 items-center">
{/* Left side - Branding */}
<div className="hidden lg:block text-white space-y-8">
<div className="space-y-4">
<div className="flex items-center space-x-3">
<div className="p-3 bg-white/10 backdrop-blur-xl rounded-2xl">
<Shield className="w-8 h-8 text-white" />
</div>
<h1 className="text-4xl font-bold">
AiMond Authorization
</h1>
</div>
<p className="text-xl text-gray-300">
</p>
</div>
<div className="space-y-6">
<div className="flex items-start space-x-4">
<div className="p-2 bg-green-500/20 rounded-lg flex-shrink-0">
<Check className="w-5 h-5 text-green-400" />
</div>
<div>
<h3 className="font-semibold text-lg mb-1"> </h3>
<p className="text-gray-400 text-sm"> </p>
</div>
</div>
<div className="flex items-start space-x-4">
<div className="p-2 bg-blue-500/20 rounded-lg flex-shrink-0">
<Shield className="w-5 h-5 text-blue-400" />
</div>
<div>
<h3 className="font-semibold text-lg mb-1"> </h3>
<p className="text-gray-400 text-sm"> </p>
</div>
</div>
<div className="flex items-start space-x-4">
<div className="p-2 bg-purple-500/20 rounded-lg flex-shrink-0">
<Building className="w-5 h-5 text-purple-400" />
</div>
<div>
<h3 className="font-semibold text-lg mb-1"> </h3>
<p className="text-gray-400 text-sm"> </p>
</div>
</div>
</div>
</div>
{/* Right side - Signup Form */}
<div className="w-full max-w-md mx-auto">
<div className="bg-white/10 backdrop-blur-2xl rounded-3xl p-8 shadow-2xl border border-white/20">
{/* Form Header */}
<div className="text-center mb-8">
<h2 className="text-3xl font-bold text-white mb-2">Create Account</h2>
<p className="text-gray-300"> </p>
</div>
<Box
sx={{
minHeight: '100vh',
display: 'flex',
flexDirection: 'column',
backgroundColor: '#fff'
}}
>
<Container maxWidth="sm">
<Box
sx={{
minHeight: '100vh',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
py: 4
}}
>
{/* Logo and Title */}
<Box sx={{ textAlign: 'center', mb: 4 }}>
<Typography
variant="h4"
sx={{
fontWeight: 300,
color: '#202124',
mb: 2,
fontFamily: 'Google Sans, Roboto, Arial, sans-serif'
}}
>
<Box component="span" sx={{ fontWeight: 500 }}>AiMond</Box>
</Typography>
<Typography
variant="h5"
sx={{
fontWeight: 400,
color: '#202124',
mb: 1
}}
>
AiMond
</Typography>
<Typography sx={{ color: '#5f6368', fontSize: '16px' }}>
AiMond로
</Typography>
</Box>
{/* Signup Form */}
<form onSubmit={handleSubmit} className="space-y-5">
{/* Name Input */}
<div className="space-y-2">
<label htmlFor="name" className="text-sm font-medium text-gray-300 flex items-center space-x-2">
<User size={16} />
<span></span>
</label>
<div className="relative">
<input
id="name"
<Paper
elevation={0}
sx={{
border: '1px solid #dadce0',
borderRadius: '8px',
p: 5,
maxWidth: 450,
width: '100%',
mx: 'auto'
}}
>
<form onSubmit={handleSubmit}>
<Stack spacing={2}>
<Box sx={{ display: 'flex', gap: 2 }}>
<TextField
name="name"
type="text"
required
value={formData.name}
onChange={handleInputChange}
onFocus={() => setFocusedInput('name')}
onBlur={() => setFocusedInput(null)}
className="w-full px-4 py-3 bg-white/5 border border-white/10 rounded-xl text-white placeholder-gray-400 focus:outline-none focus:border-purple-400 focus:bg-white/10 transition-all duration-300"
placeholder="홍길동"
disabled={isLoading}
placeholder="이름"
required
fullWidth
size="medium"
InputProps={{
startAdornment: (
<InputAdornment position="start">
<Person sx={{ color: '#5f6368' }} />
</InputAdornment>
),
}}
/>
<div className={`absolute bottom-0 left-0 h-0.5 bg-gradient-to-r from-purple-400 to-pink-400 transition-all duration-300 ${
focusedInput === 'name' ? 'w-full' : 'w-0'
}`}></div>
</div>
</div>
</Box>
{/* Email Input */}
<div className="space-y-2">
<label htmlFor="email" className="text-sm font-medium text-gray-300 flex items-center space-x-2">
<Mail size={16} />
<span> </span>
</label>
<div className="relative">
<input
id="email"
<TextField
name="email"
type="email"
required
value={formData.email}
onChange={handleInputChange}
onFocus={() => setFocusedInput('email')}
onBlur={() => setFocusedInput(null)}
className="w-full px-4 py-3 bg-white/5 border border-white/10 rounded-xl text-white placeholder-gray-400 focus:outline-none focus:border-purple-400 focus:bg-white/10 transition-all duration-300"
placeholder="your@email.com"
disabled={isLoading}
placeholder="이메일 주소"
required
fullWidth
size="medium"
InputProps={{
startAdornment: (
<InputAdornment position="start">
<Email sx={{ color: '#5f6368' }} />
</InputAdornment>
),
}}
/>
<div className={`absolute bottom-0 left-0 h-0.5 bg-gradient-to-r from-purple-400 to-pink-400 transition-all duration-300 ${
focusedInput === 'email' ? 'w-full' : 'w-0'
}`}></div>
</div>
</div>
{/* Organization Input */}
<div className="space-y-2">
<label htmlFor="organization" className="text-sm font-medium text-gray-300 flex items-center space-x-2">
<Building size={16} />
<span>/ ()</span>
</label>
<div className="relative">
<input
id="organization"
<TextField
name="organization"
type="text"
value={formData.organization}
onChange={handleInputChange}
onFocus={() => setFocusedInput('organization')}
onBlur={() => setFocusedInput(null)}
className="w-full px-4 py-3 bg-white/5 border border-white/10 rounded-xl text-white placeholder-gray-400 focus:outline-none focus:border-purple-400 focus:bg-white/10 transition-all duration-300"
placeholder="AiMond Inc."
disabled={isLoading}
placeholder="조직/회사 (선택)"
fullWidth
size="medium"
InputProps={{
startAdornment: (
<InputAdornment position="start">
<Business sx={{ color: '#5f6368' }} />
</InputAdornment>
),
}}
/>
<div className={`absolute bottom-0 left-0 h-0.5 bg-gradient-to-r from-purple-400 to-pink-400 transition-all duration-300 ${
focusedInput === 'organization' ? 'w-full' : 'w-0'
}`}></div>
</div>
</div>
{/* Password Input */}
<div className="space-y-2">
<label htmlFor="password" className="text-sm font-medium text-gray-300 flex items-center space-x-2">
<Lock size={16} />
<span></span>
</label>
<div className="relative">
<input
id="password"
<TextField
name="password"
type={showPassword ? 'text' : 'password'}
required
value={formData.password}
onChange={handleInputChange}
onFocus={() => setFocusedInput('password')}
onBlur={() => setFocusedInput(null)}
className="w-full px-4 py-3 pr-12 bg-white/5 border border-white/10 rounded-xl text-white placeholder-gray-400 focus:outline-none focus:border-purple-400 focus:bg-white/10 transition-all duration-300"
placeholder="••••••••"
disabled={isLoading}
/>
<button
type="button"
placeholder="비밀번호"
required
fullWidth
size="medium"
InputProps={{
startAdornment: (
<InputAdornment position="start">
<Lock sx={{ color: '#5f6368' }} />
</InputAdornment>
),
endAdornment: (
<InputAdornment position="end">
<IconButton
onClick={() => setShowPassword(!showPassword)}
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-white transition-colors"
edge="end"
size="small"
>
{showPassword ? <EyeOff size={20} /> : <Eye size={20} />}
</button>
<div className={`absolute bottom-0 left-0 h-0.5 bg-gradient-to-r from-purple-400 to-pink-400 transition-all duration-300 ${
focusedInput === 'password' ? 'w-full' : 'w-0'
}`}></div>
</div>
{formData.password && (
<div className="flex items-center space-x-2 mt-2">
<div className="flex-1 bg-gray-700 rounded-full h-2">
<div className={`h-full rounded-full transition-all duration-300 ${getPasswordStrengthColor()}`}
style={{ width: `${passwordStrength * 25}%` }}></div>
</div>
<span className="text-xs text-gray-400">{getPasswordStrengthText()}</span>
</div>
)}
</div>
{showPassword ? <VisibilityOff /> : <Visibility />}
</IconButton>
</InputAdornment>
),
}}
/>
{/* Confirm Password Input */}
<div className="space-y-2">
<label htmlFor="confirmPassword" className="text-sm font-medium text-gray-300 flex items-center space-x-2">
<Lock size={16} />
<span> </span>
</label>
<div className="relative">
<input
id="confirmPassword"
{formData.password && (
<Box>
<LinearProgress
variant="determinate"
value={passwordStrength * 25}
sx={{
height: 6,
borderRadius: 3,
backgroundColor: '#e0e0e0',
'& .MuiLinearProgress-bar': {
backgroundColor: getPasswordStrengthColor(),
}
}}
/>
<Typography variant="caption" sx={{ color: '#5f6368', mt: 0.5 }}>
: {getPasswordStrengthText()}
</Typography>
</Box>
)}
<TextField
name="confirmPassword"
type={showConfirmPassword ? 'text' : 'password'}
required
value={formData.confirmPassword}
onChange={handleInputChange}
onFocus={() => setFocusedInput('confirmPassword')}
onBlur={() => setFocusedInput(null)}
className="w-full px-4 py-3 pr-12 bg-white/5 border border-white/10 rounded-xl text-white placeholder-gray-400 focus:outline-none focus:border-purple-400 focus:bg-white/10 transition-all duration-300"
placeholder="••••••••"
disabled={isLoading}
/>
<button
type="button"
placeholder="비밀번호 확인"
required
fullWidth
size="medium"
InputProps={{
startAdornment: (
<InputAdornment position="start">
<Lock sx={{ color: '#5f6368' }} />
</InputAdornment>
),
endAdornment: (
<InputAdornment position="end">
<IconButton
onClick={() => setShowConfirmPassword(!showConfirmPassword)}
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-white transition-colors"
edge="end"
size="small"
>
{showConfirmPassword ? <EyeOff size={20} /> : <Eye size={20} />}
</button>
<div className={`absolute bottom-0 left-0 h-0.5 bg-gradient-to-r from-purple-400 to-pink-400 transition-all duration-300 ${
focusedInput === 'confirmPassword' ? 'w-full' : 'w-0'
}`}></div>
</div>
</div>
{showConfirmPassword ? <VisibilityOff /> : <Visibility />}
</IconButton>
</InputAdornment>
),
}}
/>
{/* Terms Agreement */}
<div className="flex items-start space-x-2">
<input
type="checkbox"
id="agreeTerms"
<Typography variant="caption" sx={{ color: '#5f6368', lineHeight: 1.5 }}>
, , 8
</Typography>
<FormControlLabel
control={
<Checkbox
name="agreeTerms"
checked={formData.agreeTerms}
onChange={handleInputChange}
className="mt-1 w-4 h-4 bg-white/10 border-white/20 rounded text-purple-500 focus:ring-purple-500 focus:ring-offset-0"
size="small"
sx={{ color: '#5f6368' }}
required
/>
<label htmlFor="agreeTerms" className="text-sm text-gray-300">
<a href="#" className="text-purple-400 hover:text-purple-300"> </a> {' '}
<a href="#" className="text-purple-400 hover:text-purple-300"> </a>
</label>
</div>
}
label={
<Typography sx={{ fontSize: '14px', color: '#5f6368' }}>
<Link href="#" sx={{ color: '#1a73e8' }}> </Link> {' '}
<Link href="#" sx={{ color: '#1a73e8' }}></Link>
</Typography>
}
/>
{/* Submit Button */}
<button
type="submit"
disabled={isLoading || !formData.agreeTerms}
className="w-full relative group overflow-hidden rounded-xl bg-gradient-to-r from-purple-500 to-pink-500 p-[2px] transition-all duration-300 hover:scale-[1.02] disabled:opacity-50 disabled:cursor-not-allowed"
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mt: 3 }}>
<Link
href="/login"
underline="none"
sx={{
color: '#1a73e8',
fontSize: '14px',
fontWeight: 500
}}
>
<div className="relative flex items-center justify-center w-full bg-slate-900 back rounded-[10px] py-3 transition-all duration-300 group-hover:bg-opacity-0">
{isLoading ? (
<>
<Loader2 className="animate-spin mr-2" size={20} />
<span className="font-semibold text-white"> ...</span>
</>
) : (
<>
<span className="font-semibold text-white"> </span>
<ArrowRight className="ml-2 group-hover:translate-x-1 transition-transform" size={20} />
</>
)}
</div>
</button>
</Link>
<Button
type="submit"
variant="contained"
disabled={isLoading || !formData.agreeTerms}
endIcon={<ArrowForward />}
sx={{
backgroundColor: '#1a73e8',
color: 'white',
textTransform: 'none',
px: 3,
py: 1,
fontSize: '14px',
fontWeight: 500,
'&:hover': {
backgroundColor: '#1666c9',
},
}}
>
{isLoading ? '계정 생성 중...' : '다음'}
</Button>
</Box>
</Stack>
</form>
</Paper>
{/* Sign in link */}
<p className="mt-6 text-center text-sm text-gray-400">
?{' '}
<a href="/login" className="font-medium text-purple-400 hover:text-purple-300 transition-colors">
</a>
</p>
</div>
{/* Footer Text */}
<Box sx={{ mt: 4, textAlign: 'center' }}>
<Typography sx={{ fontSize: '12px', color: '#5f6368' }}>
AiMond AiMond
</Typography>
</Box>
</Box>
</Container>
{/* Security Badge */}
<div className="mt-6 flex items-center justify-center space-x-2 text-xs text-gray-400">
<Lock size={12} />
<span>256-bit SSL </span>
</div>
</div>
</div>
</div>
</div>
{/* Footer */}
<Box
sx={{
borderTop: '1px solid #dadce0',
py: 2,
px: 3,
backgroundColor: '#f8f9fa'
}}
>
<Container maxWidth="lg">
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<Typography sx={{ fontSize: '12px', color: '#5f6368' }}></Typography>
<Stack direction="row" spacing={3}>
<Link href="#" underline="none" sx={{ fontSize: '12px', color: '#5f6368' }}>
</Link>
<Link href="#" underline="none" sx={{ fontSize: '12px', color: '#5f6368' }}>
</Link>
<Link href="#" underline="none" sx={{ fontSize: '12px', color: '#5f6368' }}>
</Link>
</Stack>
</Box>
</Container>
</Box>
</Box>
)
}