Skip to content
Open
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
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,38 @@ jobs:
fi
echo "✓ 템플릿 위치 정상"

- name: 알려진 시크릿 형식 검사
run: |
if git grep -nE 'AIza[0-9A-Za-z_-]{30,}|-----BEGIN (EC |RSA )?PRIVATE KEY-----' -- . ':!proxy-vercel/test/*'; then
echo "::error::API 키 또는 개인 키로 보이는 값이 추적 파일에 있습니다"
exit 1
fi
echo "✓ 알려진 시크릿 형식 없음"

proxy:
name: 프록시 테스트
runs-on: ubuntu-latest
defaults:
run:
working-directory: proxy-vercel
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: proxy-vercel/package-lock.json

- name: 의존성 설치
run: npm ci

- name: 문법 검사
run: npm run check

- name: 단위 테스트
run: npm test

format:
name: swift-format
runs-on: macos-15
Expand Down
4 changes: 4 additions & 0 deletions Config/Paxo.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
Expand Down
22 changes: 16 additions & 6 deletions Config/Paxo.storekit
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@
"introductoryOffer" : {
"internalID" : "A1B2C3D4E5F60011",
"paymentMode" : "free",
"subscriptionPeriod" : "P1W"
"subscriptionPeriod" : "P3D"
},
"localizations" : [
{
"description" : "풀이와 해설 무제한",
"displayName" : "Paxo Pro 월간",
"description" : "Up to 100 AI solutions and explanations per day",
"displayName" : "Paxo Pro Monthly",
"locale" : "en_US"
},
{
"description" : "하루 최대 100회 AI 풀이 및 해설",
"displayName" : "Paxo Pro 월간",
"locale" : "ko_KR"
}
],
"productID" : "com.hyeseong.Paxo.pro.monthly",
Expand All @@ -60,13 +65,18 @@
"introductoryOffer" : {
"internalID" : "A1B2C3D4E5F60012",
"paymentMode" : "free",
"subscriptionPeriod" : "P1W"
"subscriptionPeriod" : "P3D"
},
"localizations" : [
{
"description" : "풀이와 해설 무제한 (연간, 약 33% 할인)",
"displayName" : "Paxo Pro 연간",
"description" : "Up to 100 AI solutions and explanations per day",
"displayName" : "Paxo Pro Yearly",
"locale" : "en_US"
},
{
"description" : "하루 최대 100회 AI 풀이 및 해설",
"displayName" : "Paxo Pro 연간",
"locale" : "ko_KR"
}
],
"productID" : "com.hyeseong.Paxo.pro.yearly",
Expand Down
3 changes: 0 additions & 3 deletions Paxo.xcodeproj/xcshareddata/xcschemes/Paxo.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@
ReferencedContainer = "container:Paxo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<StoreKitConfigurationFileReference
identifier = "../../Config/Paxo.storekit">
</StoreKitConfigurationFileReference>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
7 changes: 4 additions & 3 deletions Paxo/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@

## 6. 과금 비즈니스 로직 (수정 전 필독)

무료 사용량 차감 규칙은 비대칭적이며, 이는 서비스 매출과 직결되는 핵심 경로(Critical Path)다.
사용량의 정본은 서버 Redis이며, 이는 서비스 매출과 직결되는 핵심 경로(Critical Path)다.

* 무료 횟수는 **API 정답 호출이 성공한 직후에만** 1회 차감한다.
* 무료 3회와 Pro 100회 한도는 **API 정답 호출이 성공한 직후에만** 서버에서 1회 차감한다.
* 해설 생성(2차 호출)이 실패하더라도 **횟수를 재차감하지 않는다.** (정답을 이미 제공받았기 때문)
* 무료 횟수 소진 여부 및 페이월(Paywall) 표시는 **캡처를 실행하기 전**에 사전 검증한다.
* 횟수 소진 여부 및 페이월(Paywall) 표시는 **캡처를 실행하기 전**에 서버 세션으로 사전 검증한다.
* `StoreManager.isPro`와 로컬 값으로 AI 접근을 허용하지 않는다. 서버가 반환한 tier만 사용한다.
* 토스트 모드(Toast Mode)에서는 의도적으로 해설 API를 호출하지 않도록 제어해야 한다.
Loading
Loading