mirror of
https://github.com/headporter81/ss-front-react.git
synced 2026-12-06 07:41:11 +09:00
33 lines
1.2 KiB
Markdown
33 lines
1.2 KiB
Markdown
# ss-front-react
|
|
|
|
PC통신 스타일 BBS UI — Next.js 16 (App Router) + React 19 + TypeScript
|
|
|
|
```bash
|
|
npm install
|
|
npm run dev # http://localhost:3000
|
|
```
|
|
|
|
## 디렉토리 구조
|
|
|
|
```
|
|
src/
|
|
├─ app/ # 라우팅 전용 (page / layout)
|
|
│ ├─ layout.tsx
|
|
│ ├─ page.tsx
|
|
│ ├─ globals.css # 전역 토큰·리셋
|
|
│ └─ _components/ # 이 라우트에서만 쓰는 컴포넌트 (private folder, 라우팅 제외)
|
|
└─ features/ # 도메인(기능) 단위 모듈
|
|
└─ bbs/
|
|
├─ index.ts # 외부 공개 API (여기서만 import)
|
|
├─ types.ts
|
|
├─ constants/ # 메뉴·팔레트 정의
|
|
├─ mocks/ # 목업 데이터 → API 연동 시 api/ 로 교체
|
|
├─ lib/command.ts # 명령 처리 순수 함수 (useReducer reducer)
|
|
└─ components/ # BbsTerminal(client) + 화면별 컴포넌트 + CSS Module
|
|
```
|
|
|
|
규칙
|
|
- `app/`에는 라우팅 파일만, 로직은 `features/<도메인>/`에.
|
|
- 다른 곳에서는 `@/features/bbs` (index.ts)로만 import.
|
|
- 여러 feature가 공유하는 코드가 생기면 그때 `src/components`, `src/lib`, `src/hooks` 추가.
|