# chopols/emoticon architecture

> Architecture diagram of the GitHub repository chopols/emoticon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chopols/emoticon
- Repository: https://github.com/chopols/emoticon

## Overview

이 저장소는 브라우저에서 이모티콘 스프라이트 시트를 분할해 ZIP으로 내보내는 한국어 Next.js 도구입니다. 사용자는 PNG/JPG를 선택하고, 그리드와 셀 순서를 설정한 뒤 분할 결과를 미리 보고 ZIP을 다운로드합니다. 이미지 로딩, 캔버스 분할 및 ZIP 생성은 클라이언트에서 수행됩니다. README는 기본 Next.js 안내만 제공하므로 제품 기능은 발췌한 컴포넌트와 구현으로 확인했습니다.

Main entry points: [`components/ImageSplitter.tsx`](https://github.com/chopols/emoticon/blob/main/components/ImageSplitter.tsx) (분할 작업 조정), [`app/page.tsx`](https://github.com/chopols/emoticon/blob/main/app/page.tsx) (홈 화면), [`components/UploadZone.tsx`](https://github.com/chopols/emoticon/blob/main/components/UploadZone.tsx) (이미지 업로드), [`components/GridSelector.tsx`](https://github.com/chopols/emoticon/blob/main/components/GridSelector.tsx) (그리드 설정)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["사용자 인터페이스"]
  node_home["홈 화면<br/>[page.tsx]"]
  node_splitter["분할 작업 조정<br/>[ImageSplitter.tsx]"]
  node_upload["이미지 업로드<br/>[UploadZone.tsx]"]
  node_selector["그리드 설정<br/>[GridSelector.tsx]"]
  node_preview["결과 미리보기<br/>[PreviewGrid.tsx]"]
end

subgraph group_image["이미지 처리"]
  node_image_loader["이미지 로딩<br/>[splitImage.ts]"]
  node_image_split["셀 분할·PNG 변환<br/>[splitImage.ts]"]
end

subgraph group_export["내보내기"]
  node_zip["ZIP 다운로드<br/>[splitImage.ts]"]
end

node_user(("사용자"))
node_download["다운로드 파일"]

node_user -->|"열기"| node_home
node_home -->|"렌더링"| node_splitter
node_splitter -->|"렌더링"| node_upload
node_splitter -->|"렌더링"| node_selector
node_splitter -->|"렌더링"| node_preview
node_upload -->|"파일 전달"| node_splitter
node_splitter -->|"이미지 로드"| node_image_loader
node_selector -->|"설정 전달"| node_splitter
node_splitter -->|"분할 호출"| node_image_split
node_image_split -->|"결과 반환"| node_splitter
node_splitter -->|"결과 전달"| node_preview
node_splitter -->|"ZIP 생성 호출"| node_zip
node_zip -->|"파일 저장"| node_download

click node_home "https://github.com/chopols/emoticon/blob/main/app/page.tsx"
click node_splitter "https://github.com/chopols/emoticon/blob/main/components/ImageSplitter.tsx"
click node_upload "https://github.com/chopols/emoticon/blob/main/components/UploadZone.tsx"
click node_selector "https://github.com/chopols/emoticon/blob/main/components/GridSelector.tsx"
click node_preview "https://github.com/chopols/emoticon/blob/main/components/PreviewGrid.tsx"
click node_image_loader "https://github.com/chopols/emoticon/blob/main/lib/splitImage.ts"
click node_image_split "https://github.com/chopols/emoticon/blob/main/lib/splitImage.ts"
click node_zip "https://github.com/chopols/emoticon/blob/main/lib/splitImage.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home,node_splitter,node_upload,node_selector,node_preview toneBlue
class node_image_loader,node_image_split toneAmber
class node_zip toneMint
class node_user,node_download toneIndigo
```

## Components

### 사용자 인터페이스

- [홈 화면](https://github.com/chopols/emoticon/blob/main/app/page.tsx): `app/page.tsx`
- [분할 작업 조정](https://github.com/chopols/emoticon/blob/main/components/ImageSplitter.tsx): `components/ImageSplitter.tsx`
- [이미지 업로드](https://github.com/chopols/emoticon/blob/main/components/UploadZone.tsx): `components/UploadZone.tsx`
- [그리드 설정](https://github.com/chopols/emoticon/blob/main/components/GridSelector.tsx): `components/GridSelector.tsx`
- [결과 미리보기](https://github.com/chopols/emoticon/blob/main/components/PreviewGrid.tsx): `components/PreviewGrid.tsx`

### 이미지 처리

- [이미지 로딩](https://github.com/chopols/emoticon/blob/main/lib/splitImage.ts): `lib/splitImage.ts`
- [셀 분할·PNG 변환](https://github.com/chopols/emoticon/blob/main/lib/splitImage.ts): `lib/splitImage.ts`

### 내보내기

- [ZIP 다운로드](https://github.com/chopols/emoticon/blob/main/lib/splitImage.ts): `lib/splitImage.ts`

### Other components

- **사용자**
- **다운로드 파일**

## Connections

- 사용자 → 홈 화면: 열기 (evidence: `app/page.tsx`)
- 홈 화면 → 분할 작업 조정: 렌더링 (evidence: `app/page.tsx`)
- 분할 작업 조정 → 이미지 업로드: 렌더링 (evidence: `components/ImageSplitter.tsx`)
- 분할 작업 조정 → 그리드 설정: 렌더링 (evidence: `components/ImageSplitter.tsx`)
- 분할 작업 조정 → 결과 미리보기: 렌더링 (evidence: `components/ImageSplitter.tsx`)
- 이미지 업로드 → 분할 작업 조정: 파일 전달 (evidence: `components/ImageSplitter.tsx`)
- 분할 작업 조정 → 이미지 로딩: 이미지 로드 (evidence: `components/ImageSplitter.tsx`)
- 그리드 설정 → 분할 작업 조정: 설정 전달 (evidence: `components/ImageSplitter.tsx`)
- 분할 작업 조정 → 셀 분할·PNG 변환: 분할 호출 (evidence: `components/ImageSplitter.tsx`)
- 셀 분할·PNG 변환 → 분할 작업 조정: 결과 반환 (evidence: `components/ImageSplitter.tsx`)
- 분할 작업 조정 → 결과 미리보기: 결과 전달 (evidence: `components/ImageSplitter.tsx`)
- 분할 작업 조정 → ZIP 다운로드: ZIP 생성 호출 (evidence: `components/ImageSplitter.tsx`)
- ZIP 다운로드 → 다운로드 파일: 파일 저장 (evidence: `lib/splitImage.ts`)
