-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
์ด ๋ฌธ์๋ ์ธ๋ชจ(Delta-front)์ ์ ์ฒด ๊ตฌ์กฐ์ ๋ชจ๋ ธ๋ ํฌ ๊ตฌ์ฑ, web/app์ ์ญํ ๋ถ๋ฆฌ๋ฅผ ์ค๋ช ํฉ๋๋ค.
์ธ๋ชจ๋ pnpm workspace ๊ธฐ๋ฐ ๋ชจ๋ ธ๋ ํฌ๋ก ์ด์ํฉ๋๋ค.
-
apps/web: Next.js(Web) ์ฑ (์ค์ ์๋น์ค UI/๊ธฐ๋ฅ์ ์ค์ฌ) -
apps/app: React Native(App) ์ฑ (ํฅํ WebView๋กweb์ ๊ฐ์ธ์ ์ฑ ์ ๊ณต)
๋ฃจํธ์๋ ๊ณตํต ๊ฐ๋ฐ ๋๊ตฌ/์ ์ฑ ์ด ์์นํฉ๋๋ค.
-
.github/: GitHub Actions, ์ด์/PR ํ ํ๋ฆฟ ๋ฑ -
.husky/,commitlint.config.cjs: ์ปค๋ฐ/ํ ๊ท์น -
pnpm-workspace.yaml,pnpm-lock.yaml: ์ํฌ์คํ์ด์ค/๋ฝํ์ผ -
package.json: workspace ์คํฌ๋ฆฝํธ ๋ฐ ์์ง(Node/pnpm) ๊ด๋ฆฌ
apps/web/src๋ ํฌ๊ฒ ๋ ์ถ์ผ๋ก ๋๋ฉ๋๋ค.
-
src/app: ํ์ด์ง(๋ผ์ฐํธ) ๋จ์ ์ฝ๋ (Next App Router) -
src/shared: ๊ณตํต ๋ ์ด์ด (์ฌ์ฌ์ฉ ์ปดํฌ๋ํธ/์คํ์ผ/์ ํธ/API ๋ฑ)
-
apps/web/src/app/- ์ค์ ๋ผ์ฐํธ ํด๋๋ค:
(home),graph,login,my,oauth,wrong... -
layout.tsx: ์ ์ญ ๋ ์ด์์(HTML/Body/Theme/Provider ๋ํ) -
client-shell.tsx: ํด๋ผ์ด์ธํธ ์ ์ฉ ์ ธ(์คํ๋์, AppBar, BottomNav ๋ฑ)
- ์ค์ ๋ผ์ฐํธ ํด๋๋ค:
-
apps/web/src/shared/-
apis/: axios ๊ธฐ๋ฐ API ๋ชจ๋ + TanStack Query ํ -
components/: ๊ณตํต UI ์ปดํฌ๋ํธ(๋์์ธ ์์คํ ํฌํจ) -
styles/: Vanilla Extract ํ ํฐ/ํ์ดํฌ/ํ ๋ง -
constants/: ๋ผ์ฐํธ, ํค, ์์ -
hooks/: ๊ณตํต ํ -
utils/: ์ ํธ ํจ์ -
assets/: ์ด๋ฏธ์ง/Lottie/SVG sprite ๋ฑ -
types/: ๊ณตํต ํ์
-
-
apps/web/src/stories/- Storybook ์คํ ๋ฆฌ(๋ฌธ์/์๊ฐ ํ ์คํธ)
๊ธฐ๋ณธ ๋ฐฉํฅ์ ์๋์ฒ๋ผ ๊ฐ์ ธ๊ฐ๋๋ค.
-
src/app/*: ๋ผ์ฐํ /๋ฐ์ดํฐ ๋ฐ์ธ๋ฉ/ํ์ด์ง ์กฐ๋ฆฝ ์ญํ (์๊ฒ) -
src/shared/*: UI/์ํ/์ ํธ/๋ฐ์ดํฐ fetching์ ์ฌ์ฌ์ฉ ๋ก์ง (๋๊ป๊ฒ)
์ฆ, ๋๋ฉ์ธ ๋ก์งยทUI ์ฌ์ฌ์ฉ์ด ๊ฐ๋ฅํ๋ฉด shared๋ก ์ฌ๋ฆฌ๋ ๊ฒ์ ๊ธฐ๋ณธ์ผ๋ก ํฉ๋๋ค.
์ ์ญ ์ํธ๋ฆฌ ๊ตฌ์ฑ์ ์๋์ ๊ฐ์ต๋๋ค.
-
app/layout.tsx<html className={theme}><SvgSpriteInjector />-
<ClientShell>{children}</ClientShell>(Suspense ์๋)
-
client-shell.tsx(Client Component)-
QueryProvider(TanStack Query) -
Splash(์ด๊ธฐ UX) -
AppBarGate(๋ผ์ฐํธ ๊ธฐ๋ฐ AppBar ์ ์ด) -
{children}(page) -
BottomNav,FabButton
-
ํฅํ ์ฑ ๋ฐฐํฌ๋ฅผ ์ํด apps/app์ RN WebView ์ปจํ
์ด๋ ์ญํ ์ ์ํํฉ๋๋ค.
- RN ์ฑ์ ์ต์ํ์ ๋ค์ดํฐ๋ธ UI(๊ถํ, ๋ฅ๋งํฌ, ํธ์ ๋ฑ) + WebView๋ฅผ ์ ๊ณต
- ์ค์ ํ๋ฉด/๊ธฐ๋ฅ์
apps/web์ด ๋ด๋น - ๋ค์ดํฐ๋ธ โ ์น ํต์ ์ด ํ์ํ๋ฉด
-
postMessage/onMessage - ๋ฅ๋งํฌ ์คํค๋ง
- ํ ํฐ ๋ธ๋ฆฟ์ง ๊ฐ์ ์ ๋ต์ผ๋ก ํ์ฅํฉ๋๋ค.
-
Delta-front Wiki
์ธ๋ชจ ยท ๋๋ง์ ์ํ ์ค๋ต๋
ธํธ
Home ยท CI/CD ยท Coding Convention ยท Troubleshooting
- ๐ Home
- ๐ Environment
- ๐งฐ Tech Stack
- ๐งฉ Architecture
- ๐งญ Routing
- ๐ State & Data Fetching
- ๐งฑ Design System
- ๐ Storybook
- ๐ Auth (Kakao, Apple)
- ๐ Wrong Note
- ๐ Graph & Analytics
- ๐ค CI/CD
- ๐งพ Release
- ๐ PR & Branch Strategy
- ๐งพ Commit Convention
- ๐งฑ Coding Convention
- ๐งฏ Troubleshooting
- ๐งพ PR ํ ํ๋ฆฟ
- ๐งพ ISSUE ํ ํ๋ฆฟ
