Skip to content

refactor: [공방] - 파일 구조 리팩토링 🟡#11

Merged
giljihun merged 17 commits intodevelopfrom
refactor/-공방---파일-구조-리팩토링
Jan 21, 2026

Hidden character warning

The head ref may contain hidden characters: "refactor/-\uacf5\ubc29---\ud30c\uc77c-\uad6c\uc870-\ub9ac\ud329\ud1a0\ub9c1"
Merged

refactor: [공방] - 파일 구조 리팩토링 🟡#11
giljihun merged 17 commits intodevelopfrom
refactor/-공방---파일-구조-리팩토링

Conversation

@giljihun
Copy link
Member

🎯 PR 내용

Workshop 폴더에서 Making(키링 제작) 기능을 분리하여 KeyringMaker 모듈로 독립시킴

- Workshop 84개 파일 중 Making이 69개(82%) 차지했음
- 마켓플레이스와 키링 제작은 엄밀히 따지면 서로 다른 도메인임!

폴더 구조 변경

Before

  Presentation/
  └── Workshop/
      ├── WorkshopViewModel.swift
      ├── WorkshopMain/
      │   ├── WorkshopView.swift
      │   └── Sections...
      ├── Coin/
      ├── Making/                          ← 69개 파일 (82%)
      │   ├── Shared/
      │   │   ├── Components/
      │   │   ├── Models/
      │   │   └── Views/
      │   └── Templates/
      │       ├── AcrylicPhoto/
      │       ├── NeonSign/
      │       ├── Polaroid/
      │       ├── ClearSketch/
      │       ├── Pixel/
      │       └── SpeechBubble/
      └── Components/

After

Presentation/
  ├── Workshop/                            ← 마켓플레이스 (15개 파일)
  │   ├── ViewModels/
  │   │   └── WorkshopViewModel.swift
  │   ├── Views/
  │   │   ├── Main/
  │   │   │   ├── WorkshopView.swift
  │   │   │   ├── WorkshopTemplatesView.swift
  │   │   │   ├── WorkshopGridHelpers.swift
  │   │   │   └── Sections...
  │   │   ├── WorkshopPreview.swift
  │   │   └── MyItemsView.swift
  │   ├── Components/
  │   └── Coin/
  │
  └── KeyringMaker/                        ← 키링 제작 (69개 파일)
      ├── Core/
      │   └── Protocols/
      ├── Shared/
      │   ├── Components/
      │   ├── Models/
      │   └── Views/
      └── Templates/
          ├── AcrylicPhoto/{ViewModels,Views}
          ├── NeonSign/{ViewModels,Views}
          ├── Polaroid/{ViewModels,Views}
          ├── ClearSketch/{ViewModels,Views}
          ├── Pixel/{ViewModels,Views}
          └── SpeechBubble/{ViewModels,Views}

리팩 중 만났던, 네비게이션 문제

초기엔, Route Enum도 분리하려고 했습니다.

  • WorkShopRouteKeyringMakerRoute로.
    하지만 SwiftUI NavigationStack 상태 충돌 이슈가 발생했어요.
    왜냐면, WorkshopView에서 하나의 뷰에서 2개의 루트를 쓰게 되거든요.
    (코인충전같은건 WorkshopRoute / 템플릿 선택부터는 KeyringMakerRoute 이런느낌이죠.)

대표적으로 탭바가 사라지고 다시 생기지 않는 오류.

최종적으로는, Route는 기존 단일 WorkshopRoute를 그대로 씁니다.

변경 요약

작업 내용
파일 이동 Making/ → KeyringMaker/ (69개 파일)
폴더 정리 Workshop 내 ViewModels/, Views/Main/ 구조화

진짜 레전설로 오래걸렸다. ㄱ...-

📱 스크린샷 (UI 변경 시)

스크린샷 2026-01-20 23 16 13

🔗 관련 이슈

✅ 체크리스트

  • 빌드 성공
  • 테스트 완료
  • Self-review 완료

@giljihun giljihun self-assigned this Jan 20, 2026
@giljihun giljihun linked an issue Jan 20, 2026 that may be closed by this pull request
@freshfresh22
Copy link
Member

/_/\
(= •_•) 📂 📁 📁
/ づ📁 정리...정리...

@jini-coding
Copy link
Member

Workshop 84개 파일 중 Making이 69개(82%) 차지했음

시작부터 압도적인 File Changed 개수와 엄청난 파일 개수에 백스탭할뻔...

Copy link
Member

@jini-coding jini-coding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우려와는 달리 정말 파일 구조만 만져서 file changed 개수 많은건 의미가 없었네요ㅋㅋㅋ
이전엔 정말 잡탕이었던게 이제는 어느정도 잘 정리가 됐네요!
파일 구조화한 걸 보니 정말 고뇌의 시간이 느껴집니다... 같이 의논했으면 재밌었을텐데(?) 아쉽네요
오늘 정말 고생하셨습니다!!


// MARK: - 네온 사인 템플릿
case NeonSignPreView
case neonSignPreview
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이놈 슬슬 없애도 될듯...ㅋㅋㅋ


/// WorkshopTab에서 생성된 viewModel을 받아서 사용
init(router: NavigationRouter<WorkshopRoute>, viewModel: WorkshopViewModel) {
init(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정말 사소하지만 가독성 굿!

- Workshop에서 Making관련 라우트 추출
- 템플릿별 라우트 정의
- from 메서드 정의 (문자열 받아서 해당 라우트로 바꿔주는 변환기)
KeryingMakerROute를 정의했고, 이를 사용하기 위해 여러 뷰에서
주입받는 라우터 수정
- Preview 6개
- 중간단계 뷰들
- 페스티벌도 일단 변경
- 일단 .gitkeep으로 폴더 유지
- 카메라피커 ~ 레코딩매니저 등
- Making 공유 모델과 뷰들을 KeyringMaker 모듈로 이동
- WorkshopRoute가 마켓플레이스 기능만 담당하도록 정리함
- preview, coinCharge, myItems 등
```
 Workshop/
  ├── ViewModels/
  │   └── WorkshopViewModel.swift
  ├── Views/
  │   ├── Main/ (7개 파일)
  │   │   ├── WorkshopView.swift
  │   │   ├── WorkshopGridHelpers.swift
  │   │   ├── WorkshopTemplatesView.swift
  │   │   └── ...Section.swift (4개)
  │   ├── MyItemsView.swift
  │   └── WorkshopPreview.swift
  ├── Components/
  │   └── WorkshopComponents.swift
  └── Coin/ (3개 파일 - 기존 유지)
```
- 탭바가 프리뷰에서 복귀할때 NavigationRequestObserver 다중 업데이트 충돌 발생
@giljihun giljihun force-pushed the refactor/-공방---파일-구조-리팩토링 branch from 89dd08e to 11c64c8 Compare January 21, 2026 01:17
@giljihun giljihun merged commit 09a6d24 into develop Jan 21, 2026
@giljihun giljihun deleted the refactor/-공방---파일-구조-리팩토링 branch January 21, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: [공방] - 파일 구조 리팩토링 🟡

3 participants