This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
ํ๊ตญ์ด๋ก ์ ๋ ฅ์ ๋ฐ์ผ๋ฉด ์์ด๋ก ์๊ฐํ๊ณ ์ถ๋ก ํ ๋ค, ์ต์ข ๋ต๋ณ์ ํ๊ตญ์ด๋ก ์์ฑํฉ๋๋ค.
agit.gg ์น ์ฑ์ ๊ฐ์ธ๋ WebView ๋ํผ ์ฑ์ ๋๋ค. ๋ค์ดํฐ๋ธ ๋ ์ด์ด๋ ํธ์ ์๋ฆผ, ์ธ์ฆ ํ ํฐ ์ ์ฅ, ๊ฐ์ ์ ๋ฐ์ดํธ ์ฒดํฌ, ๋ฅ ๋งํฌ๋ง ๋ด๋นํฉ๋๋ค.
pnpm install # ์์กด์ฑ ์ค์น
pnpm start # Expo ๊ฐ๋ฐ ์๋ฒ
pnpm ios / android # ํ๋ซํผ๋ณ ์คํ
pnpm lint # ESLint ๊ฒ์ฌ
pnpm test # Jest watch ๋ชจ๋
pnpm test -- --watchAll=false # ๋จ๋ฐ์ฑ ํ
์คํธ (PR ์ ๊ถ์ฅ)| ๋ณ์ | ์ค๋ช |
|---|---|
EXPO_PUBLIC_APP_ENV |
development | production (๊ธฐ๋ณธ: production) |
EXPO_PUBLIC_API_ENV |
APP_ENV๋ฅผ ๋ฎ์ด์จ์ API/์น URL ์ ํ |
- Production:
https://agit.gg,https://api.agit.gg - Stage:
https://stage.agit.gg,https://api.stage.agit.gg
๋ผ์ฐํ (Expo Router ํ์ผ ๊ธฐ๋ฐ)
app/_layout.tsxโ ํธ์ ์๋ฆผ ์ด๊ธฐํ, ๊ฐ์ ์ ๋ฐ์ดํธ ์ฒดํฌ, ์๋ฆผ ํญ ๋ฅ ๋งํฌ ์ฒ๋ฆฌapp/index.tsxโ/webview/home์ผ๋ก ๋ฆฌ๋ค์ด๋ ํธapp/webview/[path].tsxโ ๋ฉ์ธ WebView;path๊ฐ${webUrl}/${path}๋ก ๋งคํapp/forceupdate.tsxโ ์๋ฒ ๋ฒ์ > ์ฑ ๋ฒ์ ์ผ ๋ ํ์
WebView โ ๋ค์ดํฐ๋ธ ๋ธ๋ฆฟ์ง (window.postMessage)
| type | ๋์ |
|---|---|
LOGIN_COMPLETE |
accessToken SecureStore ์ ์ฅ + ํธ์ ํ ํฐ ๋ฐฑ์๋ ๋ฑ๋ก |
TOKEN_REFRESH |
accessToken ๊ฐฑ์ |
LOGOUT |
ํธ์ ํ ํฐ ๋ฐฑ์๋ ์ญ์ + accessToken ์ด๊ธฐํ |
๋ฑ๋ก ๊ฒฐ๊ณผ๋ NOTIFICATION_STATUS CustomEvent๋ก WebView์ ์ฃผ์
ํฉ๋๋ค.
์ฃผ์ ๋ชจ๋
services/nativeAuthStore.tsโexpo-secure-store๊ธฐ๋ฐ ์ก์ธ์ค ํ ํฐ CRUDservices/pushTokenApi.tsโ ํธ์ ํ ํฐ ๋ฑ๋ก/์ญ์ ; in-flight ์ค๋ณต ๋ฐฉ์ง, ํ ํฐ ์บ์ฑservices/notifications.tsโ ์๋ฆผ ๊ถํ ์์ฒญ, ์ค์ ์ด๋ ํ ์ฌ์ง์ ์ ๊ถํ ์ฌ์ฒดํฌservices/forceupdate.tsโGET /versions/latest?platform=IOS|ANDROID๋ฒ์ ๋น๊ตutils/pushTokenStore.tsโ ์ธ๋ฉ๋ชจ๋ฆฌ + SecureStore ์บ์, ์ฝ๋ฐฑ ์ง์utils/userAgent.tsโKONECT_APP/{version}ํฌํจ ์ปค์คํ User-Agent ์์ฑ
- TypeScript strict ๋ชจ๋ ์ ์ง
- Prettier ๊ธฐ์ค: 2์นธ ๋ค์ฌ์ฐ๊ธฐ, single quote, ์ธ๋ฏธ์ฝ๋ก ,
printWidth: 100 - ์ปดํฌ๋ํธ/ํ์
PascalCase, ํจ์/๋ณ์camelCase - ๋คํธ์ํฌ/ํ๋ซํผ ์์กด ๋ก์ง โ
services/, ์์ ์ ํธ โutils/ - ๋ฏผ๊ฐ ์ ๋ณด๋ ๋ฐ๋์
expo-secure-store์๋ง ์ ์ฅ, ์ปค๋ฐ ๊ธ์ง
ํ์
: feat | fix | refactor | chore | release
[ํ์
] ์์
์์ฝ
[fix] ํธ์ ์๋ฆผ ํ ํฐ ์ค๋ณต ๋ฑ๋ก ๋ฌธ์ ์์
{์ด์๋ฒํธ}-{ํ์
}-{kebab-case-์์ฝ}
50-fix-ํธ์-์๋ฆผ-ํ ํฐ-์ค๋ณต-๋ฑ๋ก-๋ฌธ์ -์์
# ์ด์ ์์ ๋
no-issue-{ํ์
}-{kebab-case-์์ฝ}
ํ ์ปค๋ฐ์ ํ ๊ฐ์ง ์๋๋ง, ์์ฝ์ ๋ช ๋ นํ์ผ๋ก ์์ฑํฉ๋๋ค.
ํ์
: ๋ณ๊ฒฝ ๋ด์ฉ ์์ฝ
fix: cancel ํด๋ฆญ ์ ๋ค์ด์ผ๋ก๊ทธ๋ง ๋ซ๊ธฐ
์ ๋ชฉ์ ์ด์์ ๋์ผํ ํ์ [ํ์
] ์์ฝ, ๋ณธ๋ฌธ ํ
ํ๋ฆฟ:
## ๋ฐฐ๊ฒฝ
## ๋ณ๊ฒฝ ์ฌํญ
## ๊ฒ์ฆ
- [ ] pnpm lint
- [ ] pnpm test -- --watchAll=false
## ์ด์
Closes #{์ด์๋ฒํธ}