Skip to content

Commit 22c581d

Browse files
SOIVclaude
andcommitted
feat(manifest): ModuleManifest에 repository·author 필드 추가
마켓플레이스 상세 페이지에서 GitHub README 표시 및 제작자 정보를 저장할 수 있도록 module.json 스펙을 확장한다. author는 npm package.json 관례(string | { name, email, url })를 따른다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 78f91a4 commit 22c581d

7 files changed

Lines changed: 76 additions & 29 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ packages/
5151
modules/ — Phase 2 모듈 (Ledger, Subscription) 위치 예정
5252
```
5353

54+
**모듈 템플릿**: `D:\5. Development\A. Project\Fieldstack-Project\module-template` (WSL: `/mnt/d/5. Development/A. Project/Fieldstack-Project/module-template`) — 프로젝트 루트 외부에 별도 존재. `module.json` 스펙 변경 시 함께 업데이트.
55+
5456
pnpm workspace, `node-linker=hoisted`.
5557

5658
### apps/web — 라우팅 & 상태

apps/api/src/loader/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ export interface ModuleRoutes {
66
api: string;
77
}
88

9+
export interface ModuleAuthor {
10+
name?: string;
11+
email?: string;
12+
url?: string;
13+
}
14+
915
export interface ModuleManifest {
1016
name: string;
1117
displayName: string;
@@ -14,6 +20,8 @@ export interface ModuleManifest {
1420
enabled: boolean;
1521
dependencies: string[];
1622
routes: ModuleRoutes;
23+
repository?: string;
24+
author?: ModuleAuthor | string;
1725
}
1826

1927
export interface BackendRouteRegistration {
@@ -48,6 +56,8 @@ export function parseModuleJson(content: string): ModuleManifest {
4856
frontend: parsed.routes?.frontend ?? "",
4957
api: parsed.routes?.api ?? "",
5058
},
59+
...(parsed.repository !== undefined && { repository: parsed.repository }),
60+
...(parsed.author !== undefined && { author: parsed.author }),
5161
};
5262
}
5363

apps/web/src/loader/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@ export interface ModuleRoutes {
33
api: string;
44
}
55

6+
export interface ModuleAuthor {
7+
name?: string;
8+
email?: string;
9+
url?: string;
10+
}
11+
612
export interface ModuleManifest {
713
name: string;
814
version: string;
915
enabled: boolean;
1016
dependencies: string[];
1117
routes: ModuleRoutes;
18+
repository?: string;
19+
author?: ModuleAuthor | string;
1220
}
1321

1422
export interface FrontendRouteRegistration {
@@ -34,6 +42,8 @@ export function parseModuleJson(content: string): ModuleManifest {
3442
frontend: parsed.routes?.frontend ?? "",
3543
api: parsed.routes?.api ?? "",
3644
},
45+
...(parsed.repository !== undefined && { repository: parsed.repository }),
46+
...(parsed.author !== undefined && { author: parsed.author }),
3747
};
3848
}
3949

docs/v2_FINANCIAL-LEDGER/architecture/04-directory-structure.md

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,18 @@ modules/[module-name]/
312312
"version": "1.0.0",
313313
"displayName": "가계부",
314314
"description": "수입/지출 관리",
315-
"icon": "💰",
316-
"category": "finance",
315+
"enabled": true,
316+
"dependencies": [],
317317
"routes": {
318318
"frontend": "/ledger",
319319
"api": "/api/ledger"
320320
},
321-
"permissions": ["db:read", "db:write"],
322-
"dependencies": [],
323-
"enabled": true
321+
"repository": "https://github.com/author/module-ledger",
322+
"author": {
323+
"name": "작성자 이름",
324+
"email": "author@example.com",
325+
"url": "https://example.com"
326+
}
324327
}
325328
```
326329

@@ -330,29 +333,29 @@ modules/[module-name]/
330333

331334
문서 폴더
332335

333-
```
334-
docs/
335-
├── README.md # 문서 인덱스
336-
├── architecture/ # 아키텍처 문서
337-
│ ├── 00-overview.md
338-
│ ├── 01-decisions.md
339-
│ ├── 02-core-principles.md
340-
│ ├── 03-resilience-operations.md
341-
│ └── 04-directory-structure.md
342-
├── technical/ # 기술 문서
343-
│ ├── 00-tech-stack.md
344-
│ ├── 01-database.md
345-
│ └── 03-ai-integration.md
346-
├── modules/ # 모듈 문서
347-
│ ├── 03-system-design.md
348-
│ └── 01-development-guide.md
349-
├── deployment/ # 배포 문서
350-
│ ├── 01-installation.md
351-
│ └── 02-setup-wizard.md
352-
└── community/ # 커뮤니티 문서
353-
├── 00-philosophy.md
354-
└── 01-contributing.md
355-
```
336+
```
337+
docs/
338+
├── README.md # 문서 인덱스
339+
├── architecture/ # 아키텍처 문서
340+
│ ├── 00-overview.md
341+
│ ├── 01-decisions.md
342+
│ ├── 02-core-principles.md
343+
│ ├── 03-resilience-operations.md
344+
│ └── 04-directory-structure.md
345+
├── technical/ # 기술 문서
346+
│ ├── 00-tech-stack.md
347+
│ ├── 01-database.md
348+
│ └── 03-ai-integration.md
349+
├── modules/ # 모듈 문서
350+
│ ├── 03-system-design.md
351+
│ └── 01-development-guide.md
352+
├── deployment/ # 배포 문서
353+
│ ├── 01-installation.md
354+
│ └── 02-setup-wizard.md
355+
└── community/ # 커뮤니티 문서
356+
├── 00-philosophy.md
357+
└── 01-contributing.md
358+
```
356359

357360
---
358361

@@ -407,4 +410,4 @@ services:
407410
- **camelCase**: 예외적으로 React 컴포넌트 폴더
408411
409412
### 모듈
410-
- **kebab-case**: ledger, subscription, crypto-tracker
413+
- **kebab-case**: ledger, subscription, crypto-tracker

docs/v2_FINANCIAL-LEDGER/modules/01-development-guide.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,21 @@ modules/{name}/
4141
"routes": {
4242
"frontend": "/my-module",
4343
"api": "/api/my-module"
44+
},
45+
"repository": "https://github.com/author/module-my-module",
46+
"author": {
47+
"name": "작성자 이름",
48+
"email": "author@example.com",
49+
"url": "https://example.com"
4450
}
4551
}
4652
```
4753

4854
- `displayName` → 사이드바에 자동 표시 (API 경유)
4955
- `enabled: false` → 서버 시작 시 완전히 무시
5056
- `routes.api` → Express 라우터 마운트 경로
57+
- `repository` → 마켓플레이스 상세 페이지에서 GitHub README 표시에 사용 (선택)
58+
- `author` → npm `package.json` 관례. `string` 또는 `{ name, email, url }` 객체 모두 허용 (선택)
5159

5260
---
5361

modules/ledger/module.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
"description": "ledger:description",
66
"enabled": true,
77
"dependencies": [],
8+
"repository": "",
9+
"author": {
10+
"name": "",
11+
"email": "",
12+
"url": ""
13+
},
814
"routes": {
915
"frontend": "/ledger",
1016
"api": "/api/ledger"

packages/core/src/types/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,20 @@ export interface ModuleRoutes {
2020
api: string;
2121
}
2222

23+
export interface ModuleAuthor {
24+
name?: string;
25+
email?: string;
26+
url?: string;
27+
}
28+
2329
export interface ModuleManifest {
2430
name: string;
2531
version: string;
2632
enabled: boolean;
2733
dependencies: string[];
2834
routes: ModuleRoutes;
35+
repository?: string;
36+
author?: ModuleAuthor | string;
2937
}
3038

3139
export interface IntegrationConfig {

0 commit comments

Comments
 (0)