gc-guide/src/content/StartingProject.tsx

228 lines
11 KiB
TypeScript
Raw Normal View 히스토리

import { Alert } from '../components/common/Alert';
import { CodeBlock } from '../components/common/CodeBlock';
import { StepGuide } from '../components/common/StepGuide';
export default function StartingProject() {
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>
{/* 템플릿 비교 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4"> 릿</h2>
<p className="text-text-secondary mb-4">
Gitea <code className="bg-bg-tertiary px-1 rounded">gc</code> 릿 .
</p>
<div className="overflow-x-auto">
<table className="w-full bg-surface border border-border-default rounded-lg overflow-hidden text-sm">
<thead>
<tr className="bg-bg-tertiary">
<th className="text-left px-4 py-3 font-semibold text-text-primary">릿</th>
<th className="text-left px-4 py-3 font-semibold text-text-primary"> </th>
<th className="text-left px-4 py-3 font-semibold text-text-primary"> </th>
</tr>
</thead>
<tbody className="divide-y divide-border-subtle">
<tr>
<td className="px-4 py-3 font-medium text-text-primary">template-java-maven</td>
<td className="px-4 py-3 text-text-secondary">Java + Spring Boot + Maven</td>
<td className="px-4 py-3 text-text-secondary">
<code className="bg-bg-tertiary px-1 rounded">.sdkmanrc</code>,{' '}
<code className="bg-bg-tertiary px-1 rounded">.mvn/settings.xml</code>,{' '}
Claude /, Git hooks
</td>
</tr>
<tr>
<td className="px-4 py-3 font-medium text-text-primary">template-java-gradle</td>
<td className="px-4 py-3 text-text-secondary">Java + Spring Boot + Gradle</td>
<td className="px-4 py-3 text-text-secondary">
<code className="bg-bg-tertiary px-1 rounded">.sdkmanrc</code>,{' '}
<code className="bg-bg-tertiary px-1 rounded">gradle.properties.example</code>,{' '}
Claude /, Git hooks
</td>
</tr>
<tr>
<td className="px-4 py-3 font-medium text-text-primary">template-react-ts</td>
<td className="px-4 py-3 text-text-secondary">React + TypeScript + Vite</td>
<td className="px-4 py-3 text-text-secondary">
<code className="bg-bg-tertiary px-1 rounded">.node-version</code>,{' '}
<code className="bg-bg-tertiary px-1 rounded">.npmrc</code>,{' '}
<code className="bg-bg-tertiary px-1 rounded">.prettierrc</code>,{' '}
Claude /, Git hooks
</td>
</tr>
<tr>
<td className="px-4 py-3 font-medium text-text-primary">template-common</td>
<td className="px-4 py-3 text-text-secondary"> </td>
<td className="px-4 py-3 text-text-secondary">
, Claude , Git hooks, ( 릿 )
</td>
</tr>
</tbody>
</table>
</div>
<Alert type="info">
릿 <code className="bg-bg-tertiary px-1 rounded">.claude/</code> (, , ),{' '}
<code className="bg-bg-tertiary px-1 rounded">.githooks/</code>(commit-msg, post-checkout),{' '}
<code className="bg-bg-tertiary px-1 rounded">.editorconfig</code>,{' '}
<code className="bg-bg-tertiary px-1 rounded">CLAUDE.md</code> .
</Alert>
{/* 새 프로젝트 생성 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4"> </h2>
<StepGuide
steps={[
{
title: 'Gitea에서 리포지토리 생성',
content: (
<p>
Gitea <strong>gc</strong> <strong> </strong> .
<strong> "템플릿에서 생성"</strong> 릿(<code className="bg-bg-tertiary px-1 rounded">template-java-maven</code>,{' '}
<code className="bg-bg-tertiary px-1 rounded">template-java-gradle</code>,{' '}
<code className="bg-bg-tertiary px-1 rounded">template-react-ts</code>) .
</p>
),
},
{
title: '로컬에 클론',
content: (
<CodeBlock
language="bash"
code={`git clone git@gitea.gc-si.dev:gc/새-프로젝트명.git
cd -`}
/>
),
},
{
title: 'Claude Code로 초기화',
content: (
<>
<p className="mb-2">Claude Code .</p>
<CodeBlock
language="bash"
code={`claude
# :
/init-project`}
/>
<p className="mt-2 text-text-muted text-xs">
, Git hooks, Claude .
</p>
</>
),
},
{
title: 'develop 브랜치 생성',
content: (
<CodeBlock
language="bash"
code={`git checkout -b develop
git push -u origin develop`}
/>
),
},
{
title: '첫 feature 브랜치 시작',
content: (
<CodeBlock
language="bash"
code={`git checkout -b feature/ISSUE-1-project-setup
# !`}
/>
),
},
]}
/>
{/* 템플릿 공통 파일 구조 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4">릿 </h2>
<p className="text-text-secondary mb-4">
릿 .
</p>
<div className="bg-surface border border-border-default rounded-xl p-5">
<div className="font-mono text-sm space-y-1.5 text-text-secondary">
<div><span className="text-accent">.claude/</span></div>
<div className="pl-4"><span className="text-accent">rules/</span> (code-style, git-workflow, naming, testing, team-policy)</div>
<div className="pl-4"><span className="text-accent">skills/</span> Claude (create-mr, fix-issue, init-project, sync-team-workflow)</div>
<div className="pl-4"><span className="text-accent">settings.json</span> Claude </div>
<div className="mt-2"><span className="text-accent">.githooks/</span></div>
<div className="pl-4"><span className="text-accent">commit-msg</span> Conventional Commits </div>
<div className="pl-4"><span className="text-accent">post-checkout</span> </div>
<div className="mt-2"><span className="text-accent">.editorconfig</span> </div>
<div><span className="text-accent">.gitignore</span> Git </div>
<div><span className="text-accent">CLAUDE.md</span> </div>
<div><span className="text-accent">workflow-version.json</span> </div>
</div>
</div>
{/* 템플릿별 추가 파일 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4">릿 </h2>
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
<div className="bg-surface border border-border-default rounded-xl p-4">
<h4 className="font-semibold text-text-primary text-sm mb-2">template-java-maven</h4>
<div className="font-mono text-xs space-y-1 text-text-secondary">
<div><code className="bg-bg-tertiary px-1 rounded">.sdkmanrc</code> JDK </div>
<div><code className="bg-bg-tertiary px-1 rounded">.mvn/settings.xml</code> Maven </div>
</div>
</div>
<div className="bg-surface border border-border-default rounded-xl p-4">
<h4 className="font-semibold text-text-primary text-sm mb-2">template-java-gradle</h4>
<div className="font-mono text-xs space-y-1 text-text-secondary">
<div><code className="bg-bg-tertiary px-1 rounded">.sdkmanrc</code> JDK </div>
<div><code className="bg-bg-tertiary px-1 rounded">gradle.properties.example</code> Gradle </div>
</div>
</div>
<div className="bg-surface border border-border-default rounded-xl p-4">
<h4 className="font-semibold text-text-primary text-sm mb-2">template-react-ts</h4>
<div className="font-mono text-xs space-y-1 text-text-secondary">
<div><code className="bg-bg-tertiary px-1 rounded">.node-version</code> Node.js </div>
<div><code className="bg-bg-tertiary px-1 rounded">.npmrc</code> npm </div>
<div><code className="bg-bg-tertiary px-1 rounded">.prettierrc</code> </div>
</div>
</div>
</div>
<Alert type="info" title="워크플로우 업데이트">
.
<code className="bg-bg-tertiary px-1 rounded ml-1">/sync-team-workflow</code> .
</Alert>
{/* 프로젝트 구조 권장안 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4"> </h2>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<h4 className="font-semibold text-text-primary mb-2">Spring Boot (Maven/Gradle)</h4>
<CodeBlock
language="text"
code={`src/main/java/com/gcsc/프로젝트/
controller/
service/
repository/
dto/
entity/
config/
common/`}
/>
</div>
<div>
<h4 className="font-semibold text-text-primary mb-2">React + TypeScript</h4>
<CodeBlock
language="text"
code={`src/
components/
common/
layout/
pages/
hooks/
services/
types/
utils/`}
/>
</div>
</div>
</div>
);
}