Skip to content

⚙️Setting: PWA 설정 및 모바일(iOS/Android) 웹앱 환경 설정 추가#147

Merged
skyblue1232 merged 3 commits intodevelopfrom
refactor/#135/web-app-accessibility
Nov 16, 2025
Merged

⚙️Setting: PWA 설정 및 모바일(iOS/Android) 웹앱 환경 설정 추가#147
skyblue1232 merged 3 commits intodevelopfrom
refactor/#135/web-app-accessibility

Conversation

@skyblue1232
Copy link
Contributor

@skyblue1232 skyblue1232 commented Nov 16, 2025

🔥 작업 내용

  • PWA 기본 설정 적용
    • next-pwa 추가 및 next.config.ts에 PWA 옵션 등록
    • Service Worker 자동 생성 및 캐싱 활성화
  • Manifest 구성 (public/manifest.json)
    • 앱 이름, start_url, standalone 모드 설정
    • 아이콘 3종(64 / 192 / 512) 추가
  • iOS 대응 메타 태그 적용
    • 홈 화면 추가 시 아이콘 표시를 위한 apple-touch-icon 등록
    • 웹앱 활성화를 위한 모바일 전용 meta 설정
  • _app.tsx에 manifest 및 iOS meta 태그 주입
  • .app-wrapper 반응형 구조 개선
    • 모바일: width 100%
    • 데스크탑: max-width 390px 고정

🤔 추후 작업 사항

  • PWA 설치 팝업(Custom Install Prompt) 적용
  • 오프라인 페이지 구성

🔗 이슈

  • close #

PR Point (To Reviewer)

  • PWA 적용에 따른 빌드 영향 여부 확인 부탁드립니다.
  • iOS에서 standalone 모드 및 아이콘 표시가 정상적으로 되는지 테스트 요청드립니다.
  • 데스크탑/모바일 분기 CSS(media query)가 적절한지 확인 부탁드립니다.

📸 피그마 스크린샷 or 기능 GIF

(필요 시 첨부)

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • Progressive Web App(PWA) 기능이 추가되어 앱을 설치하고 오프라인에서 사용할 수 있게 되었습니다.
    • PWA 메타데이터 및 다양한 크기의 아이콘 지원이 추가되었습니다.
  • 스타일

    • 다양한 기기에 최적화된 반응형 레이아웃으로 개선되었습니다.

@skyblue1232 skyblue1232 self-assigned this Nov 16, 2025
@skyblue1232 skyblue1232 added the setting 패키지 설치, 개발 설정 label Nov 16, 2025
@vercel
Copy link

vercel bot commented Nov 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
af-fe Ready Ready Preview Comment Nov 16, 2025 10:57am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 16, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (3)
  • public/icons/icon1.png is excluded by !**/*.png
  • public/icons/icon2.png is excluded by !**/*.png
  • public/icons/icon3.png is excluded by !**/*.png

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

PWA(Progressive Web App) 지원이 추가되었습니다. next-pwa 패키지를 통해 Next.js 설정이 래핑되고, PWA 매니페스트 파일과 메타 태그가 추가되었습니다. 또한 레이아웃 CSS가 반응형으로 조정되었습니다.

Changes

Cohort / File(s) 변경 요약
PWA 설정 및 의존성
next.config.ts, package.json, src/shared/types/next-pwa.d.ts
next-pwa 패키지 의존성 추가, next.config.ts를 withPWABundle로 래핑하여 PWA 지원 활성화, TypeScript 타입 선언 추가
PWA 매니페스트 및 메타 태그
public/manifest.json, src/pages/_app.tsx
PWA 매니페스트 파일 생성(앱 메타데이터, 아이콘 정의), _app.tsx에 PWA 및 Apple 관련 메타 태그 추가
반응형 레이아웃 스타일
src/styles/globals.css
.app-wrapper 최대 너비 402px에서 100%로 변경, hover 지원 기기에서 390px로 제한, 배경색 업데이트

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • CSS 레이아웃 변경: 반응형 동작이 의도대로 작동하는지 확인 필요
  • PWA 매니페스트: 아이콘 경로(/icons/icon*.png)와 start_url(/main) 유효성 검증
  • Meta 태그: Apple 관련 메타 태그와 PWA 메타 태그가 올바르게 구성되었는지 확인

Possibly related PRs

Suggested labels

update, refactor

Suggested reviewers

  • KongMezu
  • jjangminii

Poem

🐰 PWA를 향한 한 발짝 더,
매니페스트와 메타 태그 함께,
반응형 레이아웃도 예쁘게 펼쳐,
오프라인도 껌, 설치도 쉬워져,
지금 Geulda는 더 강해져! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 PWA 설정 및 모바일 웹앱 환경 설정이라는 변경사항의 핵심을 명확하게 요약하고 있습니다.
Description check ✅ Passed PR 설명이 repository의 필수 템플릿 섹션을 모두 충실하게 포함하고 있으며, 작업 내용, 추후 작업사항, PR Point가 상세하게 작성되어 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the comment 필요한 주석 추가 및 변경 label Nov 16, 2025
@github-actions
Copy link

🏷️ Labeler has automatically applied labels based on your PR title, branch name, or commit message.
Please verify that they are correct before merging.

@skyblue1232 skyblue1232 linked an issue Nov 16, 2025 that may be closed by this pull request
4 tasks
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
src/shared/types/next-pwa.d.ts (1)

1-1: 타입 정의를 더 구체화하면 타입 안전성 향상 가능

현재의 ambient 모듈 선언은 TypeScript 에러를 해결하지만, withPWA 함수의 구체적인 타입 정보를 제공하지 않습니다. 필요에 따라 더 구체적인 타입 정의를 추가하여 개발 경험을 개선할 수 있습니다.

다음과 같이 개선 가능합니다:

-declare module 'next-pwa';
+declare module 'next-pwa' {
+  import { NextConfig } from 'next';
+  
+  interface PWAConfig {
+    dest?: string;
+    register?: boolean;
+    skipWaiting?: boolean;
+    disable?: boolean;
+    buildExcludes?: RegExp[];
+  }
+  
+  export default function withPWA(config: PWAConfig): (nextConfig: NextConfig) => NextConfig;
+}
src/pages/_app.tsx (1)

22-41: PWA 메타 태그 구성은 적절하나 Apple 아이콘 크기 최적화 권장

전체적인 PWA 설정 구조는 올바르게 구현되었습니다. 다만, Line 33의 apple-touch-icon이 512x512 크기의 icon3.png를 사용하고 있는데, Apple은 180x180px 크기를 권장합니다. 큰 이미지는 iOS에서 리사이징 시 성능 저하를 유발할 수 있습니다.

180x180 아이콘을 추가하고 다음과 같이 수정하는 것을 권장합니다:

-        <link rel="apple-touch-icon" href="/icons/icon3.png" />
+        <link rel="apple-touch-icon" href="/icons/icon-180.png" />

그리고 /public/icons/ 디렉토리에 180x180 크기의 아이콘을 추가해주세요.

next.config.ts (1)

64-71: PWA 설정 구조는 올바르나 개발 환경에서 비활성화 권장

withPWA 설정이 올바르게 구성되었습니다. 다만, 개발 환경에서 Service Worker가 활성화되어 있으면 캐싱으로 인한 디버깅 문제가 발생할 수 있습니다.

개발 환경에서 PWA를 비활성화하는 옵션을 추가하세요:

 const withPWABundle = withPWA({
   dest: 'public',
   register: true,
   skipWaiting: true,
+  disable: process.env.NODE_ENV === 'development',
   buildExcludes: [/dynamic-css-manifest\.json$/],
 });
public/manifest.json (1)

9-24: PWA 아이콘 크기 및 속성 개선 권장

기본 매니페스트 구성은 적절하나, 아이콘 설정에 다음 개선사항을 권장합니다:

  1. 64x64는 표준 PWA 아이콘 크기가 아닙니다 (일반적으로 72x72, 96x96부터 시작)
  2. 중간 크기 아이콘들이 누락되었습니다 (144x144, 384x384 등)
  3. purpose 속성이 없어 maskable 아이콘 지원이 불명확합니다

다음과 같이 개선할 수 있습니다:

   "icons": [
     {
-      "src": "/icons/icon1.png",
-      "sizes": "64x64",
+      "src": "/icons/icon-72.png",
+      "sizes": "72x72",
+      "type": "image/png",
+      "purpose": "any"
+    },
+    {
+      "src": "/icons/icon-96.png",
+      "sizes": "96x96",
+      "type": "image/png",
+      "purpose": "any"
+    },
+    {
+      "src": "/icons/icon-144.png",
+      "sizes": "144x144",
       "type": "image/png",
+      "purpose": "any"
     },
     {
       "src": "/icons/icon2.png",
       "sizes": "192x192",
-      "type": "image/png"
+      "type": "image/png",
+      "purpose": "any maskable"
+    },
+    {
+      "src": "/icons/icon-384.png",
+      "sizes": "384x384",
+      "type": "image/png",
+      "purpose": "any"
     },
     {
       "src": "/icons/icon3.png",
       "sizes": "512x512",
-      "type": "image/png"
+      "type": "image/png",
+      "purpose": "any maskable"
     }
   ]
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 93ac0e9 and 7dc993d.

⛔ Files ignored due to path filters (4)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • public/icons/icon1.png is excluded by !**/*.png
  • public/icons/icon2.png is excluded by !**/*.png
  • public/icons/icon3.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • next.config.ts (3 hunks)
  • package.json (1 hunks)
  • public/manifest.json (1 hunks)
  • src/pages/_app.tsx (2 hunks)
  • src/shared/types/next-pwa.d.ts (1 hunks)
  • src/styles/globals.css (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-31T17:34:04.352Z
Learnt from: jjangminii
Repo: geulDa/FE PR: 64
File: src/pages/map/result/components/ResultMap.tsx:3-3
Timestamp: 2025-10-31T17:34:04.352Z
Learning: The geulDa/FE project uses Next.js Pages Router (not App Router), so components should import useRouter from 'next/router' and should not use the 'use client' directive.

Applied to files:

  • src/pages/_app.tsx
🧬 Code graph analysis (1)
src/pages/_app.tsx (1)
src/shared/layout/AppLayout.tsx (1)
  • AppLayout (1-7)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-and-deploy
🔇 Additional comments (1)
src/styles/globals.css (1)

16-40: 반응형 레이아웃 구현이 PWA 요구사항에 적합합니다

모바일 우선 접근 방식과 hover/pointer 미디어 쿼리를 사용한 데스크톱/모바일 분기 처리가 적절합니다. 모바일에서는 전체 너비를 사용하고, 데스크톱에서는 390px로 제한하여 일관된 모바일 앱 경험을 제공합니다.

"jwt-decode": "^4.0.0",
"lottie-react": "^2.4.1",
"next": "15.5.4",
"next-pwa": "^5.6.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

next-pwa 버전 호환성 및 최신 버전 확인 필요

next-pwa ^5.6.0은 상당히 오래된 버전이며, 현재 사용 중인 Next.js 15.5.4와의 호환성이 보장되지 않을 수 있습니다. Next.js 15는 next-pwa v5와 호환되지 않을 가능성이 높으며, 대신 @ducanh2912/next-pwa 같은 커뮤니티 포크를 사용해야 할 수 있습니다.

다음 스크립트로 최신 버전 정보와 Next.js 15 호환성을 확인해주세요:

웹에서도 관련 정보를 확인해주세요:


🏁 Script executed:

#!/bin/bash
# next-pwa의 최신 버전 및 Next.js 15 호환성 확인

echo "=== next-pwa 최신 버전 확인 ==="
npm view next-pwa version time

echo -e "\n=== @ducanh2912/next-pwa (Next.js 13+ 호환 포크) 확인 ==="
npm view @ducanh2912/next-pwa version time

echo -e "\n=== package.json의 Next.js 버전 확인 ==="
cat package.json | grep -A2 '"next"'

Length of output: 7715


🌐 Web query:

Does next-pwa version 5.6.0 support Next.js 15?

💡 Result:

Short answer: No official support — next-pwa v5.6.0 was published years before Next.js 15 and is not listed as compatible with Next 15. See the package/GitHub metadata (last publish ~3 years ago) and project repo. [1][2][3]

If you need help testing compatibility or a migration path (errors you're seeing), tell me the error and I’ll help troubleshoot.

Sources:

  • npm package page (next-pwa v5.6.0, last publish ~3 years ago). [1]
  • GitHub repo (next-pwa README / project). [2]
  • Snyk/npm metadata noting last-release / maintenance signal. [3]

🏁 Script executed:

#!/bin/bash
# Check actual package.json in the repository for Next.js version and PWA setup
cat package.json | grep -E '"next"|"next-pwa"' -A1 -B1

Length of output: 100


next-pwa 버전을 @ducanh2912/next-pwa로 업그레이드 필요

현재 package.json에 지정된 next-pwa ^5.6.0 (2022년 8월 릴리스, 마지막 업데이트)은 Next.js 15.5.4와 공식적으로 호환되지 않습니다. Next.js 15 지원을 위해 유지보수 중인 @ducanh2912/next-pwa v10.2.9 포크로 마이그레이션해야 합니다.

🤖 Prompt for AI Agents
In package.json at line 21, replace the dependency "next-pwa": "^5.6.0" with the
maintained fork "@ducanh2912/next-pwa": "10.2.9" to ensure compatibility with
Next.js 15.5.4; after editing run your package manager (npm/yarn/pnpm install)
to update lockfile, then rebuild and run the app to verify no breaking config
changes are required (adjust next.config.js PWA options if any deprecation
warnings appear).

@skyblue1232 skyblue1232 merged commit 20c93ab into develop Nov 16, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comment 필요한 주석 추가 및 변경 setting 패키지 설치, 개발 설정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[타입] 작업 요약

1 participant