Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions apps/extension/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build
/dist

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
20 changes: 20 additions & 0 deletions apps/extension/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"manifest_version": 3,
"name": "PinBack Extension",
"version": "0.1.0",
"action": { "default_popup": "popup.html" },
"icons": {
"128": "icon128.png"
},
"background": {
"service_worker": "src/background.ts",
"type": "module"
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["src/content.ts"]
}
],
"host_permissions": ["<all_urls>"]
}
10,080 changes: 10,080 additions & 0 deletions apps/extension/package-lock.json

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "@pinback/extension",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"format": "prettier -w .",
"zip": "vite build && node scripts/zip.mjs"
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

zip 스크립트 리소스 존재 여부 확인

node scripts/zip.mjs가 레포 내에 있는지 확인 부탁드립니다. 누락 시 CI에서 스크립트가 실패합니다.


🏁 Script executed:

#!/bin/bash
# apps/extension/scripts/zip.mjs 존재 여부 확인
fd -H -t f '^zip\.mjs$' apps/extension | sed 's/^/found: /' || true

Length of output: 61


파일이 여전히 보이지 않아 추가 확인이 필요합니다. 아래 스크립트로 apps/extension/scripts 디렉터리 및 전체 .mjs 파일을 다시 검색해 주세요.


🏁 Script executed:

#!/bin/bash
# apps/extension/scripts 디렉터리 내 .mjs 파일 목록 확인
echo "▶ scripts 폴더 내 .mjs 파일:"
find apps/extension/scripts -maxdepth 1 -type f -name '*.mjs' | sed 's/^/found: /' || true

# apps/extension 전체에서 .mjs 확장자 파일 검색
echo "▶ 전체 디렉터리 .mjs 파일 검색:"
find apps/extension -type f -name '*.mjs' | sed 's/^/found: /' || true

Length of output: 317


zip.mjs 파일 누락 – 스크립트 경로 확인 및 추가 필요

apps/extension/package.json에서 참조하는 node scripts/zip.mjs 파일이 레포에 존재하지 않습니다. CI 오류를 방지하려면 아래 중 하나를 조치해 주세요:

  • apps/extension/scripts/zip.mjs 파일을 생성하여 필요한 압축 로직을 구현하고 커밋
  • 또는 package.json의 "zip" 스크립트 경로를 실제 스크립트 위치로 수정

대상 위치:

  • 파일: apps/extension/package.json
  • 라인: 11 ("zip": "vite build && node scripts/zip.mjs")
🤖 Prompt for AI Agents
In apps/extension/package.json around line 11, the "zip" script references node
scripts/zip.mjs which does not exist in the repo; fix this by either creating
apps/extension/scripts/zip.mjs with the required packaging/zip logic and
committing it (ensure it exports/executes the build artifact compression and is
runnable by Node), or update the "zip" script in package.json to point to the
actual existing script path; after change, run the script locally to verify it
completes without errors and commit the change.

},
"dependencies": {
"@pivanov/vite-plugin-svg-sprite": "^3.1.3",
"@tanstack/react-query": "^5.85.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@crxjs/vite-plugin": "^2.2.0",
"@tailwindcss/vite": "^4.1.12",
"@types/chrome": "^0.0.273",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-react-swc": "^4.0.0",
"autoprefixer": "^10.4.21",
"eslint": "^9.9.0",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-react": "^7.35.0",
"postcss": "^8.5.6",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.8",
"tailwindcss": "^4.1.12",
"typescript": "^5.5.4",
"typescript-eslint": "^8.0.1",
"vite": "^7.1.2",
"vite-plugin-chrome-extension": "0.0.7",
"vite-tsconfig-paths": "^5.1.4"
}
}
12 changes: 12 additions & 0 deletions apps/extension/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<div id="root"></div>
<!-- src 경로는 프로젝트 루트 기준으로 모듈 import -->
<script type="module" src="/src/popup.tsx"></script>
</body>
</html>
Binary file added apps/extension/public/icon128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions apps/extension/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as React from "react";
import './index.css'
const App = () => {
return (
<div className="App">
<div className="h-[50rem] w-[26rem] bg-blue-500 text-white flex items-center justify-center text-2xl">
자 핀백 앱잼 시작~오늘은 7월 7일임~
</div>
</div>
);
};

export default App;
File renamed without changes.
1 change: 1 addition & 0 deletions apps/extension/src/background.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("백그라운드 기능")
1 change: 1 addition & 0 deletions apps/extension/src/content.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("컨텐츠 스크립트")
19 changes: 19 additions & 0 deletions apps/extension/src/custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
declare module '*.svg' {
const content: string;
export default content;
}

declare module '*.png' {
const content: string;
export default content;
}

declare module '*.jpg' {
const content: string;
export default content;
}

declare module '*.webp' {
const content: string;
export default content;
}
3 changes: 3 additions & 0 deletions apps/extension/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import "tailwindcss";
Copy link

@coderabbitai coderabbitai bot Aug 18, 2025

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Tailwind v4의 단일 import 사용 — LGTM

팀 러닝과 일치합니다. 이 한 줄이면 base/components/utilities 전부 포함됩니다.

Tailwind 스타일이 실제 번들에 포함되는지 확인해 주세요. 보통 popup 엔트리에서 import "./index.css"가 필요합니다. 아래 스크립트로 참조 여부를 확인할 수 있습니다.


🏁 Script executed:

#!/bin/bash
# apps/extension에서 index.css가 어디에서 import/참조되는지 확인
rg -n -C1 --glob '!**/node_modules/**' --type-add 'tsx:*.tsx' --type-add 'html:*.html' 'index\.css|@import\s+"tailwindcss"' apps/extension

Length of output: 194


popup 엔트리에 Tailwind 스타일 포함을 위한 index.css import 추가 필요

Tailwind v4의 @import "tailwindcss"; 적용은 올바릅니다. 다만, apps/extension/src/index.css가 어떤 곳에서도 임포트되지 않아 실제 번들에 스타일이 포함되지 않습니다. 팝업 진입점 파일(예: apps/extension/src/popup.tsx) 최상단에 아래 import 구문을 추가해주세요:

+ import './index.css';
  • 파일: apps/extension/src/popup.tsx (또는 실제 팝업 엔트리 파일)
  • 위치: 최상단 임포트 그룹 위

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In apps/extension/src/index.css around line 1, the Tailwind import exists but
the CSS file is never imported into the popup bundle; open the popup entry file
(e.g., apps/extension/src/popup.tsx) and add an import of the CSS file at the
very top of the file (above other imports) so the build includes Tailwind
styles; ensure the relative path to apps/extension/src/index.css is correct and
save/rebuild.

Copy link
Member

Choose a reason for hiding this comment

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

이 부분은 이후 디자인 시스템 설정 PR 머지된 이후에 app.cssindex.css한 파일에서
@import '@pinback/tailwind-config/shared-styles.css';
이 코드 작성해서 사용하면 될 것 같아요 👍

Copy link

Choose a reason for hiding this comment

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

@constantly-dev 좋은 계획이네요! 현재 @import "tailwindcss";는 임시 설정이고, 디자인 시스템 PR 머지 후 @pinback/tailwind-config/shared-styles.css로 통합하는 방향으로 진행하시는군요. 이렇게 하면 모노레포 전체에서 일관된 스타일을 관리할 수 있겠습니다. 👍


✏️ Learnings added
Learnt from: constantly-dev
PR: Pinback-Team/pinback-client#5
File: apps/extension/src/index.css:1-1
Timestamp: 2025-08-19T17:18:57.657Z
Learning: constantly-dev는 디자인 시스템 설정 PR 머지 후 `import 'pinback/tailwind-config/shared-styles.css';`를 `app.css`나 `index.css`에서 사용하여 공유 스타일을 관리할 계획입니다.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: constantly-dev
PR: Pinback-Team/pinback-client#10
File: apps/landing/src/index.css:1-1
Timestamp: 2025-07-04T10:12:01.690Z
Learning: In TailwindCSS v4, the import "tailwindcss"; syntax is the new recommended approach that replaces the three separate tailwind directives (tailwind base;, tailwind components;, tailwind utilities;). This single import pulls in all of Tailwind's preflight, components, and utilities in one step and is used with the tailwindcss/vite plugin.

Learnt from: constantly-dev
PR: Pinback-Team/pinback-client#10
File: apps/landing/src/index.css:1-1
Timestamp: 2025-07-04T10:12:01.690Z
Learning: In TailwindCSS v4, the import "tailwindcss"; syntax is the new recommended approach that replaces the three separate tailwind directives (tailwind base;, tailwind components;, tailwind utilities;). This is used with the tailwindcss/vite plugin.

Learnt from: constantly-dev
PR: Pinback-Team/pinback-client#2
File: pnpm-workspace.yaml:3-3
Timestamp: 2025-08-18T13:48:59.021Z
Learning: constantly-dev는 docs 디렉터리를 컨벤션 문서 추가용으로 사용할 예정이라고 명시했습니다.

/* 디자인 시스템 구축 이후에! 임포트 바꿀 예정입니당
*/
Empty file.
17 changes: 17 additions & 0 deletions apps/extension/src/popup.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// src/popup.tsx
import * as React from 'react';
import { createRoot } from 'react-dom/client';
import App from './App';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

const queryClient = new QueryClient();
const rootEl = document.getElementById('root');
if (rootEl) {
createRoot(rootEl).render(
<QueryClientProvider client={queryClient}>
<App />
</QueryClientProvider>
);
} else {
console.error('❌ root element not found!');
}
Empty file.
Empty file.
9 changes: 9 additions & 0 deletions apps/extension/tailwind.config.ts
Copy link
Member

Choose a reason for hiding this comment

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

우리 프로젝트에서 tailwind를 ver4를 쓰고 있기 때문에, config파일이 필수가 아니에요! tailwind-config를 따로 package로 빼둔 상태여서 css파일에서 import하고 사용하면 될 것 같아요 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

헉 넵!! 확인해두었습니다! 이후 스타일 적용 확인 후 제거해두겠습니다 :)

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { Config } from 'tailwindcss';

export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {},
},
plugins: [],
} satisfies Config;
Comment on lines +4 to +9
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Tailwind content 경로에 popup.html 누락 — 스캔 대상에 추가 권장

확장 팝업 엔트리가 popup.html이라면 index.html만 지정 시 해당 파일의 클래스는 스캔되지 않습니다. JIT에서 미검출된 유틸리티가 제거될 수 있습니다.

 export default {
-  content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
+  content: ['./popup.html', './src/**/*.{js,ts,jsx,tsx}'],
   theme: {
     extend: {},
   },
   plugins: [],
 } satisfies Config;

추가로, 동적 클래스 네이밍을 사용한다면 safelist 설정도 검토해 주세요.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {},
},
plugins: [],
} satisfies Config;
export default {
content: ['./popup.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {},
},
plugins: [],
} satisfies Config;
🤖 Prompt for AI Agents
In apps/extension/tailwind.config.ts around lines 4 to 9, the Tailwind content
array only includes './index.html' and therefore misses popup.html (the
extension popup entry), causing its classes to not be scanned and possibly
purged; update the content array to include './popup.html' (or a glob that
matches it, e.g. './*.html' or './src/**/*.html') so Tailwind scans the popup
file, and if you use dynamic class names also add an appropriate safelist entry
to preserve those classes.

30 changes: 30 additions & 0 deletions apps/extension/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"compilerOptions": {
"moduleResolution": "bundler",
"baseUrl": ".",
"outDir": "./dist/",
"sourceMap": true,
"strict": true,
"noImplicitReturns": true,
"noImplicitAny": true,
"module": "esnext",
"target": "ES2020",
"lib": ["ES2020", "DOM", "DOM.Iterable", "WebWorker"],
"jsx": "react-jsx",
"allowJs": false,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"skipLibCheck": true,
"plugins": [{ "name": "react" }],
"types": ["vite/client", "chrome"],
"resolveJsonModule": true,
"paths": {
"@components/*": ["src/components/*"],
"@utils/*": ["src/utils/*"],
"@constants/*": ["src/constants/*"],
"@shared-types/*": ["src/types/*"],
"@api/*": ["src/api/*"]
}
},
"include": ["src/**/*", "manifest.json", "popup.html", "vite.config.ts"]
}
35 changes: 35 additions & 0 deletions apps/extension/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// vite.config.ts
import { defineConfig } from 'vite';
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react-swc';
import tsconfigPaths from 'vite-tsconfig-paths';
import { resolve } from 'path';
import { crx } from '@crxjs/vite-plugin';
import manifest from './manifest.json';
export default defineConfig({
plugins: [
react(),
tsconfigPaths({
projects: [resolve(__dirname, '../../tsconfig.json')],
}),
tailwindcss(),
crx({ manifest }),
],

build: {
outDir: 'dist',
copyPublicDir: true,

},
publicDir: 'public',
resolve: {
alias: {
'@': resolve(__dirname, './src'),
'@api': resolve(__dirname, './src/api'),
'@utils': resolve(__dirname, './src/utils'),
'@constants': resolve(__dirname, './src/constants'),
'@shared-types': resolve(__dirname, './src/types'),
'@components': resolve(__dirname, './src/components'),
},
},
});
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@
"prettier": "^3.6.2",
"prettier-plugin-tailwindcss": "^0.6.14",
"turbo": "^2.5.6",
"typescript": "5.9.2"
"typescript": "5.9.2",
"vite": "7.1.2"
},
"pnpm": {
"overrides": {
"vite": "7.1.2"
}
},
"packageManager": "pnpm@9.0.0",
"engines": {
"node": ">=18"
}
}

Loading