Skip to content

Commit 873bfc5

Browse files
committed
#56 *.mdを更新
1 parent ab7cf0f commit 873bfc5

7 files changed

Lines changed: 92 additions & 36 deletions

File tree

‎template/README.md‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This project was bootstrapped with [Create Next2D App](https://github.com/Next2D
1717
- [ユニットテスト / Unit Test](#ユニットテスト--unit-test)
1818
- [ビルド / Build](#ビルド--build)
1919
- [ディレクトリ構成 / Directory Structure](#ディレクトリ構成--directory-structure)
20+
- [📚 詳細ドキュメント / Detailed Documentation](#-詳細ドキュメント--detailed-documentation)
2021
- [ライセンス / License](#ライセンス--license)
2122

2223
---
@@ -232,6 +233,46 @@ See the `README.md` in each directory for details.
232233

233234
---
234235

236+
## 📚 詳細ドキュメント / Detailed Documentation
237+
238+
各ディレクトリには、実装ガイドとなるREADME.mdが配置されています。AIエージェントやコード生成ツールは、これらのドキュメントを参照することで、アーキテクチャに沿った実装が可能です。
239+
240+
Each directory contains a README.md that serves as an implementation guide. AI agents and code generation tools can reference these documents to implement code that follows the architecture.
241+
242+
### アーキテクチャ層 / Architecture Layers
243+
244+
| ドキュメント / Document | 説明 / Description |
245+
|------------------------|-------------------|
246+
| [src/model/README.md](./src/model/README.md) | Model層全体の概要、3層構造の説明 |
247+
| [src/model/application/README.md](./src/model/application/README.md) | Application層:UseCaseパターンの実装ガイド |
248+
| [src/model/domain/README.md](./src/model/domain/README.md) | Domain層:コアビジネスロジックの実装ガイド |
249+
| [src/model/infrastructure/README.md](./src/model/infrastructure/README.md) | Infrastructure層:Repositoryパターンの実装ガイド |
250+
251+
### UIコンポーネント / UI Components
252+
253+
| ドキュメント / Document | 説明 / Description |
254+
|------------------------|-------------------|
255+
| [src/ui/README.md](./src/ui/README.md) | UI層全体の概要、アトミックデザイン階層 |
256+
| [src/ui/component/README.md](./src/ui/component/README.md) | Atom/Molecule/Pageコンポーネントの実装ガイド |
257+
| [src/ui/content/README.md](./src/ui/content/README.md) | Animation Toolコンテンツの実装ガイド |
258+
| [src/ui/animation/README.md](./src/ui/animation/README.md) | アニメーション定義の実装ガイド |
259+
260+
### View/ViewModel & 設定 / View/ViewModel & Configuration
261+
262+
| ドキュメント / Document | 説明 / Description |
263+
|------------------------|-------------------|
264+
| [src/view/README.md](./src/view/README.md) | View/ViewModelのMVVMパターン実装ガイド |
265+
| [src/config/README.md](./src/config/README.md) | 設定ファイル(stage.json, config.json, routing.json)の詳細 |
266+
| [src/interface/README.md](./src/interface/README.md) | インターフェース定義と型安全性のガイド |
267+
268+
### 静的アセット / Static Assets
269+
270+
| ドキュメント / Document | 説明 / Description |
271+
|------------------------|-------------------|
272+
| [src/assets/README.md](./src/assets/README.md) | 画像・JSONなど静的ファイルの管理ガイド |
273+
274+
---
275+
235276
## ライセンス / License
236277

237278
MIT License

‎template/src/model/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ model/
1919
│ └── NavigateToViewUseCase.ts
2020
├── domain/ # ドメイン層
2121
│ └── callback/
22+
│ ├── Background.ts # コールバッククラス本体
2223
│ └── Background/
23-
│ ├── Background.ts
2424
│ └── service/
2525
│ ├── BackgroundDrawService.ts
2626
│ └── BackgroundChangeScaleService.ts

‎template/src/ui/README.md‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ ui/
1111
├── animation/ # アニメーション定義
1212
├── component/
1313
│ ├── atom/ # 最小単位
14-
│ └── molecule/ # 複合コンポーネント
14+
│ ├── molecule/ # 複合コンポーネント
15+
│ ├── organism/ # 複数Moleculeの組み合わせ(将来の拡張用)
16+
│ ├── page/ # ページコンポーネント
17+
│ └── template/ # ページテンプレート(将来の拡張用)
1518
└── content/ # Animation Tool
1619
```
1720

@@ -83,15 +86,13 @@ export class HomeBtnMolecule extends ButtonAtom implements IDraggable {
8386
this.homeContent = new HomeContent();
8487
this.addChild(this.homeContent);
8588
}
86-
87-
startDrag(): void { ... }
88-
stopDrag(): void { ... }
89+
// IDraggableメソッド(startDrag/stopDrag)はMovieClipContentの親クラスから継承
8990
}
9091
```
9192

9293
**特徴 / Features:**
9394
- `ButtonAtom` を継承
94-
- `IDraggable` インターフェースを実装
95+
- `IDraggable` インターフェースを実装(メソッドは`MovieClipContent`親クラスから継承)
9596
- ドラッグ&ドロップ機能を提供
9697

9798
#### component/molecule/TopBtnMolecule.ts
@@ -195,10 +196,10 @@ export class TextAtom extends TextField {
195196
Depend on abstractions, not concretions.
196197

197198
```typescript
198-
// ✅ 良い例: インターフェースを実装
199+
// ✅ 良い例: インターフェースを実装し、内部のContentに委譲
199200
export class HomeBtnMolecule extends ButtonAtom implements IDraggable {
200-
startDrag(): void { ... }
201-
stopDrag(): void { ... }
201+
private readonly homeContent: HomeContent;
202+
// IDraggableメソッド(startDrag/stopDrag)はMovieClipContentの親クラスから継承
202203
}
203204
```
204205

‎template/src/ui/component/README.md‎

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ component/
1111
├── atom/ # 最小単位
1212
│ ├── ButtonAtom.ts
1313
│ └── TextAtom.ts
14-
└── molecule/ # 複合コンポーネント
15-
├── HomeBtnMolecule.ts
16-
└── TopBtnMolecule.ts
14+
├── molecule/ # 複合コンポーネント
15+
│ ├── HomeBtnMolecule.ts
16+
│ └── TopBtnMolecule.ts
17+
├── organism/ # 複数Moleculeの組み合わせ(将来の拡張用)
18+
├── page/ # ページコンポーネント
19+
│ ├── home/
20+
│ │ └── HomePage.ts
21+
│ └── top/
22+
│ └── TopPage.ts
23+
└── template/ # ページテンプレート(将来の拡張用)
1724
```
1825

1926
## アトミックデザイン階層 / Atomic Design Hierarchy
@@ -33,9 +40,30 @@ The most basic UI elements. The smallest components that cannot be divided furth
3340

3441
Components with more complex functionality, combining multiple Atoms.
3542

36-
- `HomeBtnMolecule` - Home画面用のボタン(ドラッグ機能付き)
43+
- `HomeBtnMolecule` - Home画面用のボタン(ドラッグ機能付き、`IDraggable`は内部の`HomeContent`経由で提供)
3744
- `TopBtnMolecule` - Top画面用のボタン(アニメーション付き)
3845

46+
### Organism (有機体) - 将来の拡張用
47+
48+
複数のMoleculeを組み合わせた、より大きな機能単位のコンポーネントです。現在は`.gitkeep`のみで、必要に応じて実装します。
49+
50+
Larger functional unit components combining multiple Molecules. Currently contains only `.gitkeep`, to be implemented as needed.
51+
52+
### Template (テンプレート) - 将来の拡張用
53+
54+
ページのレイアウト構造を定義するテンプレートです。現在は`.gitkeep`のみで、必要に応じて実装します。
55+
56+
Templates that define page layout structures. Currently contains only `.gitkeep`, to be implemented as needed.
57+
58+
### Page (ページ)
59+
60+
画面全体を構成するコンポーネントです。ViewからPageを配置し、PageがMoleculeやAtomを組み合わせて画面を構築します。
61+
62+
Components that compose entire screens. Views place Pages, and Pages combine Molecules and Atoms to build screens.
63+
64+
- `HomePage` - Home画面のページコンポーネント
65+
- `TopPage` - Top画面のページコンポーネント
66+
3967
## 設計原則 / Design Principles
4068

4169
### 1. 単一責任の原則 / Single Responsibility
@@ -61,10 +89,10 @@ export class TextAtom extends TextField {
6189
Depend on abstractions, not concretions.
6290

6391
```typescript
64-
// ✅ 良い例
65-
export class HomeBtnMolecule implements IDraggable {
66-
startDrag(): void { ... }
67-
stopDrag(): void { ... }
92+
// ✅ 良い例: IDraggableを実装し、内部のContentに委譲
93+
export class HomeBtnMolecule extends ButtonAtom implements IDraggable {
94+
private readonly homeContent: HomeContent;
95+
// IDraggableメソッドはMovieClipContent(HomeContent)の親クラスから継承
6896
}
6997
```
7098

‎template/src/ui/component/organism/.gitkeep‎

Whitespace-only changes.

‎template/src/ui/component/template/.gitkeep‎

Whitespace-only changes.

‎template/src/ui/content/README.md‎

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,10 @@ export class HomeContent extends MovieClipContent implements IDraggable
6868
return "HomeContent"; // Animation Toolで設定したシンボル名
6969
}
7070

71-
/**
72-
* @description ドラッグを開始
73-
* Start dragging
74-
*/
75-
startDrag (): void
76-
{
77-
// ドラッグ処理
78-
}
79-
80-
/**
81-
* @description ドラッグを停止
82-
* Stop dragging
83-
*/
84-
stopDrag (): void
85-
{
86-
// ドラッグ停止処理
87-
}
71+
// IDraggableのメソッド(startDrag/stopDrag)は
72+
// MovieClipContentの親クラス(MovieClip)から継承されます
73+
// The IDraggable methods (startDrag/stopDrag) are inherited
74+
// from MovieClipContent's parent class (MovieClip)
8875
}
8976
```
9077

@@ -154,8 +141,7 @@ Implement interfaces as needed to integrate with the business logic layer.
154141

155142
```typescript
156143
export class HomeContent extends MovieClipContent implements IDraggable {
157-
startDrag(): void { ... }
158-
stopDrag(): void { ... }
144+
// IDraggableメソッドはMovieClipContentの親クラスから継承
159145
}
160146
```
161147

0 commit comments

Comments
 (0)