프로젝트 문서 체계 정비
This commit is contained in:
205
docs/map.md
205
docs/map.md
@@ -1,63 +1,164 @@
|
||||
# 파일-화면 매핑 가이드
|
||||
# 파일-기능 지도
|
||||
|
||||
## `/`
|
||||
- 진입 파일: `index.html`
|
||||
- 화면 역할: 시리즈 선택 홈 화면
|
||||
- 연결: `script/auth-header.js`, `script/api.js`
|
||||
## 화면
|
||||
|
||||
## `/cardList.html?series=<key>&d=<shareCode>`
|
||||
- 진입 파일: `cardList.html`
|
||||
- 화면 역할: 카드 검색·필터·덱 편집·저장·공유
|
||||
- `?d=` 있으면 API에서 덱 복원
|
||||
- 연결: `datas/<seriesKey>.js`, `script/api.js`
|
||||
```text
|
||||
/
|
||||
index.html
|
||||
|
||||
## `/result.html`
|
||||
- 진입 파일: `result.html`
|
||||
- 화면 역할: 덱 미리보기·PNG 저장·내 덱 저장
|
||||
- 데이터 소스: `localStorage.selectedCards`
|
||||
- 하단 고정 바: `홈으로` | `이미지로 다운로드` | `내 덱으로 저장` (공개 여부 확인 모달)
|
||||
- `script/deck-prefs.js`: 덱 공개 기본값·프롬프트 설정
|
||||
/cardList.html
|
||||
cardList.html
|
||||
|
||||
## `/d/<shareCode>` (Nginx 리다이렉트)
|
||||
- `nginx/uadeck.conf` 규칙으로 `cardList.html?d=` 로 이동
|
||||
- 옆 프로젝트 연동: `GET /api/v1/decks/<shareCode>`
|
||||
/result.html
|
||||
result.html
|
||||
|
||||
## `/login.html`, `/signup.html`
|
||||
- 인증 화면
|
||||
- 연결: `script/page-i18n.js` (`data-i18n` 속성)
|
||||
/login.html
|
||||
login.html
|
||||
|
||||
## `/profile.html` (내 프로필)
|
||||
- 로그인 사용자: 이메일·사용자명·프로필 사진·비밀번호 변경
|
||||
- 연결: `script/api.js` (`updateProfile`, `changePassword`), `script/image-utils.js`, `script/page-i18n.js`, `script/ads.js`, `style/profile.css`
|
||||
/signup.html
|
||||
signup.html
|
||||
|
||||
## `/deckHistory.html`
|
||||
- 로그인 사용자의 저장 덱 목록·불러오기·삭제
|
||||
- 카드 그리드 + 미리보기 썸네일 (`preview_url`), 클릭·길게 눌러 확대 (`deck-preview-hold.js`)
|
||||
- 시리즈 필터·검색 (`style/deck-history.css`)
|
||||
- 연결: `script/page-i18n.js`, `script/ads.js` (우측 AdSense `4260332296`)
|
||||
/profile.html
|
||||
profile.html
|
||||
|
||||
## `/preset.html` (공개 덱)
|
||||
- 사용자가 공개 전환한 덱 목록 (카드 그리드)
|
||||
- 썸네일 클릭·길게 눌러 확대 (`deck-preview-hold.js`, 안내 문구 없음)
|
||||
- API: `GET /api/v1/decks/presets` → `is_public=1` user 덱
|
||||
- 연결: `script/page-i18n.js`, `script/ads.js`
|
||||
/deckHistory.html
|
||||
deckHistory.html
|
||||
|
||||
## `/admin.html`
|
||||
- 관리자: 회원 관리, 덱 관리 (`style/admin.css`)
|
||||
/preset.html
|
||||
preset.html
|
||||
|
||||
## API (`api/`)
|
||||
- Docker: `docker-compose.yml`
|
||||
- 엔드포인트 베이스: `/api/v1`
|
||||
/admin.html
|
||||
admin.html
|
||||
|
||||
## 공통
|
||||
- `style/app-shell.css`: 헤더·본문 최대 너비 1280px (`max-w-7xl`), 데스크톱 우측 광고 레일
|
||||
- `script/ads.js`: Google AdSense `ins.adsbygoogle` 슬롯 초기화
|
||||
- `script/page-help.js`: 페이지 제목 `?` 툴팁
|
||||
- `script/page-i18n.js`: `data-i18n` / `data-i18n-html` / `data-i18n-placeholder`, `UaPageI18n.t()`
|
||||
- `script/deck-favorites.js`: 덱 즐겨찾기 (localStorage)
|
||||
- `script/deck-preview-hold.js`: 덱 썸네일 길게 눌러 확대 (내 덱·공개 덱)
|
||||
- `style/brand.css`: 헤더 UNIARE 로고 크기 통일 (32px)
|
||||
- `script/api.js`: API 클라이언트 (`updateProfile`, `changePassword` 포함)
|
||||
- `script/auth-header.js`: 헤더 프로필 드롭다운 (i18n), 로그인 시 **썸네일 옆 닉네임** 표시 (`auth-profile-trigger`)
|
||||
- `script/image-utils.js`: 클라이언트 이미지 PNG 리사이즈 (`UaImageUtils.resizeImageToPng`)
|
||||
- `style/auth-header.css`
|
||||
/d/<shareCode>
|
||||
nginx/default.conf
|
||||
nginx/uadeck.conf
|
||||
```
|
||||
|
||||
## 프론트 공통 모듈
|
||||
|
||||
```text
|
||||
API 요청
|
||||
script/api.js
|
||||
|
||||
인증 헤더
|
||||
script/auth-header.js
|
||||
style/auth-header.css
|
||||
|
||||
페이지 공통 레이아웃
|
||||
style/app-shell.css
|
||||
|
||||
브랜드 로고 규격
|
||||
style/brand.css
|
||||
|
||||
페이지 번역
|
||||
script/page-i18n.js
|
||||
i18n/translations.ko.json
|
||||
i18n/translations.ja.json
|
||||
i18n/translations.en.json
|
||||
|
||||
페이지 도움말
|
||||
script/page-help.js
|
||||
|
||||
덱 공개 기본값
|
||||
script/deck-prefs.js
|
||||
|
||||
덱 즐겨찾기
|
||||
script/deck-favorites.js
|
||||
|
||||
덱 썸네일 확대
|
||||
script/deck-preview-hold.js
|
||||
|
||||
이미지 PNG 변환
|
||||
script/image-utils.js
|
||||
|
||||
광고 초기화
|
||||
script/ads.js
|
||||
```
|
||||
|
||||
## 페이지 전용 스타일
|
||||
|
||||
```text
|
||||
로그인·회원가입
|
||||
style/auth-pages.css
|
||||
|
||||
프로필
|
||||
style/profile.css
|
||||
|
||||
내 덱·공개 덱
|
||||
style/deck-history.css
|
||||
|
||||
관리자
|
||||
style/admin.css
|
||||
|
||||
Tailwind 입력·산출물
|
||||
style/input.css
|
||||
style/output.css
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```text
|
||||
서버 진입·헬스 체크
|
||||
api/src/index.js
|
||||
|
||||
SQLite 스키마·관리자 시드
|
||||
api/src/db.js
|
||||
|
||||
JWT 인증·권한
|
||||
api/src/middleware/auth.js
|
||||
|
||||
회원가입·로그인·프로필
|
||||
api/src/routes/auth.js
|
||||
|
||||
덱 저장·조회·공개 목록
|
||||
api/src/routes/decks.js
|
||||
|
||||
회원·덱 관리자 API
|
||||
api/src/routes/admin.js
|
||||
|
||||
카드 메타 합성
|
||||
api/src/services/cardResolver.js
|
||||
|
||||
아바타 저장
|
||||
api/src/services/avatarImage.js
|
||||
|
||||
덱 미리보기 저장
|
||||
api/src/services/previewImage.js
|
||||
```
|
||||
|
||||
## 데이터·자산
|
||||
|
||||
```text
|
||||
카드 데이터
|
||||
datas/uaXX.js
|
||||
datas/uapr.js
|
||||
|
||||
카드 이미지
|
||||
images/<seriesKey>/
|
||||
|
||||
브랜드·파비콘
|
||||
images/assets/
|
||||
favicon.ico
|
||||
```
|
||||
|
||||
## 운영·외부 연동
|
||||
|
||||
```text
|
||||
API 단독 Compose
|
||||
docker-compose.yml
|
||||
|
||||
Nginx + API Compose
|
||||
docker-compose.prod.yml
|
||||
|
||||
Nginx 이미지
|
||||
nginx/Dockerfile
|
||||
nginx/default.conf
|
||||
|
||||
외부 덱 API 클라이언트
|
||||
integrations/uadeck-deck-client.js
|
||||
|
||||
외부 연동 문서
|
||||
docs/api-integration.md
|
||||
docs/widget.md
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user