Back to Skills

admin-guide

verified

SaaS 어드민 대시보드 개발 가이드 - 관리자 기능 및 필수 로직

View on GitHub

Marketplace

kreatsaas-marketplace

johunsang/kreatsaas

Plugin

kreatsaas

Development

Repository

johunsang/kreatsaas
1stars

skills/admin-guide/SKILL.md

Last Verified

January 16, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/johunsang/kreatsaas/blob/main/skills/admin-guide/SKILL.md -a claude-code --skill admin-guide

Installation paths:

Claude
.claude/skills/admin-guide/
Powered by add-skill CLI

Instructions

# SaaS 어드민 대시보드 개발 가이드

> SaaS의 핵심 관리 기능 및 필수 비즈니스 로직 구현 가이드

---

## 1. 어드민 대시보드 구조

### 디렉토리 구조

```
src/
├── app/
│   ├── admin/
│   │   ├── layout.tsx          # 어드민 레이아웃
│   │   ├── page.tsx            # 대시보드 메인
│   │   ├── users/
│   │   │   ├── page.tsx        # 사용자 목록
│   │   │   └── [id]/page.tsx   # 사용자 상세
│   │   ├── analytics/
│   │   │   └── page.tsx        # 통계/분석
│   │   ├── subscriptions/
│   │   │   └── page.tsx        # 구독 관리
│   │   ├── content/
│   │   │   └── page.tsx        # 콘텐츠 관리
│   │   └── settings/
│   │       └── page.tsx        # 시스템 설정
│   └── api/
│       └── admin/
│           ├── users/route.ts
│           ├── analytics/route.ts
│           └── settings/route.ts
├── components/
│   └── admin/
│       ├── Sidebar.tsx
│       ├── Header.tsx
│       ├── StatsCard.tsx
│       ├── DataTable.tsx
│       └── Charts/
└── lib/
    └── admin/
        ├── auth.ts             # 어드민 인증
        ├── permissions.ts      # 권한 관리
        └── analytics.ts        # 통계 계산
```

---

## 2. 어드민 레이아웃

### 메인 레이아웃

```typescript
// src/app/admin/layout.tsx
import { redirect } from 'next/navigation';
import { getServerSession } from 'next-auth';
import { authOptions } from '@/lib/auth';
import { AdminSidebar } from '@/components/admin/Sidebar';
import { AdminHeader } from '@/components/admin/Header';

export default async function AdminLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  const session = await getServerSession(authOptions);

  // 로그인 확인
  if (!session) {
    redirect('/login?callbackUrl=/admin');
  }

  // 어드민 권한 확인
  if (session.user.role !== 'ADMIN' && session.user.role !== 'SUPER_ADMIN') {
    redirect('/dashboard?error=unauthorized');
  }

  return (
    <div className="flex h-screen bg-gray-100">
      <AdminSidebar />
      <div className="flex-1 flex flex-col overflow-hidden">
        <AdminHeader user={session.user} />
        <main className="flex-1 overflow-y-auto p-6">
          {children}
        </main>
      </div>
    <

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
7131 chars