Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
3 changes: 0 additions & 3 deletions apps/timo-web/app/(auth)/login/page.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions apps/timo-web/app/(auth)/signup/page.tsx

This file was deleted.

3 changes: 3 additions & 0 deletions apps/timo-web/app/focus/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function FocusPage() {
return <></>;
}
Comment thread
kimminna marked this conversation as resolved.
Resolved
3 changes: 3 additions & 0 deletions apps/timo-web/app/home/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function HomePage() {
return <></>;
}
Comment thread
kimminna marked this conversation as resolved.
Resolved
3 changes: 3 additions & 0 deletions apps/timo-web/app/onboarding/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function OnboardingPage() {
return <></>;
}
Comment thread
kimminna marked this conversation as resolved.
Resolved
Empty file.
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions apps/timo-web/app/settings/account/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function SettingsAccountPage() {
return <></>;
Comment thread
kimminna marked this conversation as resolved.
Resolved
}
7 changes: 7 additions & 0 deletions apps/timo-web/app/settings/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function SettingsLayout({
children,
}: {
children: React.ReactNode;
}) {
Comment thread
kimminna marked this conversation as resolved.
Resolved
return <>{children}</>;
}
3 changes: 3 additions & 0 deletions apps/timo-web/app/settings/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function SettingsPage() {
return <></>;
Comment thread
kimminna marked this conversation as resolved.
Resolved
}
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions apps/timo-web/app/settings/term/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function SettingsTermPage() {
return <></>;
Comment thread
kimminna marked this conversation as resolved.
Resolved
}
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions apps/timo-web/app/statistics/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function StatisticsPage() {
return <></>;
}
Comment thread
kimminna marked this conversation as resolved.
Resolved
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions apps/timo-web/app/today/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function TodayPage() {
return <></>;
}
Comment thread
kimminna marked this conversation as resolved.
Resolved
12 changes: 11 additions & 1 deletion apps/timo-web/lighthouserc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@
module.exports = {
ci: {
collect: {
url: ["http://localhost:3000"],
url: [
"http://localhost:3000",
"http://localhost:3000/home",
"http://localhost:3000/today",
"http://localhost:3000/focus",
"http://localhost:3000/statistics",
"http://localhost:3000/onboarding",
"http://localhost:3000/settings",
"http://localhost:3000/settings/account",
"http://localhost:3000/settings/term",
],
numberOfRuns: 3,
settings: {
chromeFlags:
Expand Down
4 changes: 1 addition & 3 deletions docs/architecture/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ app/(domain)/page.tsx ← 라우팅·레이아웃 조
```

- **pages** (`app/.../page.tsx`): 라우팅 단위. 데이터 페칭(React Query) 및 레이아웃만 담당
- **도메인 종속** (`_components/`, `_containers/`, `_queries/`, `_hooks/`, `_utils/`): 해당 도메인 라우트 내부에서만 사용. `_` 접두사로 Next.js 라우팅에서 제외됨
- **도메인 종속** (`_components/`, `_containers/`, `_queries/`): 해당 도메인 라우트 내부에서만 사용. `_` 접두사로 Next.js 라우팅에서 제외됨

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그냥 궁금해서 그런데 _hooks/, _utils/는 왜 제외했나요?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제외했다기보단 필요할 때마다 추가해서 사용하는 편이 나을 것 같아서 일단 스캐폴딩 범위에선 제외했숩니다!
사실 도메인 별로 사용 빈도가 너무 다를 것 같은 폴더 구조이기도 해서, 컴포넌트 / 컨테이너 / 쿼리 함수같은 필수 폴더만 스캐폴딩해 뒀어요

각자 작업하다가 폴더 추가가 필요하다고 느낄 경우(도메인에 종속되는 훅, 유틸이 생성되었을 때) 추가하면 될 것 같아요!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확실이 모든 도메인에서 필요하지 않을 것 같네요. 답변 감사합니당-!

- `_components/` — props만 받는 순수 UI. `'use client'` 없이도 동작 가능
- `_containers/` — `'use client'` 필수. useQuery·zustand 등 외부 상태와 결합된 클라이언트 컨테이너
- `_queries/` — 해당 도메인 전용 React Query hooks (useQuery · useMutation · queryKey 정의)
Expand All @@ -22,8 +22,6 @@ app/
_components/ # LoginForm, SocialLoginButton 등 순수 UI
_containers/ # LoginFormContainer (useQuery·zustand 결합)
_queries/ # useLoginMutation, useUserProfileQuery 등
_hooks/ # useLoginForm 등 auth 전용 커스텀 훅
_utils/ # validatePassword 등 auth 전용 유틸
page.tsx # 레이아웃 조합만 (Server Component)
layout.tsx
```
Expand Down
3 changes: 2 additions & 1 deletion docs/architecture/scaffolding.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ pnpm gen page # apps/timo-web에 App Router 페이지 추가
생성되는 파일 형식은 `docs/conventions/code-style.md` 코드 스타일 규칙을 따른다.

- **컴포넌트**: arrow function, named export (`export const`)
- **페이지**: `export default function` (Next.js App Router 라우팅 규칙)
- **페이지**: `export default function RouteNamePage()` — 함수명은 라우트명 PascalCase + `Page` 접미사 (예: `HomePage`, `LoginPage`)
- **레이아웃**: `export default function RouteNameLayout()` — 함수명은 라우트명 PascalCase + `Layout` 접미사 (예: `HomeLayout`, `LoginLayout`)
2 changes: 1 addition & 1 deletion docs/conventions/code-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- Arrow function으로 선언: `export const Component = () => {}`
- Named export 사용 (default export 지양)
- **예외**: Next.js App Router 예약 파일(`app/**/page.tsx`, `app/**/layout.tsx`, `app/**/loading.tsx` 등)은 프레임워크 요구에 따라 `export default function Page() {}` 형식을 사용한다. → `docs/architecture/scaffolding.md` 참조
- **예외**: Next.js App Router 예약 파일(`app/**/page.tsx`, `app/**/layout.tsx`, `app/**/loading.tsx` 등)은 프레임워크 요구에 따라 `export default function` 형식을 사용한다. 함수명은 라우트명 PascalCase + 파일 역할 접미사로 한다 (예: `HomePage`, `LoginPage`, `HomeLayout`). → `docs/architecture/scaffolding.md` 참조
- 자식 없으면 self-closing: `<Component />`
- 최상단 래퍼는 Fragment: `<>…</>`

Expand Down
Loading