Skip to content

jinyphp/admin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Jiny Admin Package

JinyPHP Admin κ΄€λ¦¬μž νŒ¨ν‚€μ§€μž…λ‹ˆλ‹€. Laravel 기반의 κ°•λ ₯ν•œ κ΄€λ¦¬μž λ°±μ—”λ“œ μ‹œμŠ€ν…œμ„ μ œκ³΅ν•˜λŠ” νŒ¨ν‚€μ§€λ‘œ, λ³΄μ•ˆ, 인증, κΆŒν•œ 관리 λ“± μ—”ν„°ν”„λΌμ΄μ¦ˆκΈ‰ 관리 κΈ°λŠ₯을 ν¬ν•¨ν•©λ‹ˆλ‹€.

πŸ“‹ μ£Όμš” κΈ°λŠ₯

πŸ” λ³΄μ•ˆ κΈ°λŠ₯

  • 2FA (Two-Factor Authentication) - Google Authenticator 지원
  • IP ν™”μ΄νŠΈλ¦¬μŠ€νŠΈ - νŠΉμ • IP만 κ΄€λ¦¬μž μ ‘κ·Ό ν—ˆμš©
  • CAPTCHA 톡합 - reCAPTCHA, hCAPTCHA 지원
  • μ„Έμ…˜ 관리 - λ™μ‹œ 둜그인 μ œν•œ, μ„Έμ…˜ 좔적
  • λΉ„λ°€λ²ˆν˜Έ μ •μ±… - 주기적 λ³€κ²½, λ³΅μž‘λ„ 검증
  • 둜그인 μ‹œλ„ μ œν•œ - 무차별 곡격 λ°©μ§€

πŸ‘₯ μ‚¬μš©μž 관리

  • 계측적 κΆŒν•œ 관리 - κ΄€λ¦¬μž νƒ€μž…λ³„ κΆŒν•œ μ„€μ •
  • μ‚¬μš©μž ν™œλ™ 둜그 - λͺ¨λ“  κ΄€λ¦¬μž ν™œλ™ 좔적
  • ν”„λ‘œν•„ 관리 - 아바타, κ°œμΈμ •λ³΄ μ„€μ •
  • λŒ€λŸ‰ μ‚¬μš©μž 관리 - CLI λͺ…λ Ήμ–΄ 지원

πŸ“§ μ•Œλ¦Ό μ‹œμŠ€ν…œ

  • 이메일 ν…œν”Œλ¦Ώ - μ»€μŠ€ν„°λ§ˆμ΄μ§• κ°€λŠ₯ν•œ ν…œν”Œλ¦Ώ
  • SMS 톡합 - 닀쀑 SMS 제곡자 지원
  • Webhook - Slack, Discord λ“± μ™ΈλΆ€ μ„œλΉ„μŠ€ 연동
  • μ‹€μ‹œκ°„ μ•Œλ¦Ό - λΈŒλΌμš°μ € μ•Œλ¦Ό 지원

πŸ›  개발 도ꡬ

  • Artisan λͺ…λ Ήμ–΄ - κ΄€λ¦¬μž CRUD μžλ™ 생성
  • Livewire μ»΄ν¬λ„ŒνŠΈ - λ°˜μ‘ν˜• UI μ»΄ν¬λ„ŒνŠΈ
  • RESTful API - API μ—”λ“œν¬μΈνŠΈ 제곡
  • λ‹€κ΅­μ–΄ 지원 - i18n 지원

πŸ“ 디렉토리 ꡬ쑰

vendor/jiny/admin/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Console/          # Artisan λͺ…λ Ήμ–΄
β”‚   β”œβ”€β”€ Http/
β”‚   β”‚   β”œβ”€β”€ Controllers/  # 컨트둀러
β”‚   β”‚   β”œβ”€β”€ Middleware/   # 미듀웨어
β”‚   β”‚   β”œβ”€β”€ Livewire/     # Livewire μ»΄ν¬λ„ŒνŠΈ
β”‚   β”‚   └── Trait/        # HTTP 트레이트
β”‚   β”œβ”€β”€ Models/           # Eloquent λͺ¨λΈ
β”‚   β”œβ”€β”€ Services/         # λΉ„μ¦ˆλ‹ˆμŠ€ 둜직
β”‚   β”‚   β”œβ”€β”€ Captcha/      # CAPTCHA μ„œλΉ„μŠ€
β”‚   β”‚   β”œβ”€β”€ Email/        # 이메일 μ„œλΉ„μŠ€
β”‚   β”‚   β”œβ”€β”€ Notification/ # μ•Œλ¦Ό μ„œλΉ„μŠ€
β”‚   β”‚   β”œβ”€β”€ Security/     # λ³΄μ•ˆ μ„œλΉ„μŠ€
β”‚   β”‚   └── SMS/          # SMS μ„œλΉ„μŠ€
β”‚   β”œβ”€β”€ Traits/           # μž¬μ‚¬μš© κ°€λŠ₯ν•œ 트레이트
β”‚   └── JinyAdminServiceProvider.php
β”œβ”€β”€ config/               # μ„€μ • 파일
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/       # λ§ˆμ΄κ·Έλ ˆμ΄μ…˜
β”‚   β”œβ”€β”€ seeders/          # μ‹œλ”
β”‚   └── factories/        # νŒ©ν† λ¦¬
β”œβ”€β”€ resources/
β”‚   └── views/           # Blade ν…œν”Œλ¦Ώ
β”œβ”€β”€ routes/              # 라우트 μ •μ˜
β”œβ”€β”€ stubs/               # μ½”λ“œ 생성 ν…œν”Œλ¦Ώ
└── tests/               # ν…ŒμŠ€νŠΈ 파일

πŸš€ μ„€μΉ˜

μš”κ΅¬μ‚¬ν•­

  • PHP 8.2+
  • Laravel 12.x
  • MySQL/PostgreSQL/SQLite
  • Composer 2.x

μ„€μΉ˜ 방법

  1. Composerλ₯Ό ν†΅ν•œ νŒ¨ν‚€μ§€ μ„€μΉ˜:
composer require jiny/admin
  1. λ°μ΄ν„°λ² μ΄μŠ€ λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ μ‹€ν–‰:
php artisan migrate
  1. μ„€μ • 파일 λ°œν–‰ (선택사항):
php artisan vendor:publish --provider="Jiny\Admin\JinyAdminServiceProvider"
  1. 초기 κ΄€λ¦¬μž 생성:
php artisan admin:user-create

βš™οΈ μ„€μ •

ν™˜κ²½ λ³€μˆ˜ (.env)

# 2FA μ„€μ •
ADMIN_2FA_ENABLED=true
ADMIN_2FA_ISSUER="Your App Name"

# CAPTCHA μ„€μ •
ADMIN_CAPTCHA_DRIVER=recaptcha
RECAPTCHA_SITE_KEY=your-site-key
RECAPTCHA_SECRET_KEY=your-secret-key

# IP ν™”μ΄νŠΈλ¦¬μŠ€νŠΈ
ADMIN_IP_WHITELIST_ENABLED=true

# μ„Έμ…˜ μ„€μ •
ADMIN_SESSION_LIFETIME=120
ADMIN_CONCURRENT_SESSIONS=1

# λΉ„λ°€λ²ˆν˜Έ μ •μ±…
ADMIN_PASSWORD_EXPIRY_DAYS=90
ADMIN_PASSWORD_MIN_LENGTH=8

πŸ“š μ‚¬μš©λ²•

기본 라우트

  • /admin - κ΄€λ¦¬μž λŒ€μ‹œλ³΄λ“œ
  • /admin/login - κ΄€λ¦¬μž 둜그인
  • /admin/users - μ‚¬μš©μž 관리
  • /admin/settings - μ‹œμŠ€ν…œ μ„€μ •

Artisan λͺ…λ Ήμ–΄

# κ΄€λ¦¬μž CRUD 생성
php artisan admin:make ResourceName

# μ‚¬μš©μž 관리
php artisan admin:user-create
php artisan admin:user-delete
php artisan admin:users --list

# λ³΄μ•ˆ 관리
php artisan admin:ip-unblock
php artisan admin:unblock-password
php artisan admin:captcha-logs

# μœ μ§€λ³΄μˆ˜
php artisan admin:ip-cleanup
php artisan admin:sync-usertype-count

미듀웨어 μ‚¬μš©

// routes/web.php
Route::middleware(['admin', 'ip.whitelist', 'captcha'])->group(function () {
    Route::get('/admin/dashboard', [DashboardController::class, 'index']);
});

Livewire μ»΄ν¬λ„ŒνŠΈ

{{-- κ΄€λ¦¬μž ν…Œμ΄λΈ” --}}
@livewire('jiny-admin::admin-table', ['model' => 'User'])

{{-- κ΄€λ¦¬μž 폼 --}}
@livewire('jiny-admin::admin-create', ['model' => 'User'])
@livewire('jiny-admin::admin-edit', ['model' => 'User', 'id' => $id])

πŸ”’ λ³΄μ•ˆ κΈ°λŠ₯ 상세

2FA κ΅¬ν˜„

use Jiny\Admin\Services\Security\TwoFactorService;

$twoFactor = new TwoFactorService();
$qrCode = $twoFactor->generateQRCode($user);
$verified = $twoFactor->verify($user, $code);

CAPTCHA 톡합

use Jiny\Admin\Services\Captcha\CaptchaManager;

$captcha = app(CaptchaManager::class);
$verified = $captcha->verify($request->get('g-recaptcha-response'));

IP ν™”μ΄νŠΈλ¦¬μŠ€νŠΈ

use Jiny\Admin\Models\AdminIpWhitelist;

AdminIpWhitelist::create([
    'ip_address' => '192.168.1.1',
    'description' => 'Office IP',
    'is_active' => true
]);

πŸ§ͺ ν…ŒμŠ€νŠΈ

# 전체 ν…ŒμŠ€νŠΈ μ‹€ν–‰
php artisan test

# νŠΉμ • ν…ŒμŠ€νŠΈ μ‹€ν–‰
php artisan test --filter=AdminTest

πŸ“„ λΌμ΄μ„ΌμŠ€

이 νŒ¨ν‚€μ§€λŠ” MIT λΌμ΄μ„ΌμŠ€ ν•˜μ— λ°°ν¬λ©λ‹ˆλ‹€.

🀝 κΈ°μ—¬ν•˜κΈ°

버그 리포트, κΈ°λŠ₯ μ œμ•ˆ, ν’€ λ¦¬ν€˜μŠ€νŠΈλŠ” μ–Έμ œλ‚˜ ν™˜μ˜ν•©λ‹ˆλ‹€!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ž 지원

🎯 λ‘œλ“œλ§΅

  • GraphQL API 지원
  • 닀크 λͺ¨λ“œ 지원
  • μ‹€μ‹œκ°„ λŒ€μ‹œλ³΄λ“œ
  • AI 기반 λ³΄μ•ˆ 감지
  • λ©€ν‹° ν…Œλ„Œμ‹œ 지원

Jiny Admin - Enterprise-grade Admin Panel for Laravel Made with ❀️ by JinyPHP Team

About

last

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors