Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
79fcdc4
docs: 프로젝트 기획 및 프론트/백엔드 컨벤션 문서 추가
jin2304 Feb 27, 2026
7559759
chore: Next.js 15, Tailwind v4 및 pnpm 기반 프론트엔드 워크스페이스 구조 셋업
jin2304 Feb 27, 2026
651aec8
feat(core): Zustand 도메인 기반 전역 상태 스토어 및 데이터 타입 인터페이스 분리
jin2304 Feb 27, 2026
3d3f2fb
feat(ui): shadcn/ui 프리미티브 컴포넌트 추가 및 AppLayout(Sidebar, Header) 뼈대 적용
jin2304 Feb 27, 2026
d3ed7d6
feat(pages): 서비스 메인 랜딩, 로그인 스크린 및 마이링크 대시보드(+생성 모달) 뷰 완료
jin2304 Feb 27, 2026
2cfd75f
feat(api): 최상위 QueryProvider 구성 및 TanStack/Axios 기반 API 통신 인터페이스 연동
jin2304 Feb 27, 2026
46e4590
docs: 프론트엔드 문서 수정 및 최신화
jin2304 Feb 28, 2026
38f98e9
chore: Jsoup 의존성 추가 및 link 테이블 인덱스 보강
jin2304 Mar 3, 2026
10668d7
feat(backend): URL 정규화(canonicalization) 로직 개선 및 Jsoup 기반 타이틀 추출 기능 추가
jin2304 Mar 3, 2026
90f91e6
feat(backend): BookmarkApiController 개발용 임시 인증 처리 및 URL 분석 엔드포인트 추가
jin2304 Mar 3, 2026
f50dbe7
feat(frontend): API 통신 인프라 및 도메인 타입 정의
jin2304 Mar 3, 2026
456c069
feat(frontend): 북마크/폴더/태그 API 훅 구현 (React Query 연동)
jin2304 Mar 3, 2026
e3bc6e7
feat(frontend): SaveLinkDialog 북마크 생성 API 연동 및 CreateFolderDialog 폴더 …
jin2304 Mar 3, 2026
ced259b
feat(frontend): RightPanel 북마크 CRUD 연동, MyLinks/Sidebar 폴더 목록 연동 및 Mo…
jin2304 Mar 3, 2026
da174eb
docs: 오래된 프론트엔드 초기화 문서 삭제
jin2304 Mar 3, 2026
7a60ff4
refactor(api): fetchClient 에러 처리 및 ApiResponse 타입 구조 개선 (#56)
jin2304 Mar 5, 2026
c7acf10
fix(ui): CreateFolderDialog 입력 필드의 접근성 경고 수정
jin2304 Mar 5, 2026
e0d8c06
style(ui): 글로벌 디자인 가이드라인 정립 및 페이지 레이아웃 조정
jin2304 Mar 5, 2026
aca9124
chore: .claude, CLAUDE.md, *.http 파일을 .gitignore에 추가
jin2304 Mar 5, 2026
965f76f
fix(api): RequestInit.headers 타입 불일치 및 누락 버그 해결
jin2304 Mar 5, 2026
5fb547a
build: Java 컴파일러 -parameters 옵션 추가
jin2304 Mar 5, 2026
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@ out/

### VS Code ###
.vscode/

### Claude AI ###
.claude/
CLAUDE.md

### HTTP Tests ###
*.http
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'me.paulschwarz:spring-dotenv:4.0.0'
implementation 'org.jsoup:jsoup:1.17.2'
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

🌐 Web query:

jsoup 1.17.2 security vulnerabilities CVE

💡 Result:

jsoup 1.17.2 (2023-12-29) is newer than the fixed releases for the two upstream jsoup CVEs commonly flagged by scanners, so it is not affected by them. [4]

Known jsoup CVEs (upstream):

  • CVE-2022-36033 (XSS / sanitizer bypass) — affects jsoup when cleaning HTML if SafeList.preserveRelativeLinks is enabled; patched in jsoup 1.15.3. Since 1.17.2 > 1.15.3, 1.17.2 includes the fix. [1]
  • CVE-2021-37714 (DoS in HTML/XML parsing) — affects versions prior to 1.14.2 when parsing untrusted input; patched in 1.14.2. Since 1.17.2 > 1.14.2, 1.17.2 includes the fix. [2]

Upstream’s own GitHub Security Advisories list only these two issues for jsoup. [3]

Sources: NVD CVE records and jsoup/GitHub advisories. [1][2][3][4]


🏁 Script executed:

# Search for jsoup dependency usage and BookmarkServiceImpl
rg -t java "jsoup" --max-count=20

Repository: Searchweb-Dev/Searchweb-Back

Length of output: 276


🏁 Script executed:

# Find BookmarkServiceImpl file
fd -t f "BookmarkServiceImpl"

Repository: Searchweb-Dev/Searchweb-Back

Length of output: 145


🏁 Script executed:

# Check for any jsoup version references in build files
rg "jsoup" build.gradle build.gradle.kts pom.xml

Repository: Searchweb-Dev/Searchweb-Back

Length of output: 247


🌐 Web query:

jsoup latest version 2024 2025 security updates

💡 Result:

Latest jsoup versions (2024–2025) + security-relevant notes

Latest releases by year

  • 2025 (latest): jsoup 1.21.2 — 2025-08-25 [1]
    (Other 2025 releases: 1.21.1 — 2025-06-23, 1.20.1 — 2025-04-29, 1.19.1 — 2025-03-04) [2]
  • 2024 (latest): jsoup 1.18.3 — 2024-12-02 [3]
    (Also: 1.18.2 — 2024-11-27, 1.18.1 — 2024-07-10) [4]

Current latest overall (as of Mar 5, 2026)

  • jsoup 1.22.1 — 2026-01-01 [5]

Security updates / vulnerabilities to be aware of

  • CVE-2022-36033 (XSS in Cleaner/Safelist with preserveRelativeLinks) is patched in jsoup 1.15.3; upgrade to ≥ 1.15.3 if you might be affected. [6]
  • Security-relevant hardening in newer releases (not necessarily tied to a CVE):
    • 1.21.1 mentions “improved defense against mutation XSS attacks” via attribute escaping changes. [7]
    • 1.22.1 adds optional re2j for linear-time regex selector evaluation (helps reduce ReDoS risk for user-supplied regex selectors) and adds a maximum parser depth limit to prevent unbounded stack growth. [5]

Practical recommendation: if you’re choosing in the 2024–2025 window, prefer 1.21.2; if you can take the newest, use 1.22.1. [1][5]

Sources:
[1] jsoup 1.21.2 release notes (2025-08-25) (jsoup.org)
[2] jsoup News (release list for 2024–2026) (jsoup.org)
[3] jsoup 1.18.3 release notes (2024-12-02) (jsoup.org)
[4] jsoup 1.18.2 release notes (2024-11-27) (jsoup.org)
[5] jsoup 1.22.1 release notes (2026-01-01) (jsoup.org)
[6] NVD entry for CVE-2022-36033 (patched in jsoup 1.15.3) (nvd.nist.gov)
[7] jsoup 1.21.1 release notes (mutation XSS defense note) (jsoup.org)

Citations:


LGTM! Jsoup 의존성 추가 적절함

Jsoup 1.17.2는 HTML 파싱을 위해 안정적이고 널리 사용되는 라이브러리입니다. URL 제목 추출 기능에 적합합니다.

보안 검증 완료:

현재 버전은 안전하며, 필요하면 향후 1.21.2 이상으로 업그레이드 시 뮤테이션 XSS 공격 방어 개선, ReDoS 위험 완화 등 추가 보안 강화를 얻을 수 있습니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@build.gradle` at line 37, The added dependency implementation
'org.jsoup:jsoup:1.17.2' is appropriate and safe for HTML title extraction; no
functional change required, but add a short TODO or upgrade note near the
dependency declaration (implementation 'org.jsoup:jsoup:1.17.2') to consider
bumping to 1.21.2+ in the future for improved XSS/ReDoS protections and note
that current version includes patches for CVE-2022-36033 and CVE-2021-37714.


compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.postgresql:postgresql'
Expand All @@ -50,4 +51,8 @@ tasks.named('test') {

jar {
enabled = false
}

tasks.withType(JavaCompile) {
options.compilerArgs << '-parameters'
}
47 changes: 47 additions & 0 deletions docs/Backend/01. backend-convention.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 백엔드 전체 컨벤션

이 문서는 백엔드 전 도메인에 공통으로 적용하는 기본 컨벤션이다.

## 1) 네이밍 규칙
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

헤더 앞뒤 빈 줄을 추가해 markdownlint 경고(MD022)를 해소해 주세요.

Line 5, 10, 14, 20, 26, 31, 35, 39에서 헤더 주변 공백 규칙이 깨져 문서 lint 경고가 발생합니다.

Also applies to: 10-10, 14-14, 20-20, 26-26, 31-31, 35-35, 39-39

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 5-5: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/Backend/01`. backend-convention.md at line 5, The markdown headers
(e.g., "## 1) 네이밍 규칙") violate markdownlint MD022 because they lack a blank line
before and/or after the header; add a single empty line above and a single empty
line below each header occurrence (including the headers at the specified
locations such as the "## 1) 네이밍 규칙" header and the other headers referenced) so
every header has a blank line separating it from surrounding content to resolve
the lint warnings.

- Java 클래스명: `UpperCamelCase` (예: `BoardService`)
- Java 변수/필드/메서드명: `lowerCamelCase` (예: `boardService`)
- DB 컬럼/테이블명: `snake_case`, 기본 단수형 사용 (예약어/특수 케이스 제외)

## 2) 계층 구조
- 기본 구조는 `Controller -> Service -> DAO` 3계층으로 구성한다.
- 도메인 간 기능 연동이 필요하면, 대상 도메인의 Service **인터페이스를 직접 사용**한다.

## 3) DTO / Command 규칙
- DTO는 **Controller 단에서만 사용**한다.
- Controller 요청 DTO는 `inner class` 형태로 관리한다.
- Service/DAO 계층 DTO 정책은 추후 확정 전까지 최소화한다.
- 조회 조건이 복잡해지면 `Command` 객체를 사용한다.

## 4) API 규칙
- RESTful API 규칙을 준수한다.
- Controller 반환은 공통 응답 포맷을 사용한다.
- `ResponseEntity<ApiResponse<T>>`
- HTTP 상태코드는 의미에 맞게 사용한다. (예: 생성 `201 Created`, 조회 `200 OK`)

## 5) 도메인/에러 규칙
- 도메인 객체 생성은 `@Builder`를 사용하고, Builder로 생성한다.
- 에러 코드는 도메인별로 커스텀 `*ErrorCode`를 작성한다.
- 에러 코드는 짧고 명확하게 유지한다.

## 6) Config 배치 규칙
- Config는 `config` 폴더 하위에 도메인 폴더를 만든 뒤 배치한다.
- 예시: 아이템 도메인 Config -> `config/item/ItemConfig.java`

## 7) 머지 기준
- 테스트가 있으면 테스트 통과 후 머지한다.
- 테스트 코드가 없더라도, 서버 실행(기동) 정상 확인 후 머지한다.

## 빠른 체크리스트
- [ ] 클래스/변수 네이밍 규칙을 지켰는가?
- [ ] 3계층 구조를 지켰는가?
- [ ] DTO는 Controller에서만 사용했는가?
- [ ] 필요한 경우에만 Command를 도입했는가?
- [ ] 공통 응답 포맷(`ApiResponse`)을 사용했는가?
- [ ] 도메인별 에러 코드를 분리했는가?
- [ ] Config 파일을 `config/{domain}` 경로에 배치했는가?
- [ ] 테스트 통과 또는 서버 기동 확인 후 머지 가능한 상태인가?
111 changes: 111 additions & 0 deletions docs/Fontend/01. frontend_architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# SearchWeb Frontend Architecture

SearchWeb 프론트엔드는 현대적인 웹 기술 스택을 활용하여 프리미엄한 사용자 경험과 높은 유지보수성을 확보하는 것을 목표로 합니다.

## 🛠 Tech Stack & Rationale (기술 스택 선정 이유)

| 기술 스택 | 채택 이유 | 기대 효과 |
| :--- | :--- | :--- |
| **Next.js 15 (App Router)** | React 19 지원 및 서버 컴포넌트(RSC) 최적화 필요 | 초기 로딩 속도 향상 및 SEO 최적화 |
| **Zustand** | Redux 대비 매우 가벼운 보일러플레이트 및 직관적인 API | 링크/폴더/UI의 복잡한 전역 상태를 효율적으로 관리 |
| **TanStack Query v5** | 서버 상태(Server State) 관리와 캐싱의 표준 | API 연동의 선언적 처리 및 로딩/에러 상태 관리 자동화 |
| **Tailwind CSS v4** | 유틸리티 우선 스타일링 및 최신 CSS 기능 활용 | 디자인 시스템 구축 속도 향상 및 유지보수 용이 |
| **shadcn/ui** | 검증된 접근성과 고난도 UI 프리미티브(Dialog, Popover 등) 제공 | 서비스의 'Premium Purple' 스타일을 빠르고 일관되게 구현 |
| **TypeScript (Strict)** | 엄격한 타입 체크를 통한 런타임 에러 방지 | 코드 안정성 확보 및 대규모 협업 효율성 증대 |
| **Axios** | 인터셉터 및 커스텀 인스턴스 설정의 유연함 | 백엔드 공통 응답 규격(Envelope) 처리에 최적화 |

## 📁 Directory Structure (프로젝트 구조)

```text
frontend/
├── src/
│ ├── app/ # Next.js App Router (Pages & Layouts)
│ │ ├── login/ # 구글 소셜 로그인 연동 페이지
│ │ ├── my-links/ # 핵심 기능: 대시보드 메인 뷰
│ │ └── layout.tsx # Root Layout (Theme & Provider)
│ ├── components/
│ │ ├── ui/ # shadcn/ui 기반 아토믹 컴포넌트
│ │ ├── layout/ # AppLayout, Sidebar, Header
│ │ ├── my-links/ # 대시보드 전용 (FolderCard, RightPanel)
│ │ ├── dialogs/ # 기능별 모달 (CreateFolder, SaveLink)
│ │ └── providers/ # Context (QueryProvider 등)
│ ├── lib/
│ │ ├── store/ # Zustand 스토어 (linkStore, folderStore, uiStore)
│ │ ├── api/ # API 클라이언트 및 엔드포인트 모듈
│ │ ├── types/ # 공통 타입 및 인터페이스
│ │ └── utils.ts # 클래스 병합 유틸리티 함수
│ └── public/ # 브랜드 에셋 및 정적 아이콘
```

## ✅ 지금까지 완료된 작업 요약

### 1. 프로젝트 기반 및 환경 설계
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

헤딩 전후 빈 줄 규칙(MD022)을 맞춰 주세요.

현재 문서는 CI markdownlint 경고가 발생하므로, 각 헤딩 아래에 빈 줄을 추가해 규칙을 통일하는 것이 좋습니다.

Also applies to: 47-47, 52-52, 87-87, 92-92, 97-97, 102-102, 108-108

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 42-42: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/Fontend/01`. frontend_architecture.md at line 42, Headings in the
document (e.g., "### 1. 프로젝트 기반 및 환경 설계" and the other headings referenced at
lines 47, 52, 87, 92, 97, 102, 108) violate MD022; ensure each heading is
surrounded by a single blank line above and below it (i.e., insert an empty line
before the heading if missing and an empty line after the heading), apply this
consistently for the listed headings so markdownlint no longer emits the MD022
warning.

- **초기화**: Next.js 15 + React 19 + TypeScript Strict 모드 설정
- **인프라**: pnpm 워크스페이스 및 배포 최적화 설정
- **테마**: Tailwind v4를 활용한 프리미엄 보라색(#7c3aed, #a78bfa) 및 글래스모피즘 디자인 시스템 구축

### 2. 핵심 로직 및 데이터 흐름
- **상태 관리**: Zustand를 이용한 도메인 기반 전역 상태 설계
- **데이터 페칭**: TanStack Query v5 + Axios 기반 API 연동 모듈 및 커스텀 훅(`useFolders` 등) 구현
- **응답 규격**: 백엔드 공통 Response (code, message, data) 규정 및 인터페이스 설계

### 3. 주요 UI 및 레이아웃
- **Layout**: 고정 사이드바 및 반응형 헤더를 포함한 `AppLayout` 완성
- **UI Components**: shadcn/ui 기반 고품질 컴포넌트 커스터마이징 추가
- **View**: 메인 랜딩, 소셜 로그인 인터페이스, 마이링크 대시보드 조립 완료

## 🚀 실제 프론트 동작 명령어 (pnpm)

```bash
# 프론트엔드 작업 경로 진입
cd frontend

# 개발 서버 실행 (Turbopack 적용)
pnpm dev

# 배포용 빌드 및 실행
pnpm build
pnpm start

# 코드 품질 검사
pnpm exec tsc --noEmit # 타입 체크
pnpm lint # 코드 스타일 및 린트
```

## 📝 API Response Format (Sample)

```json
{
"code": "200",
"message": "success",
"data": { ... }
}
```

## 🎯 향후 구현 기능 (Next Steps) - 상세 보완

### 1단계: 백엔드 실데이터 통합 (Integration)
- [ ] 현재의 Mock 데이터를 실제 서비스 API 엔드포인트 호출로 전면 교체
- [ ] Zod 스키마를 이용한 API 응답 런타임 데이터 검증 레이어 연동
- [ ] 실제 데이터 기반의 로딩/에러/빈 상태 UI 정밀 튜닝

### 2단계: 인증 및 권한 관리 (Authentication)
- [ ] Google OAuth 기반 로그인 성공 후 JWT 토큰 핸들링 및 세션 유지
- [ ] `Auth Middleware` 설정을 통한 비로그인 사용자 경로 보호
- [ ] 사용자 프로필 이미지 및 권한에 따른 UI 노출 제어

### 3단계: 고급 UX 기능 고도화 (Advanced UX)
- [ ] 폴더 이동 및 링크 순서 조정을 위한 Drag & Drop 인터랙션 구현
- [ ] `Intersection Observer` 기반의 대용량 북마크 무한 스크롤(Infinite Scroll) 적용
- [ ] 글로벌 명령 팔레트(Search Cmd+K)를 통한 빠른 이동 기능

### 4단계: 서비스 확장 (Extended Features)
- [ ] 최근 방문 히스토리(`/history`) 및 방문 빈도 기반 추천 기능
- [ ] 상세 유저 설정, 알림 설정 및 다크모드 수동 전환 제어 페이지(`settings`)

---

## ⚠️ 주의사항
1. **pnpm 권장**: 모든 패키지 관리는 `pnpm`을 통해 수행해야 의존성 문제가 없습니다.
2. **반응형 설계**: `my-links` 페이지의 그리드 레이아웃(5열) 유지 시 뷰포트 크기를 고려하십시오.
3. **스타일 일관성**: 프리미엄 보라색 그라디언트 테마의 디자인 톤앤매너를 준수해야 합니다.
Loading