Skip to content
Merged
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
48 changes: 48 additions & 0 deletions docs/architecture-guidelines 복사본.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Architecture Guidelines

This project uses three layers with fixed responsibilities.

## Layer Rules

- `src/components`: small, reusable UI building blocks only.
- `src/features`: domain logic, state, data access, and feature-level UI composition.
- `src/app`: routing, page entry, and feature composition only.

## Allowed Imports

- `src/app` -> `src/features`, `src/components`, `src/lib`
- `src/features` -> `src/components`, `src/lib`, same feature internals
- `src/components` -> `src/components/ui`, `src/lib`

## Disallowed Imports

- `src/components` -> `src/features`
- `src/components` -> `src/app`
- `src/lib` -> `src/app`, `src/features`, `src/components`

## Import Pattern Examples

Allowed:

```ts
// src/app/page.tsx
import { ChatShell } from "@/features/shell/ui/chat-shell";
```

```ts
// src/features/chat/ui/chat-thread.tsx
import { MessageBubble } from "@/features/chat/ui/message-bubble";
import { cn } from "@/lib/utils";
```

Disallowed:

```ts
// src/components/ui/card.tsx
import { useChatStore } from "@/features/chat/model/store";
```

```ts
// src/lib/date.ts
import { ChatShell } from "@/features/shell/ui/chat-shell";
```
67 changes: 67 additions & 0 deletions src/features/auth/ui/login-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ import { useEffect, useState } from "react";
import { toast } from "sonner";

import { Button } from "@/components/ui/button";
import {
Drawer,
DrawerClose,
DrawerContent,
DrawerHeader,
DrawerTitle,
DrawerTrigger,
} from "@/components/ui/drawer";
import { useAuthSession } from "@/features/auth/model/use-auth-session";
import { cn } from "@/lib/utils";

Expand Down Expand Up @@ -107,6 +115,65 @@ export function LoginPanel() {
>
이용약관
</Link>
<span>·</span>
<Drawer>
<DrawerTrigger asChild>
<button
type="button"
className="underline underline-offset-4 hover:text-foreground"
>
사업자 정보
</button>
</DrawerTrigger>
<DrawerContent>
<DrawerHeader>
<DrawerTitle>사업자 정보</DrawerTitle>
</DrawerHeader>
<div className="space-y-1.5 px-4 pb-2 text-[13px] leading-relaxed text-muted-foreground">
<p className="font-semibold text-foreground">
좋은공간 미디어 | 대표 : 윤성현
</p>
<p>
부산광역시 북구 낙동북로 772번가길 28, 지하 1층(구포동)
</p>
<p>
사업자 등록번호 : 621-14-25692{" "}
<a
href="https://www.ftc.go.kr/bizCommPop.do?wrkr_no=6211425692"
target="_blank"
rel="noreferrer noopener"
className="text-primary underline underline-offset-4"
>
[사업자 번호 조회]
</a>
</p>
<p>통신판매번호 : 2018-부산북구-0094</p>
<p>
이메일 문의 :{" "}
<a
href="mailto:[email protected]"
className="text-primary underline underline-offset-4"
>
[email protected]
</a>
</p>
</div>
<div className="px-4 pb-6 pt-2">
<p className="text-center text-[11px] text-muted-foreground/60">
&copy; {new Date().getFullYear()} 좋은공간 미디어. All rights
reserved.
</p>
<DrawerClose asChild>
<button
type="button"
className="mt-3 w-full rounded-xl bg-muted py-3 text-sm font-medium text-foreground"
>
닫기
</button>
</DrawerClose>
</div>
</DrawerContent>
</Drawer>
</div>
</div>
</div>
Expand Down
Loading