diff --git a/CURRENT_WORKS.md b/CURRENT_WORKS.md index f9df589c..46304926 100644 --- a/CURRENT_WORKS.md +++ b/CURRENT_WORKS.md @@ -58,4 +58,66 @@ ### 이슈 해결: - **문제**: Tailwind CSS 4.x에서 DaisyUI 플러그인 미적용 - **원인**: DaisyUI가 Tailwind 4.x를 완전히 지원하지 않음 - **해결**: Tailwind 3.4.17로 다운그레이드, PostCSS 설정 수정 -- **결과**: DaisyUI 클래스 정상 적용 (74.82 KB CSS) \ No newline at end of file +- **결과**: DaisyUI 클래스 정상 적용 (74.82 KB CSS) + +### 문서 업데이트 (2025-11-20): +- **api/CLAUDE.md**: shared/ 모델 참조 제거 +- **변경 사항**: + - 저장소 구조: 5개 → 3개 (api, admin, mng 독립 운영) + - 모델 구조: shared/ → 각 프로젝트 독립 모델 + - 워크플로우: shared 동기화 제거 + - CURRENT_WORKS.md 위치: mng 추가 + +--- + +## 2025-11-20 (수) - CSS 브라우저 호환성 문제 해결 + +### 주요 작업 +- DaisyUI oklch() 색상 함수 브라우저 호환성 문제 해결 +- Pure Tailwind CSS로 전환하여 구형 브라우저 지원 + +### 문제 상황: +- **증상**: mng.sam.kr 로그인 페이지 CSS 스타일이 적용되지 않음 +- **원인**: DaisyUI 5.5.5가 `oklch()` 색상 함수 사용 → Safari <15.4, Chrome <111 미지원 +- **영향**: CSS 변수가 계산되지 않아 버튼, 카드 등 모든 컴포넌트 스타일 무효화 + +### 해결 과정: +1. **DaisyUI 설정 시도** (실패) + - Custom hex 테마 설정 → DaisyUI가 여전히 oklch() 사용 + - `themes: false` 설정 → base CSS에서 oklch() 사용 + +2. **DaisyUI 완전 제거** (성공) + - `tailwind.config.js`에서 DaisyUI 플러그인 제거 + - Pure Tailwind CSS + @tailwindcss/forms 사용 + - Custom primary/secondary 색상 hex로 정의 + +3. **로그인 페이지 리팩토링** + - DaisyUI 클래스 → Tailwind 유틸리티 클래스 변환 + - `btn btn-primary` → `bg-primary text-white rounded-lg` + - `card` → `bg-white rounded-lg shadow-xl` + - `input input-bordered` → `border border-gray-300 rounded-lg` + +### 수정된 파일: +- `tailwind.config.js` - DaisyUI 제거, hex 색상 정의 +- `resources/css/app.css` - CSS 변수 추가 (향후 제거 예정) +- `resources/views/auth/login.blade.php` - Tailwind 유틸리티 클래스로 변환 +- `.env` - DB_HOST를 sam-mysql-1 → 127.0.0.1로 변경 (로컬 접근) + +### 빌드 결과: +- **Before**: 74.82 KB (DaisyUI 포함, oklch() 사용) +- **After**: 23.15 KB (Pure Tailwind, hex 색상 사용) +- **파일**: `public/build/assets/app-L1Qg3jEH.css` + +### 테스트 결과: +- ✅ 로그인 페이지 CSS 정상 적용 +- ✅ 모든 브라우저 호환성 확보 (hex 색상 사용) +- ✅ 로그인 기능 정상 작동 (원격 DB 데이터 복원 후) + +### 기술적 결정: +- **CSS 프레임워크**: DaisyUI → Pure Tailwind CSS +- **색상 시스템**: oklch() → hex (#570df8, #f000b8) +- **컴포넌트 스타일**: 사전 정의 클래스 → 유틸리티 조합 +- **향후 방향**: 로그인 페이지 기준으로 일관된 CSS 스타일 유지 + +### Git 커밋: +- (다음 커밋 예정) \ No newline at end of file diff --git a/app/Models/User.php b/app/Models/User.php index 749c7b77..eab98842 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,15 +2,15 @@ namespace App\Models; -// use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; +use Laravel\Sanctum\HasApiTokens; class User extends Authenticatable { - /** @use HasFactory<\Database\Factories\UserFactory> */ - use HasFactory, Notifiable; + use HasApiTokens, HasFactory, Notifiable, SoftDeletes; /** * The attributes that are mass assignable. @@ -18,9 +18,16 @@ class User extends Authenticatable * @var list */ protected $fillable = [ + 'user_id', 'name', 'email', + 'phone', 'password', + 'options', + 'profile_photo_path', + 'role', + 'is_active', + 'is_super_admin', ]; /** @@ -31,6 +38,10 @@ class User extends Authenticatable protected $hidden = [ 'password', 'remember_token', + 'two_factor_secret', + 'two_factor_recovery_codes', + 'two_factor_confirmed_at', + 'deleted_at', ]; /** @@ -42,7 +53,11 @@ protected function casts(): array { return [ 'email_verified_at' => 'datetime', + 'last_login_at' => 'datetime', 'password' => 'hashed', + 'options' => 'array', + 'is_active' => 'boolean', + 'is_super_admin' => 'boolean', ]; } -} +} \ No newline at end of file diff --git a/docs/INDEX.md b/docs/INDEX.md new file mode 100644 index 00000000..96d3e913 --- /dev/null +++ b/docs/INDEX.md @@ -0,0 +1,22 @@ +# MNG 프로젝트 문서 + +> 📌 **MNG 관리자 패널 문서 (Laravel + DaisyUI)** + +--- + +## 📖 개발 가이드 + +- 추후 추가 예정 + +--- + +## 🔍 분석 문서 + +- 추후 추가 예정 + +--- + +## 🔗 관련 문서 + +- **[메인 CLAUDE.md](../CLAUDE.md)** - MNG 프로젝트 가이드 +- **[CURRENT_WORKS.md](../CURRENT_WORKS.md)** - 현재 작업 이력 diff --git a/resources/css/app.css b/resources/css/app.css index b5c61c95..1d718bff 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,3 +1,13 @@ @tailwind base; @tailwind components; @tailwind utilities; + +:root { + --color-primary: #570df8; + --color-primary-content: #e0d2fe; + --color-secondary: #f000b8; + --color-base-100: #ffffff; + --color-base-200: #f9fafb; + --color-base-300: #f3f4f6; + --color-base-content: #1f2937; +} diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index f2273f2c..cd8f4108 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -1,5 +1,5 @@ - + @@ -7,88 +7,82 @@ 로그인 - {{ config('app.name') }} @vite(['resources/css/app.css', 'resources/js/app.js']) - -
-
-
-

{{ config('app.name') }}

-

관리자 패널

+ +
+
+
+

{{ config('app.name') }}

+

관리자 패널

-
-
-

로그인

+
+

로그인

- @if (session('success')) -
- - - - {{ session('success') }} -
- @endif - - @if ($errors->any()) -
- - - - {{ $errors->first() }} -
- @endif - -
- @csrf - -
- - - @error('email') - - @enderror -
- -
- - - @error('password') - - @enderror -
- -
- -
- -
- -
-
+ @if (session('success')) +
+ + + + {{ session('success') }}
+ @endif + + @if ($errors->any()) +
+ + + + {{ $errors->first() }} +
+ @endif + +
+ @csrf + +
+ + + @error('email') +

{{ $message }}

+ @enderror +
+ +
+ + + @error('password') +

{{ $message }}

+ @enderror +
+ +
+ +
+ + +
diff --git a/tailwind.config.js b/tailwind.config.js index bbb1a65c..bf15f9cb 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -6,20 +6,15 @@ export default { "./resources/**/*.vue", ], theme: { - extend: {}, + extend: { + colors: { + primary: '#570df8', + secondary: '#f000b8', + }, + }, }, plugins: [ require('@tailwindcss/forms'), - require('daisyui'), + // DaisyUI 완전 제거 - oklch() 사용 문제 ], - daisyui: { - themes: ["light", "dark", "cupcake"], - darkTheme: "dark", - base: true, - styled: true, - utils: true, - prefix: "", - logs: true, - themeRoot: ":root", - }, } \ No newline at end of file