Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Walkthrough홈 페이지를 모의 데이터에서 실제 API 데이터로 전환합니다. 폴더·노트·카드용 신규 엔드포인트와 API 함수·타입·React Query 헬퍼·훅을 추가하고, favicon을 SVG에서 ico로 교체합니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Home as HomeComponent
participant Hooks as useHomeDataHooks
participant Query as ReactQuery
participant API as API_Layer
participant Server as Backend
User->>Home: 홈 페이지 요청
Home->>Hooks: useRecentMarkedFolders(), useRecentMarkedNotes(), useScheduledLearningItems() 호출
Hooks->>Query: 각각의 QUERY_OPTION 실행
Query->>API: fetchRecentMarkedFolders(), fetchRecentMarkedNotes(), fetchStudyCards({...})
API->>Server: GET /folders/recent-marks, /notes/recent-marks, /cards/sort-filter
Server-->>API: 응답 반환 (RecentMarkedFolders/Notes, StudyCardList)
API-->>Query: 응답 전달
Query-->>Hooks: 데이터 전달
Hooks->>Hooks: mapTo*Props로 매핑
Hooks-->>Home: 변환된 props 전달
Home->>User: 컴포넌트 렌더링 후 응답
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 분
Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code graph analysis (1)src/types/card/card-request.ts (1)
🔇 Additional comments (2)
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. Comment |
|
✨ Storybook 확인: 🔗 https://6785fc0fb0ff9f8d21d80624-lzydfezmta.chromatic.com/ |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
src/pages/home/hooks/use-home-data.ts (2)
8-31: 최근 즐겨찾기 폴더/노트 매핑에서 날짜 필드 의미만 한 번 확인해 주세요.
- 폴더:
createdAt에folder.markDate를 넣고 있어서, 컴포넌트가 해당 값을 “생성일”로 가정해 표시한다면 실제 의미(최근 즐겨찾기 시점)와 어긋날 수 있습니다.- 노트:
editDate와createdAt을 모두note.markAt으로 채우고 있는데, 리스트 UI가 “수정일 / 생성일”을 구분해 사용한다면 동일 값으로 들어가는 것이 의도인지 모호할 수 있습니다.홈 전용 뷰에서 “최근 즐겨찾기 일시”를 보여주려는 목적이라면,
- prop 이름을 더 의미에 맞게 분리하거나,
- 최소한 주석으로 “홈에서는 createdAt/editDate를 즐겨찾기 시점으로 사용”한다고 명시해 두면 이후 헷갈릴 여지가 줄어들 것 같습니다.
33-55: ScheduledLearning 매핑의 하드코딩 값과 필드 의미를 정리해 두는 것이 좋겠습니다.
folderId: 0
- 현재 컴포넌트가
folderId를 사용하지 않는다면 당장은 문제 없겠지만, 나중에 폴더 상세로의 네비게이션 등에 활용될 경우 잘못된 ID로 이어질 수 있습니다. 가능한 경우 백엔드 응답에 폴더 ID를 추가해 타입/매핑을 맞추는 쪽을 고려해 보시면 좋겠습니다.
completedCards: card.studyStatus
studyStatus가 “완료한 카드 수”인지, 아니면 상태 코드(예: 0/1/2…)인지가 이름만으로는 애매합니다. 만약 상태 코드라면completedCards대신 보다 의미를 드러내는 필드명으로 바꾸는 편이 안전합니다.
timeReachedCards: 5
- 완전히 하드코딩된 값이라, 실제 데이터가 들어오기 시작하면 혼동될 수 있습니다. TODO 주석으로 “임시 하드코딩”임을 남기거나, 나중에 API 값으로 교체할 계획이라면 간단히 명시해 두면 유지보수에 도움이 될 것 같습니다.
위 사항들은 기능을 막는 수준은 아니라서 이번 PR에 모두 반영하지 않아도 되지만, 다음 작업 때 한 번 정리해 두시면 좋겠습니다.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
public/favicon.icois excluded by!**/*.ico
📒 Files selected for processing (17)
index.html(1 hunks)src/apis/card/card-queries.ts(1 hunks)src/apis/card/card.ts(1 hunks)src/apis/folder/folder-queries.ts(2 hunks)src/apis/folder/folder.ts(2 hunks)src/apis/note/note-queries.ts(2 hunks)src/apis/note/note.ts(2 hunks)src/constants/api.ts(2 hunks)src/pages/archive/components/MainFolderList/MainFolderList.tsx(1 hunks)src/pages/home/hooks/use-home-data.ts(1 hunks)src/pages/home/index.tsx(2 hunks)src/types/card/card-request.ts(1 hunks)src/types/card/card-response.ts(1 hunks)src/types/card/index.ts(1 hunks)src/types/folder/folder-response.ts(1 hunks)src/types/index.ts(1 hunks)src/types/note/note-response.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (10)
src/types/folder/folder-response.ts (3)
src/pages/archive/components/modal/MoveFolderModal/MoveFolderModal.tsx (1)
Folder(7-13)src/types/folder/folder.ts (1)
MainFolderItemProps(1-8)src/mocks/folder-item-data.ts (1)
FolderItemDataProps(3-10)
src/apis/card/card.ts (4)
src/types/card/card-request.ts (1)
FetchStudyCardsParams(1-5)src/apis/common/methods.ts (1)
apiGet(3-6)src/types/card/card-response.ts (1)
StudyCardListResponse(12-12)src/constants/api.ts (1)
END_POINTS(1-26)
src/constants/api.ts (1)
src/pages/archive/pages/NotesInsideFolderPage.tsx (1)
folder(115-119)
src/types/card/card-response.ts (2)
src/types/home/scheduled-learning.ts (1)
ScheduledLearningItemProps(1-9)src/types/note/note.ts (1)
NoteItemProps(1-15)
src/apis/card/card-queries.ts (2)
src/types/card/card-request.ts (1)
FetchStudyCardsParams(1-5)src/apis/card/card.ts (1)
fetchStudyCards(5-7)
src/apis/note/note-queries.ts (1)
src/apis/note/note.ts (1)
fetchRecentMarkedNotes(62-64)
src/apis/folder/folder.ts (3)
src/apis/common/methods.ts (1)
apiGet(3-6)src/types/folder/folder-response.ts (1)
RecentMarkedFoldersResponse(80-80)src/constants/api.ts (1)
END_POINTS(1-26)
src/apis/note/note.ts (2)
src/apis/common/methods.ts (1)
apiGet(3-6)src/types/note/note-response.ts (1)
RecentMarkedNotesResponse(75-75)
src/pages/home/hooks/use-home-data.ts (10)
src/utils/folder-mapper.ts (1)
mapToMainFolderProps(4-13)src/types/folder/folder-response.ts (1)
RecentMarkedFolder(71-78)src/pages/archive/components/MainFolderList/MainFolderList.tsx (1)
MainFolderProps(9-16)src/types/note/note-response.ts (1)
RecentMarkedNote(63-73)src/types/note/note.ts (1)
NoteItemProps(1-15)src/types/card/card-response.ts (1)
StudyCard(1-10)src/types/home/scheduled-learning.ts (1)
ScheduledLearningItemProps(1-9)src/apis/folder/folder-queries.ts (1)
FOLDER_QUERY_OPTION(12-33)src/apis/note/note-queries.ts (1)
NOTE_QUERY_OPTION(12-23)src/apis/card/card-queries.ts (1)
CARD_QUERY_OPTION(10-16)
src/apis/folder/folder-queries.ts (2)
src/types/folder/folder-request.ts (1)
FetchFoldersParams(1-7)src/apis/folder/folder.ts (1)
fetchRecentMarkedFolders(43-45)
🔇 Additional comments (16)
index.html (1)
6-6: Favicon has been properly added.The
favicon.icofile exists in thepublicdirectory and the HTML reference at line 6 correctly points to it. No further action is required.src/types/index.ts (1)
4-4: LGTM!카드 관련 타입을 중앙 집중식으로 export하는 표준 패턴을 올바르게 따르고 있습니다.
src/apis/note/note-queries.ts (1)
3-3: LGTM!React Query 패턴을 올바르게 따르고 있으며, 기존 쿼리 정의와 일관성 있게 구현되었습니다.
Also applies to: 9-9, 18-22
src/pages/archive/components/MainFolderList/MainFolderList.tsx (1)
62-62: LGTM!홈 페이지에서는 NewFolderMain 컴포넌트를 숨기도록 조건부 렌더링이 올바르게 구현되었습니다. 이는 홈 페이지의 읽기 전용 특성에 부합합니다.
src/types/card/index.ts (1)
1-2: LGTM!카드 타입을 위한 배럴 파일이 표준 패턴에 따라 올바르게 생성되었습니다.
src/apis/note/note.ts (1)
61-64: LGTM!기존 API 함수들과 동일한 패턴을 따르며,
apiGet을 사용하여 최근 즐겨찾기한 노트 목록을 가져오는 함수가 올바르게 구현되었습니다.src/types/folder/folder-response.ts (2)
75-75: LGTM!
markState에 문자열 리터럴 유니온 타입("ACTIVE" | "INACTIVE")을 사용한 것은 boolean보다 타입 안전성이 높고 명시적이어서 좋은 선택입니다.
71-78: Mapping logic is already implemented.The naming difference between
RecentMarkedFolder(name,color) andMainFolderItemProps(folderName,folderColor) is intentional. This follows a consistent pattern where API response types use generic field names while component props use descriptive ones. The required mapping is already implemented insrc/pages/home/hooks/use-home-data.ts(lines 8-13) via themapToMainFolderPropsfunction, which correctly transformsfolder.name→folderNameandfolder.color→folderColor.src/constants/api.ts (1)
7-7: Verify these API endpoints against your backend API specification.The three endpoints defined here (
GET_RECENT_MARKED_FOLDERS,GET_RECENT_MARKED_NOTES,GET_CARDS_SORT_FILTER) are all actively used in the frontend code:
GET_RECENT_MARKED_FOLDERS→src/apis/folder/folder.tsGET_RECENT_MARKED_NOTES→src/apis/note/note.tsGET_CARDS_SORT_FILTER→src/apis/card/card.tsBackend API specification is not available in this repository, so cross-reference these endpoint paths and names with your backend API documentation to ensure alignment.
src/apis/folder/folder.ts (1)
10-45: 최근 즐겨찾기 폴더 조회 API 래핑이 일관되고 안전해 보입니다.
RecentMarkedFoldersResponse와END_POINTS.GET_RECENT_MARKED_FOLDERS를 사용하는 방식이 기존fetchFolderList패턴과 잘 맞고, 별도 파라미터도 없어 사용성이 명확합니다. 추가 수정 없이 그대로 사용해도 될 것 같습니다.src/apis/card/card.ts (1)
1-7: 학습 카드 리스트 API 함수 구현이 타입/엔드포인트와 잘 맞습니다.
FetchStudyCardsParams를 그대로 쿼리 파라미터로 넘기고, 응답을StudyCardListResponse로 받도록 한 구성이 직관적이고 기존 API 유틸 패턴과도 일관됩니다. 별도 이슈 없어 보입니다.src/apis/card/card-queries.ts (1)
1-16: 카드 쿼리 키/옵션 구조가 단순하고 확장하기 좋습니다.
CARD_QUERY_KEY.ALL/LIST로 키를 분리하고,LIST에서params를 키에도 포함시켜 필터 조합별로 캐시를 분리하는 방식이 깔끔합니다. 이후 단건 조회나 기타 옵션이 생겨도 현재 구조에 쉽게 추가할 수 있을 것 같습니다.src/types/note/note-response.ts (1)
63-75: RecentMarkedNote 타입 정의가 홈 화면 매핑 요구사항과 잘 맞습니다.
noteId/name/folder*/flashCardCount/markState/markAt/noteContentPreview구성으로 홈 훅에서NoteItemProps로 매핑하기에 충분한 정보를 담고 있고, 응답 전체를RecentMarkedNotesResponse = RecentMarkedNote[]로 둔 것도 사용성이 좋습니다. 현재 형태로 무리 없이 활용 가능해 보입니다.src/types/card/card-response.ts (1)
1-12: StudyCard/StudyCardListResponse 타입이 학습 카드 도메인을 잘 캡처하고 있습니다.학습 상태(
studyStatus), 노트·폴더 메타 정보, 최근/다음 학습일, 즐겨찾기 상태까지 포함되어 있어서 홈의 “지금 학습하기” 섹션 및 향후 정렬/필터링 요구사항을 커버하기에 충분해 보입니다. 별도 수정 없이 그대로 사용해도 무방해 보입니다.src/apis/folder/folder-queries.ts (1)
3-32: 최근 즐겨찾기 폴더 쿼리 키/옵션이 기존 패턴과 잘 맞습니다.
FOLDER_QUERY_KEY.RECENT_MARKED를 독립 키로 두고, 옵션에서 별도 파라미터 없이fetchRecentMarkedFolders만 호출하도록 분리한 것이 명확합니다. 기존LIST/ALL/ELEMENT와 네이밍·구조가 일관되어 유지보수에도 좋아 보입니다.src/pages/home/index.tsx (1)
6-35: 홈 화면이 훅 기반 실데이터로 자연스럽게 전환되었습니다.
useRecentMarkedFolders/Notes/useScheduledLearningItems를 컴포넌트 상단에서 호출해 각각의 리스트에 바로 내려주는 구조가 단순하고 읽기 좋습니다. 목업 데이터 의존성도 제거되어 실제 API와 동작이 잘 맞을 것 같습니다.추가로, 초기 로딩/빈 배열일 때 각 리스트 컴포넌트가 어떤 UI를 보여주는지만 한 번 확인해 두시면 사용자 경험 측면에서 더 안전할 것 같습니다.
| export interface FetchStudyCardsParams { | ||
| order?: string; | ||
| color?: string; | ||
| studyStatus?: number; | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Cardify API /cards/sort-filter endpoint parameters specification
💡 Result:
I couldn’t find documentation for a Cardify API endpoint named /cards/sort-filter. Which "Cardify" are you using (provide the base URL or a link)? I found several different Cardify sites (Cardify AI, Cardify Africa API, Cardify.cards) but no matching endpoint in their docs. Examples: app.cardify.co (API terms) and cardifyai.com. [1][2]
If you share the base API URL or a docs link, I’ll fetch the exact parameter spec. [1] https://app.cardify.co/api.php
[2] https://cardifyai.com/
🏁 Script executed:
# Search for backend API documentation, specs, or configuration in the codebase
find . -type f \( -name "*.md" -o -name "*.json" -o -name "*.yaml" -o -name "*.yml" -o -name "*api*" -o -name "*spec*" \) | head -30Repository: UMC-CARDIFY/Client
Length of output: 556
🏁 Script executed:
# Look for usage of FetchStudyCardsParams in the codebase
rg "FetchStudyCardsParams" -A 5 -B 2Repository: UMC-CARDIFY/Client
Length of output: 1809
🏁 Script executed:
# Search for any constants or enums related to order, color, or studyStatus
rg "(order|color|studyStatus)" --type ts --type js -B 2 -A 2 | head -100Repository: UMC-CARDIFY/Client
Length of output: 4693
🏁 Script executed:
# Check the API constants definition
cat src/constants/api.tsRepository: UMC-CARDIFY/Client
Length of output: 968
🏁 Script executed:
# Look for the color map to see what colors are valid
fd "color-map" -o "colors"Repository: UMC-CARDIFY/Client
Length of output: 193
🏁 Script executed:
# Search for test files or usage examples of these parameters
fd "\.test\.|\.spec\.|__tests__" -e ts -e tsx | head -20Repository: UMC-CARDIFY/Client
Length of output: 44
🏁 Script executed:
# Look for any documentation or comments about valid parameter values
rg "studyStatus|order.*color" --type ts --type md -B 3 -A 3 | head -80Repository: UMC-CARDIFY/Client
Length of output: 8573
🏁 Script executed:
# Find color-map or colors definition file
find . -type f -name "*color*map*" -o -name "*colors*" | grep -E "\.(ts|js|json)$"Repository: UMC-CARDIFY/Client
Length of output: 110
🏁 Script executed:
# Check README for API documentation
cat README.md | head -100Repository: UMC-CARDIFY/Client
Length of output: 70
🏁 Script executed:
# Look for components that use FetchStudyCardsParams to see example values
rg "fetchStudyCards\|FetchStudyCardsParams" -B 5 -A 10 --type ts --type tsxRepository: UMC-CARDIFY/Client
Length of output: 89
🏁 Script executed:
# Search for color constants or validation
rg "order.*=|color.*=|studyStatus" --type ts -B 2 -A 2 | grep -i "const\|enum\|type" | head -30Repository: UMC-CARDIFY/Client
Length of output: 2995
🏁 Script executed:
# Read the color-map to see valid colors
cat src/styles/color-map.tsRepository: UMC-CARDIFY/Client
Length of output: 288
🏁 Script executed:
# Read colors.ts to see color definitions
cat src/styles/colors.tsRepository: UMC-CARDIFY/Client
Length of output: 2238
🏁 Script executed:
# Search for order value assignments to understand valid values
rg "order.*=" --type ts -B 2 -A 2 | head -60Repository: UMC-CARDIFY/Client
Length of output: 789
🏁 Script executed:
# Search for studyStatus value patterns
rg "studyStatus" --type ts -B 2 -A 2 | head -80Repository: UMC-CARDIFY/Client
Length of output: 781
🏁 Script executed:
# Find and examine the Sort component to see valid order values
find . -type f -name "*Sort*" -o -name "*sort*" | grep -E "\.(ts|jsx)$"Repository: UMC-CARDIFY/Client
Length of output: 44
🏁 Script executed:
# Search for where Sort component is defined and what values it accepts
rg "Sort" --type ts -B 5 -A 15 | grep -A 15 "const Sort\|function Sort\|<Sort" | head -100Repository: UMC-CARDIFY/Client
Length of output: 7825
🏁 Script executed:
# Check if there's any backend documentation or API spec file
find . -type f \( -name "*.md" -o -name "*.swagger*" -o -name "*.openapi*" \) -exec grep -l "cards\|sort-filter" {} \;Repository: UMC-CARDIFY/Client
Length of output: 44
🏁 Script executed:
# Find the SortOrder type definition
rg "type SortOrder|interface SortOrder|enum SortOrder" --type ts -A 5Repository: UMC-CARDIFY/Client
Length of output: 458
🏁 Script executed:
# Search for Sort component definition to see what values it accepts
rg "const Sort|function Sort|export.*Sort" --type ts -B 2 -A 20 | head -100Repository: UMC-CARDIFY/Client
Length of output: 3266
🏁 Script executed:
# Check for any validation or constants related to sort/filter parameters
rg "edit-newest|card-most|card-less" --type ts -B 2 -A 2Repository: UMC-CARDIFY/Client
Length of output: 4982
🏁 Script executed:
# Search for studyStatus-related constants or type definitions
rg "studyStatus" --type ts -B 5 -A 5Repository: UMC-CARDIFY/Client
Length of output: 1452
🏁 Script executed:
# Check if there are any constants or enums for card study states
rg "study|card.*status|STUDY" --type ts | grep -i "const\|enum\|type" | head -30Repository: UMC-CARDIFY/Client
Length of output: 229
🏁 Script executed:
# Look at how studyStatus is used in components
rg "completedCards\|studyStatus" --type ts -B 3 -A 3 | head -80Repository: UMC-CARDIFY/Client
Length of output: 44
파라미터 타입을 더욱 구체적으로 정의해주세요.
order 파라미터는 기존 SortOrder 타입("asc" | "desc" | "edit-newest" | "edit-oldest")을 사용하고, color는 유효한 색상 값(blue, ocean, lavender, mint, sage, gray, orange, coral, rose, plum)의 union 타입으로 변경해주세요. 또한 studyStatus의 유효한 값 범위가 문서화되어 있지 않으므로 개발팀과 확인하여 주석으로 명시해주세요.
🤖 Prompt for AI Agents
In src/types/card/card-request.ts around lines 1 to 5, the FetchStudyCardsParams
interface uses overly broad primitive types; change order to the existing
SortOrder union ("asc" | "desc" | "edit-newest" | "edit-oldest") (import
SortOrder if it lives elsewhere), change color to a union of valid color strings
(blue | ocean | lavender | mint | sage | gray | orange | coral | rose | plum),
and add a concise comment above studyStatus documenting the validated/allowed
numeric range (confirm exact values with the dev team and then annotate the
field comment accordingly); update imports and/or exports as needed to reference
SortOrder.
There was a problem hiding this comment.
이거 한번 확인좀 부탁드려요 !! 백엔드에서 전달해주는거!
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for API documentation, OpenAPI specs, or backend contracts
echo "=== Searching for API documentation files ==="
find . -type f \( -name "*.md" -o -name "swagger*" -o -name "openapi*" -o -name "*api-spec*" -o -name "*api-doc*" \) 2>/dev/null | head -20
echo -e "\n=== Searching for README files ==="
find . -name "README*" -type f 2>/dev/null
echo -e "\n=== Checking for API documentation directories ==="
find . -type d -name "*doc*" -o -name "*spec*" 2>/dev/null | grep -i api | head -10
echo -e "\n=== Searching for backend type definitions or contracts ==="
rg -t ts -t json "cards.*sort.*filter|GET_CARDS_SORT_FILTER" -B 2 -A 5 | head -50
Length of output: 666
🏁 Script executed:
#!/bin/bash
# Check if there's a docs folder or API specification
echo "=== Looking for docs folder ==="
ls -la docs/ 2>/dev/null || echo "No docs folder found"
echo -e "\n=== Checking for any .http or .rest files (API testing files) ==="
find . -type f \( -name "*.http" -o -name "*.rest" \) 2>/dev/null
echo -e "\n=== Searching for backend repository references or submodules ==="
cat .gitmodules 2>/dev/null || echo "No submodules"
echo -e "\n=== Checking package.json for any backend-related scripts or links ==="
jq -r '.repository, .scripts, .devDependencies, .dependencies' package.json 2>/dev/null | head -30
Length of output: 1238
🏁 Script executed:
#!/bin/bash
# Search for any comments or documentation about the /cards/sort-filter endpoint
echo "=== Searching for comments about cards endpoint parameters ==="
rg -t ts -t tsx "cards.*sort|sort.*filter|FetchStudyCardsParams" -B 5 -A 5 | head -100
echo -e "\n=== Looking for JSDoc or comments near the endpoint usage ==="
rg -t ts "@param|@returns|\/\*\*.*cards" -B 2 -A 8 | head -50
Length of output: 265
🏁 Script executed:
#!/bin/bash
# Check if there's any backend documentation in common locations
echo "=== Checking common documentation locations ==="
for file in API.md api.md BACKEND.md backend.md docs/API.md docs/api.md; do
if [ -f "$file" ]; then
echo "Found: $file"
cat "$file"
fi
done
echo -e "\n=== Searching content of any markdown files for API or endpoint info ==="
find . -name "*.md" -type f -exec grep -l "cards\|endpoint\|API" {} \; 2>/dev/null | head -10
Length of output: 121
🏁 Script executed:
#!/bin/bash
# Check actual usage of fetchStudyCards to see what values are being passed
echo "=== Checking actual usage of fetchStudyCards ==="
rg "fetchStudyCards|CARD_QUERY_OPTION.LIST" -B 3 -A 3
echo -e "\n=== Looking for any test files or examples ==="
find . -name "*.test.ts" -o -name "*.spec.ts" -o -name "*.test.tsx" -o -name "*.spec.tsx" 2>/dev/null
echo -e "\n=== Checking the use-home-data.ts for actual parameter usage ==="
cat src/pages/home/hooks/use-home-data.ts
Length of output: 3721
🏁 Script executed:
#!/bin/bash
# Check if there's a backend repository link in GitHub or any documentation
echo "=== Checking for backend repository references ==="
rg -i "backend|server|api.*repo" -g "*.md" -g "*.json" -g "*.txt"
echo -e "\n=== Looking for any Notion, Confluence, or external doc links ==="
rg -i "notion|confluence|docs\.google|swagger|postman" -g "*.md"
echo -e "\n=== Checking README content ==="
cat README.md
Length of output: 159
🏁 Script executed:
#!/bin/bash
# Search for backend or server repositories in the same organization
echo "=== Searching for backend repositories in UMC-CARDIFY organization ==="
gh repo list UMC-CARDIFY --limit 20 --json name,description,url
echo -e "\n=== Checking current repository information ==="
gh repo view --json name,url,description
Length of output: 495
@Sohyunnnn, 프론트엔드 레포지토리에서 백엔드 API 명세를 찾을 수 없었습니다. 하지만 같은 조직의 백엔드 레포지토리를 찾았습니다:
🔗 https://github.com/UMC-CARDIFY/Server
백엔드 팀에 다음 정보를 확인해주세요:
확인이 필요한 파라미터 정보
1. order 파라미터
- 현재 사용 중인 값:
"edit-newest"(use-home-data.ts에서) - 확인 필요: 전체 허용 값 목록 (예: "asc", "desc", "edit-newest", "edit-oldest" 등)
2. color 파라미터
- 확인 필요: 허용되는 색상 값 목록
- 프론트엔드에서 사용 중인 색상들: blue, ocean, lavender, mint, sage, gray, orange, coral, rose, plum
3. studyStatus 파라미터
- 확인 필요:
- 허용되는 숫자 범위 (예: 0-5)
- 각 숫자가 의미하는 학습 상태
추천 방법
백엔드 팀에서 정보를 받으면:
- 백엔드 레포에서 Swagger/OpenAPI 문서 확인
- 또는
/cards/sort-filter엔드포인트의 컨트롤러 코드 확인 - 정보를 받은 후 타입을 더 구체적으로 수정 (union 타입으로)
백엔드 팀 확인 후 알려주시면, 타입 정의를 더 구체적으로 개선하는 것을 도와드리겠습니다! 🐰
| PATCH_FOLDERS: (folderId: number) => `/folders/${folderId}`, | ||
| DELETE_FOLDER: (folderId: number) => `/folders/${folderId}`, |
There was a problem hiding this comment.
이거 지금보니까 둘이 똑같은데 하나로 합치는 거는 어떤가요 ??
There was a problem hiding this comment.
하나로 통일하면 사용하는 곳에서 코드 읽기가 어려울 것 같아서, 저는 개인적으로 분리하는게 낫다고 생각합니다!
나중에 의논해보면 좋을 것 같아용
| export interface FetchStudyCardsParams { | ||
| order?: string; | ||
| color?: string; | ||
| studyStatus?: number; | ||
| } |
There was a problem hiding this comment.
이거 한번 확인좀 부탁드려요 !! 백엔드에서 전달해주는거!
There was a problem hiding this comment.
이것도 컨벤션.. 통일하면 좋을 거 같습니다! 얘기 나눠보기
| folderId: number; | ||
| name: string; | ||
| color: string; | ||
| markState: "ACTIVE" | "INACTIVE"; |
There was a problem hiding this comment.
markState response 에서 계속 쓰이고 있어서 전역에 type을 추가해두는 건 어떤지.. 생각이 들어요!.. 전체적으로 ..
There was a problem hiding this comment.
저도 그 생각을 했었는데, markState가 API별로 타입이 달라서 전역 타입으로 올리기엔 애매한 것 같아요..
이게 또 노트 쪽에서는 boolean 값으로 와서........ 하나로 통합하기가 애매....한데
Summary
홈 API 연동
Tasks
Screenshot
Summary by CodeRabbit
릴리스 노트
새로운 기능
UI/UX 개선
✏️ Tip: You can customize this high-level summary in your review settings.