Skip to content

Commit c552826

Browse files
authored
Merge pull request #282 from YAPP-Github/develop
[RELEASE] 1.5.0
2 parents deb3f59 + 932eb47 commit c552826

62 files changed

Lines changed: 1685 additions & 428 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coderabbit.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
language: ko-KR
2+
3+
tone_instructions: '왜 개선이 필요한지 먼저 설명. 리뷰 순서: 1) 문제 상황 2) 해결 방향 제안 3) 추천과 이유 4) 개선 효과. 선택지를 주되 경험 기반 추천도 함께. 부드럽고 건설적으로!'
4+
5+
reviews:
6+
profile: assertive
7+
request_changes_workflow: false
8+
poem: false
9+
auto_review:
10+
enabled: true
11+
auto_incremental_review: true
12+
ignore_title_keywords: ['RELEASE']
13+
14+
path_instructions:
15+
- path: 'src/**/*.{ts,tsx}'
16+
instructions: |
17+
다음 항목들을 우선적으로 검사해주세요:
18+
19+
**Readability (가독성)**
20+
- 매직 넘버는 명명된 상수로 변경했는가? (예: 300ms → ANIMATION_DELAY_MS)
21+
- 복잡한 삼항연산자는 if문 또는 switch문으로 처리하거나 컴포넌트를 분리했는가?
22+
- 복잡한 조건은 의미 있는 변수명을 가지는가? (예: isValidEmail, hasRequiredRole)
23+
- 구현 디테일이 추상화되어 있는가? (복잡한 로직 → 별도 컴포넌트/훅)
24+
25+
**Predictability (예측 가능성)**
26+
- 유사한 함수/훅들의 반환 타입이 일관적인가?
27+
- 함수명이 실제 동작을 명확히 나타내는가?
28+
- 숨겨진 사이드 이펙트가 있는가? (SRP 위반)
29+
30+
**Coupling (결합도)**
31+
- Props drilling이 과도하지 않은가? (5개 이상 props는 컴포지션 검토)
32+
- 상태 관리 범위가 너무 넓지 않은가? (필요한 상태만 선택)
33+
34+
**Cohesion (응집도)**
35+
- 파일이 도메인/기능별로 잘 구성되어 있는가?
36+
37+
**프로젝트 규칙**
38+
- 'let' 사용을 최소화했는가? (const/메서드 체이닝 선호)
39+
- React Query 사용했는가? (데이터 페칭)
40+
- 에러 핸들링이 고려되었는가?
41+
42+
- path: 'src/**/*.tsx'
43+
instructions: |
44+
- Props가 5개 이상인가? (컴포지션 고려)
45+
- 조건부 렌더링이 복잡한가? (별도 컴포넌트로 분리 제안)
46+
- useEffect를 최소화했는가? (파생 상태 사용)
47+
- 컴포넌트가 단일 책임을 가지는가?
48+
49+
- path: 'src/**/*.ts'
50+
instructions: |
51+
**Query 함수 (`*Query`, `useXXXQuery`)**
52+
- queryKey가 명확하고 캐싱 전략이 적절한가?
53+
- staleTime, gcTime 설정이 필요한가?
54+
- 데이터 변환 로직이 필요한가?
55+
- 의존성 배열이 정확한가?
56+
57+
**Mutation 함수 (`*Mutation`, `useXXXMutation`)**
58+
- onSuccess, onError 핸들러가 제대로 정의되었는가?
59+
- 낙관적 업데이트(optimisticData)가 필요한가?
60+
- invalidateQueries로 관련 쿼리를 무효화하는가?
61+
- 에러 발생 시 롤백 로직이 있는가?
62+
- 로딩/성공/에러 상태를 어떻게 처리하는가?
63+
64+
**주의 사항**
65+
- useQuery/useMutation을 직접 컴포넌트에서 사용하지 않았는가? (커스텀 훅으로 래핑했는가?)
66+
- 토큰/인증 헤더가 올바르게 설정되었는가?
67+
68+
- path: 'src/schema/**/*.ts'
69+
instructions: |
70+
- Zod 스키마 메시지는 사용자 친화적인가?
71+
- 모든 필드에 적절한 검증이 있는가?
72+
- 에러 메시지가 명확한가?
73+
74+
# 지식 기반 설정
75+
knowledge_base:
76+
code_guidelines:
77+
filePatterns:
78+
- '.cursor/rules/**/*.mdc'
79+
- 'README.md'

.cursor/rules/nextjs-sentry.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
alwaysApply: true
2+
alwaysApply: false
33
---
44

55
These examples should be used as guidance when configuring Sentry functionality within a project.

.cursor/rules/zod.mdc

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
alwaysApply: true
3+
---
4+
5+
You are an expert developer proficient in TypeScript, React and Next.js, Zod, TanStack React Query
6+
7+
Code Style and Structure
8+
9+
- Write concise, technical TypeScript code with accurate examples.
10+
- Use functional and declarative programming patterns; avoid classes.
11+
- Prefer iteration and modularization over code duplication.
12+
- Use descriptive variable names with auxiliary verbs (e.g., `isLoading`, `hasError`).
13+
- Structure files with exported components, subcomponents, helpers, static content, and types.
14+
- Favor named exports for components and functions.
15+
- Use lowercase with dashes for directory names (e.g., `components/auth-wizard`).
16+
17+
TypeScript and Zod Usage
18+
19+
- Use TypeScript for all code; prefer interfaces over types for object shapes.
20+
- Utilize Zod for schema validation and type inference.
21+
- Avoid enums; use literal types or maps instead.
22+
- Implement functional components with TypeScript interfaces for props.
23+
24+
Syntax and Formatting
25+
26+
- Use the `function` keyword for pure functions.
27+
- Write declarative JSX with clear and readable structure.
28+
- Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
29+
30+
UI and Styling
31+
32+
- Use Tamagui for cross-platform UI components and styling.
33+
- Implement responsive design with a mobile-first approach.
34+
- Ensure styling consistency between web and native applications.
35+
- Utilize Tamagui's theming capabilities for consistent design across platforms.
36+
37+
State Management and Data Fetching
38+
39+
- Use Zustand for state management.
40+
- Use TanStack React Query for data fetching, caching, and synchronization.
41+
- Minimize the use of `useEffect` and `setState`; favor derived state and memoization when possible.
42+
43+
Internationalization
44+
45+
- Use i18next and react-i18next for web applications.
46+
- Use expo-localization for React Native apps.
47+
- Ensure all user-facing text is internationalized and supports localization.
48+
49+
Error Handling and Validation
50+
51+
- Prioritize error handling and edge cases.
52+
- Handle errors and edge cases at the beginning of functions.
53+
- Use early returns for error conditions to avoid deep nesting.
54+
- Utilize guard clauses to handle preconditions and invalid states early.
55+
- Implement proper error logging and user-friendly error messages.
56+
- Use custom error types or factories for consistent error handling.
57+
58+
Performance Optimization
59+
60+
- Optimize for both web and mobile performance.
61+
- Use dynamic imports for code splitting in Next.js.
62+
- Implement lazy loading for non-critical components.
63+
- Optimize images use appropriate formats, include size data, and implement lazy loading.
64+
65+
Monorepo Management
66+
67+
- Follow best practices using Turbo for monorepo setups.
68+
- Ensure packages are properly isolated and dependencies are correctly managed.
69+
- Use shared configurations and scripts where appropriate.
70+
- Utilize the workspace structure as defined in the root `package.json`.
71+
72+
Backend and Database
73+
74+
- Use Supabase for backend services, including authentication and database interactions.
75+
- Follow Supabase guidelines for security and performance.
76+
- Use Zod schemas to validate data exchanged with the backend.
77+
78+
Cross-Platform Development
79+
80+
- Use Solito for navigation in both web and mobile applications.
81+
- Implement platform-specific code when necessary, using `.native.tsx` files for React Native-specific components.
82+
- Handle images using `SolitoImage` for better cross-platform compatibility.
83+
84+
Stripe Integration and Subscription Model
85+
86+
- Implement Stripe for payment processing and subscription management.
87+
- Use Stripe's Customer Portal for subscription management.
88+
- Implement webhook handlers for Stripe events (e.g., subscription created, updated, or cancelled).
89+
- Ensure proper error handling and security measures for Stripe integration.
90+
- Sync subscription status with user data in Supabase.
91+
92+
Testing and Quality Assurance
93+
94+
- Write unit and integration tests for critical components.
95+
- Use testing libraries compatible with React and React Native.
96+
- Ensure code coverage and quality metrics meet the project's requirements.
97+
98+
Project Structure and Environment
99+
100+
- Follow the established project structure with separate packages for `app`, `ui`, and `api`.
101+
- Use the `apps` directory for Next.js and Expo applications.
102+
- Utilize the `packages` directory for shared code and components.
103+
- Use `dotenv` for environment variable management.
104+
- Follow patterns for environment-specific configurations in `eas.json` and `next.config.js`.
105+
- Utilize custom generators in `turbo/generators` for creating components, screens, and tRPC routers using `yarn turbo gen`.
106+
107+
Key Conventions
108+
109+
- Use descriptive and meaningful commit messages.
110+
- Ensure code is clean, well-documented, and follows the project's coding standards.
111+
- Implement error handling and logging consistently across the application.
112+
113+
Follow Official Documentation
114+
115+
- Adhere to the official documentation for each technology used.
116+
- For Next.js, focus on data fetching methods and routing conventions.
117+
- Stay updated with the latest best practices and updates, especially for Expo, Tamagui, and Supabase.
118+
119+
Output Expectations
120+
121+
- Code Examples Provide code snippets that align with the guidelines above.
122+
- Explanations Include brief explanations to clarify complex implementations when necessary.
123+
- Clarity and Correctness Ensure all code is clear, correct, and ready for use in a production environment.
124+
- Best Practices Demonstrate adherence to best practices in performance, security, and maintainability.

src/apis/post.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ export interface ExperimentPostListFilters {
4646
count?: number;
4747
}
4848

49+
export interface ExtractKeywordsLimitResponse {
50+
count: number;
51+
limit: number;
52+
remainingCount: number;
53+
resetsAt: string;
54+
}
55+
4956
export const fetchPostList = async (params: ExperimentPostListFilters) => {
5057
const queryParams = getQueryParamsToString({ ...params });
5158
return await fetchClient.get<ExperimentPostResponse>(API_URL.postList(queryParams), {
@@ -56,3 +63,7 @@ export const fetchPostList = async (params: ExperimentPostListFilters) => {
5663
export const fetchPostCount = async <T>(region?: string | null) => {
5764
return await fetchClient.get<T>(API_URL.postArea(region), { requireAuth: false });
5865
};
66+
67+
export const fetchExtractKeywordsLimit = async () => {
68+
return await fetchClient.get<ExtractKeywordsLimitResponse>(API_URL.extractKeywordsLimit);
69+
};

0 commit comments

Comments
 (0)