Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8715b4d
init: add kakao login sdk
gdaegeun539 Oct 3, 2025
a4b3b1d
feat: implement kakao auth data source
gdaegeun539 Oct 3, 2025
0af1915
chore: change gradlew permission to 755
gdaegeun539 Oct 4, 2025
9e6b7e2
chore: modify ai agent rules
gdaegeun539 Oct 4, 2025
c15a24c
feat: add token models
gdaegeun539 Oct 4, 2025
40b7f8b
feat: covert kakao oauth token to common model
gdaegeun539 Oct 4, 2025
b1c1bc2
ci: exclude TooManyFunctions rule at datasource
gdaegeun539 Oct 4, 2025
b44658b
chore: modify ai agent rules
gdaegeun539 Oct 4, 2025
14a897c
build: Add DataStore dependency for token persistence
gdaegeun539 Oct 4, 2025
d80b745
feat: Add string parsing to OAuthProvider enum
gdaegeun539 Oct 4, 2025
a47b341
feat: Add AuthLocalDataSource for token persistence
gdaegeun539 Oct 4, 2025
4d642a8
feat: Add AuthManager for centralized auth state
gdaegeun539 Oct 4, 2025
7fe87b4
feat: Add AuthInterceptor for automatic token injection
gdaegeun539 Oct 4, 2025
761a8e1
feat: Integrate AuthManager into AuthRepository
gdaegeun539 Oct 4, 2025
b274429
feat: Add Hilt dependency injection module
gdaegeun539 Oct 4, 2025
00a7dc3
feat: move profile image type to domain
gdaegeun539 Oct 5, 2025
f506344
init: add serializer, okhttp logger
gdaegeun539 Oct 5, 2025
fe80d5e
feat: add auth api service, model, server dto
gdaegeun539 Oct 5, 2025
d2bc19c
feat: implement jwt rtr authenticator logic
gdaegeun539 Oct 5, 2025
3071e8f
feat: set okhttp, retrofit, api service
gdaegeun539 Oct 5, 2025
d7957e1
ci: exclude authenticator retruncount check
gdaegeun539 Oct 5, 2025
b19923a
feat: modify reissue token api request body
gdaegeun539 Oct 5, 2025
85ec761
feat: modify signIn, signUp api service
gdaegeun539 Oct 12, 2025
70b4824
feat: add httpexception to serverdto converter
gdaegeun539 Oct 12, 2025
0c6e10c
feat: add own server exception
gdaegeun539 Oct 12, 2025
4937bde
feat: allow authmanager save own server jwt only
gdaegeun539 Oct 12, 2025
41dbaa8
feat: implement server remote source
gdaegeun539 Oct 12, 2025
a6aaeef
feat: connect remote source to auth repository
gdaegeun539 Oct 12, 2025
311d13b
refactor: remove unused annotation in auth repo
gdaegeun539 Oct 12, 2025
3283ef7
fix: fix serializer version typo
gdaegeun539 Oct 12, 2025
5e02a6d
fix: fix profiletype import path
gdaegeun539 Oct 12, 2025
ee2fc96
init: hilt plugin, application setting
gdaegeun539 Oct 13, 2025
6ad2758
fix: datasource hilt binding fix
gdaegeun539 Oct 13, 2025
cc2c9bc
feat: di loginViewModel with hilt
gdaegeun539 Oct 13, 2025
a77772c
refactor: utilize kakao token convertor
gdaegeun539 Nov 2, 2025
20b85b5
refactor: remove context from kakao auth source
gdaegeun539 Nov 2, 2025
e23c1ff
refactor: let login view integrate login sdk
gdaegeun539 Nov 2, 2025
b7a7b98
feat: allow sever connection to http
gdaegeun539 Nov 2, 2025
ad35758
feat: add app version, logging interceptor
gdaegeun539 Nov 2, 2025
2694422
docs: social login architecture helper doc add
gdaegeun539 Nov 2, 2025
4e63bfd
refactor: fix missing newline issue
gdaegeun539 Nov 2, 2025
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
104 changes: 104 additions & 0 deletions .cursor/rules/experimental-annotations.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Kotlin Experimental API 사용 규칙

## ⚠️ **@OptIn 및 Experimental Import 보호**

### 핵심 원칙

**개발자가 수동으로 추가한 `@OptIn` 어노테이션 및 관련 Experimental import는 절대 삭제하지 마세요.**

### 배경

- Kotlin의 실험적(Experimental) API를 사용할 때는 `@OptIn` 어노테이션이 필요합니다
- `@OptIn`에 전달된 Experimental 클래스는 반드시 import 되어야 합니다
- IDE나 도구가 "unused import"로 표시하더라도, 이는 어노테이션에서 사용되므로 **필수 import**입니다

### 예시

```kotlin
// ✅ 올바른 패턴 - Experimental import와 @OptIn 함께 사용
import kotlin.time.ExperimentalTime
import kotlin.time.Instant
import kotlin.time.Clock

@OptIn(ExperimentalTime::class) // ExperimentalTime import 필요!
data class OAuthToken(
val expiresAt: Instant? = null
) {
fun isExpired(now: Instant = Clock.System.now()): Boolean {
return expiresAt?.let { it < now } ?: false
}
}
```

```kotlin
// ❌ 잘못된 패턴 - import 삭제하면 컴파일 에러
// import kotlin.time.ExperimentalTime // ← 삭제하지 마세요!
import kotlin.time.Instant
import kotlin.time.Clock

@OptIn(ExperimentalTime::class) // ❌ ERROR: Unresolved reference: ExperimentalTime
data class OAuthToken(...)
```

### AI Agent 지침

1. **Import 분석 시:**

- `@OptIn(...)` 어노테이션에 사용된 클래스의 import는 **절대 삭제 금지**
- 다음 패턴들을 주의깊게 확인:
```kotlin
import kotlin.time.ExperimentalTime
import kotlinx.coroutines.ExperimentalCoroutinesApi
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.material3.ExperimentalMaterial3Api
```

2. **코드 수정 시:**

- `@OptIn` 어노테이션이 있는 파일을 수정할 때는 관련 import를 유지하세요
- detekt나 IDE가 "unused import" 경고를 표시해도 무시하세요
- 개발자가 명시적으로 제거를 요청하기 전까지는 유지하세요

3. **Import 정리 시:**
- `@OptIn` 스캔 먼저 수행
- 어노테이션에 사용된 모든 클래스 import 보존
- 기타 import만 정리

### 일반적인 Experimental API 목록

#### Kotlin 표준 라이브러리

- `kotlin.time.ExperimentalTime` - Time API (일부는 안정화됨)
- `kotlin.ExperimentalStdlibApi` - 표준 라이브러리 실험적 기능
- `kotlin.ExperimentalUnsignedTypes` - 부호 없는 타입

#### Coroutines

- `kotlinx.coroutines.ExperimentalCoroutinesApi` - 코루틴 실험적 API
- `kotlinx.coroutines.FlowPreview` - Flow 미리보기 기능

#### Compose

- `androidx.compose.ui.ExperimentalComposeUiApi`
- `androidx.compose.foundation.ExperimentalFoundationApi`
- `androidx.compose.material3.ExperimentalMaterial3Api`
- `androidx.compose.animation.ExperimentalAnimationApi`

#### kotlinx 라이브러리

- `kotlinx.serialization.ExperimentalSerializationApi`
- `kotlinx.datetime.ExperimentalDateTimeApi` (현재는 대부분 안정화)

### 체크리스트

코드 수정 전에 다음을 확인하세요:

- [ ] 파일에 `@OptIn` 어노테이션이 있는가?
- [ ] `@OptIn`에 전달된 클래스가 import 되어 있는가?
- [ ] import 정리 시 Experimental import를 보존했는가?
- [ ] detekt 실행 시 `UnusedImport` 경고가 있더라도 `@OptIn` 관련 import는 유지했는가?

## 📌 요약

> **Golden Rule**: `@OptIn` 어노테이션과 함께 사용되는 Experimental import는 **코드에서 보이지 않아도 필수적**입니다. 절대 삭제하지 마세요!
248 changes: 248 additions & 0 deletions .cursor/rules/git-commit-guidelines.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
---
description: Git commit message guidelines for AI agents and developers
---

# Git Commit Message Guidelines

## Core Principle

Good Git commit messages are the most effective way to communicate the **context** of code changes. While diffs show **what** changed, only commit messages can explain **why** the change was made.

## ⚠️ CRITICAL: English Only

**All commit messages MUST be written in English.**

- Ensures international collaboration compatibility
- Clear communication of technical terminology
- Standardizes Git history across the codebase

## Team Commit Prefix Convention

Use the following prefixes to clarify the type of change:

- `init:` - Initial setup
- `feat:` - New feature
- `docs:` - Documentation changes
- `build:` - Build system or dependency changes
- `design:` - UI/UX design changes
- `fix:` - Bug fixes
- `chore:` - Other minor changes (cleanup, formatting, etc.)
- `refactor:` - Code refactoring (no functionality change)
- `ci:` - CI configuration changes (e.g., detekt.yml, GitHub Actions)
- `test:` - Test code changes

**Format**: `prefix: message` (lowercase prefix + colon + space + message)

**Examples**:

```
feat: Add Kakao login feature
fix: Resolve token refresh error
ci: Optimize detekt rules
design: Update main screen layout
refactor: Extract authentication logic to separate class
```

## The 7 Essential Rules

### 1. Separate Subject from Body with a Blank Line

```
Subject: Summary of changes

Body: Detailed explanation (if needed)
```

The subject line and body should be separated by a blank line. Some Git commands (like `git log --oneline`) only show the subject line.

### 2. Limit Subject Line to 50 Characters

- **Recommended**: Within 50 characters
- **Hard limit**: 72 characters

This ensures readability in various Git tools and interfaces.

### 3. Capitalize the First Letter of Subject

```
✅ feat: Add user authentication
✅ fix: Resolve login validation bug

❌ feat: add user authentication
❌ fix: resolved login validation bug
```

### 4. Do Not End Subject Line with a Period

```
✅ fix: Resolve login validation bug
❌ fix: Resolve login validation bug.
```

The subject line is a title, not a sentence.

### 5. Use Imperative Mood in Subject Line

```
✅ feat: Add new feature
✅ fix: Fix critical bug
✅ refactor: Remove deprecated code

❌ feat: Added new feature
❌ fix: Fixed critical bug
❌ refactor: Removing deprecated code
```

**Test**: "If applied, this commit will [subject]" should read naturally.

Examples:

- "If applied, this commit will **Add new feature**" ✅
- "If applied, this commit will **Added new feature**" ❌

### 6. Wrap Body at 72 Characters

Git does not automatically wrap text, so you need to manually insert line breaks to ensure readability in all Git tools.

### 7. Use Body to Explain What and Why, Not How

- ✅ Explain **why** the change is needed
- ✅ Describe **what problem** it solves
- ✅ Note any **side effects** or **considerations**
- ❌ Don't explain **how** (the code shows that)

The code itself shows how the change works. The commit message should explain the reasoning and context.

## Commit Message Template

```
prefix: Subject line within 50 characters

Body (if needed):
- Why is this change necessary?
- What problem does it solve?
- Are there any side effects or considerations?

Issue references:
Resolves: #123
See also: #456
```

## Real-World Examples

### Good Commit Messages

**Feature Addition:**

```
feat: Add user session timeout feature

Implement automatic logout after 30 minutes of inactivity
to enhance security. Users receive a warning 5 minutes before
timeout with an option to extend the session.

- Add session monitoring service
- Implement warning modal component
- Update authentication middleware

Resolves: #234
```

**Bug Fix:**

```
fix: Resolve token refresh infinite loop

Token refresh was triggering multiple simultaneous requests
causing race conditions and duplicate API calls. Add mutex
lock to ensure only one refresh attempt at a time.

This fixes the issue where users were logged out randomly
during active sessions.

Resolves: #456
```

**CI Configuration:**

```
ci: Update detekt configuration

Enable autoCorrect and add exception rules for Composable
functions to improve code quality automation and reduce
false positives.

Changes:
- Set autoCorrect: true for automatic formatting
- Add Composable complexity exception
- Add modifier unused parameter exception

Resolves: #789
```

**Refactoring:**

```
refactor: Extract auth logic to AuthManager

Move authentication logic from repository to dedicated
manager class to improve separation of concerns and
make the code more testable.

- Create AuthManager with token management
- Update AuthRepository to delegate to manager
- Add unit tests for new manager class
```

### Bad Commit Messages

```
❌ fixed stuff
❌ updated files
❌ minor changes
❌ bug fix
❌ update code
❌ WIP
❌ feat: 카카오 로그인 추가 (Korean - must be English)
❌ Fix login. (period at end)
❌ feat: Added feature (past tense)
```

## Atomic Commits

Follow the atomic commit principle:

- **One logical change per commit**: Each commit should represent a single, cohesive change
- **Independently buildable**: Each commit should compile and pass tests on its own
- **Separate unrelated changes**: Split unrelated modifications into separate commits

**Good practice:**

```
Commit 1: feat: Add AuthManager class
Commit 2: refactor: Update AuthRepository to use AuthManager
Commit 3: test: Add unit tests for AuthManager
```

**Bad practice:**

```
Commit 1: Update auth system, fix typos, and refactor UI components
```

## AI Agent Instructions

When creating commits:

1. **Always write in English** - No exceptions
2. **Use appropriate prefix** - Select from the team convention list
3. **Write clear subject lines** - Concise, imperative mood, under 50 chars
4. **Add body when needed** - Explain why for non-trivial changes
5. **Reference issues** - Use "Resolves: #123" format when applicable
6. **Keep commits atomic** - One logical change per commit

## References

- [How to Write a Git Commit Message](https://cbea.ms/git-commit/)
- [Conventional Commits](https://www.conventionalcommits.org/)
- [Git Best Practices](https://git-scm.com/book)
Loading
Loading