gc-guide/src/content/InitialSetup.tsx
htlee 456cfdddd9 feat: 전체 UI 구현 및 백엔드 인증 API 연동
- 테마 시스템: CSS 변수 + data-theme + Tailwind v4 시맨틱 색상 (다크모드 지원)
- 공통 컴포넌트: CodeBlock, Alert, StepGuide, CopyButton, TableOfContents
- 가이드 콘텐츠 8개 섹션 (React.lazy 동적 로딩, 실제 인프라 검증 완료)
- 관리자 페이지 4개 (사용자/롤/권한/통계)
- 레이아웃: 반응형 사이드바 + 테마 토글 + ScrollSpy 목차
- 인증: Google OAuth 로그인/세션복원/로그아웃 백엔드 API 연동
- 개발모드 mock 인증 (import.meta.env.DEV 전용)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 17:38:28 +09:00

167 lines
5.4 KiB
TypeScript

import { Alert } from '../components/common/Alert';
import { CodeBlock } from '../components/common/CodeBlock';
import { StepGuide } from '../components/common/StepGuide';
export default function InitialSetup() {
return (
<div className="max-w-4xl mx-auto py-12 px-6">
<h1 className="text-3xl font-bold text-text-primary mb-2"> </h1>
<p className="text-text-secondary mb-8">
.
</p>
{/* SSH 키 생성 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4">1. SSH </h2>
<p className="text-text-secondary mb-4">
Gitea에 SSH로 SSH .
</p>
<StepGuide
steps={[
{
title: 'SSH 키 생성',
content: (
<>
<p className="mb-2"> .</p>
<CodeBlock
language="bash"
code={`ssh-keygen -t ed25519 -C "your-email@gcsc.co.kr"
# Enter 키를 눌러 기본 경로에 저장
# 패스프레이즈는 선택사항`}
/>
</>
),
},
{
title: '공개 키 복사',
content: (
<>
<CodeBlock language="bash" code="cat ~/.ssh/id_ed25519.pub" />
<p className="mt-2"> .</p>
</>
),
},
{
title: 'Gitea에 등록',
content: (
<p>
Gitea <strong></strong> <strong>SSH / GPG </strong> <strong>SSH </strong> .
</p>
),
},
]}
/>
{/* Git 설정 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4">2. Git </h2>
<CodeBlock
language="bash"
filename="~/.gitconfig"
code={`git config --global user.name "홍길동"
git config --global user.email "hong@gcsc.co.kr"
git config --global init.defaultBranch main
git config --global core.autocrlf input`}
/>
<Alert type="info">
<strong>@gcsc.co.kr</strong> . Gitea .
</Alert>
{/* SDKMAN */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4">3. SDKMAN! (JDK )</h2>
<p className="text-text-secondary mb-4">
Java SDKMAN! JDK를 .
</p>
<StepGuide
steps={[
{
title: 'SDKMAN! 설치',
content: (
<CodeBlock
language="bash"
code={`curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk version`}
/>
),
},
{
title: 'JDK 설치',
content: (
<>
<CodeBlock
language="bash"
code={`# Amazon Corretto 21 (기본)
sdk install java 21.0.9-amzn
# 프로젝트별 JDK 17이 필요한 경우
sdk install java 17.0.18-amzn
sdk use java 17.0.18-amzn`}
/>
<Alert type="info">
<code className="bg-bg-tertiary px-1 rounded">.sdkmanrc</code> .
</Alert>
</>
),
},
{
title: 'Maven 설치',
content: (
<CodeBlock language="bash" code="sdk install maven 3.9.12" />
),
},
]}
/>
{/* fnm */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4">4. fnm (Node.js )</h2>
<p className="text-text-secondary mb-4">
fnm으로 Node.js를 .
</p>
<StepGuide
steps={[
{
title: 'fnm 설치',
content: (
<CodeBlock
language="bash"
code={`curl -fsSL https://fnm.vercel.app/install | bash
# 셸 재시작 후
fnm --version`}
/>
),
},
{
title: 'Node.js 설치',
content: (
<>
<CodeBlock
language="bash"
code={`fnm install 24
fnm default 24
node --version`}
/>
<Alert type="info">
<code className="bg-bg-tertiary px-1 rounded">.node-version</code> <code className="bg-bg-tertiary px-1 rounded">fnm use</code> .
</Alert>
</>
),
},
]}
/>
{/* Claude Code */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4">5. Claude Code </h2>
<p className="text-text-secondary mb-4">
AI .
</p>
<CodeBlock
language="bash"
code={`npm install -g @anthropic-ai/claude-code
claude --version`}
/>
<Alert type="warning" title="API 키 필요">
Claude Code API .
</Alert>
</div>
);
}