create-specment 0.2.8 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/bin/commands/create.d.ts +0 -1
  2. package/bin/constants/languages.d.ts +0 -1
  3. package/bin/core/interactive-setup.d.ts +0 -1
  4. package/bin/core/interactive-setup.js +17 -10
  5. package/bin/core/interactive-setup.js.map +1 -1
  6. package/bin/core/interactive-setup.test.d.ts +0 -1
  7. package/bin/core/interactive-setup.test.js +7 -7
  8. package/bin/core/interactive-setup.test.js.map +1 -1
  9. package/bin/core/project-generator.d.ts +0 -1
  10. package/bin/core/project-generator.js +5 -8
  11. package/bin/core/project-generator.js.map +1 -1
  12. package/bin/features/index.d.ts +0 -1
  13. package/bin/features/index.js +15 -13
  14. package/bin/features/index.js.map +1 -1
  15. package/bin/generators/docusaurus-config.d.ts +0 -1
  16. package/bin/generators/docusaurus-config.js +211 -264
  17. package/bin/generators/docusaurus-config.js.map +1 -1
  18. package/bin/generators/package-json.d.ts +0 -1
  19. package/bin/generators/package-json.js +45 -91
  20. package/bin/generators/package-json.js.map +1 -1
  21. package/bin/generators/template-files.d.ts +0 -1
  22. package/bin/generators/template-files.js +625 -229
  23. package/bin/generators/template-files.js.map +1 -1
  24. package/bin/index.d.ts +0 -1
  25. package/bin/index.js.map +1 -1
  26. package/bin/templates/index.d.ts +0 -1
  27. package/bin/templates/index.js +36 -24
  28. package/bin/templates/index.js.map +1 -1
  29. package/bin/tests/integration.test.d.ts +0 -1
  30. package/bin/tests/integration.test.js +34 -34
  31. package/bin/tests/integration.test.js.map +1 -1
  32. package/bin/types/index.d.ts +1 -21
  33. package/bin/utils/config-merger.d.ts +0 -1
  34. package/bin/utils/config-merger.js +0 -1
  35. package/bin/utils/config-merger.js.map +1 -1
  36. package/bin/utils/errors.d.ts +0 -1
  37. package/bin/utils/install.d.ts +0 -1
  38. package/bin/utils/install.js +3 -3
  39. package/bin/utils/install.js.map +1 -1
  40. package/bin/utils/message-formatter.d.ts +0 -1
  41. package/bin/utils/template-processor.d.ts +0 -1
  42. package/bin/utils/template-processor.js +2 -3
  43. package/bin/utils/template-processor.js.map +1 -1
  44. package/bin/utils/template-processor.test.d.ts +0 -1
  45. package/bin/utils/template-processor.test.js +22 -22
  46. package/bin/utils/template-processor.test.js.map +1 -1
  47. package/bin/utils/version.d.ts +0 -1
  48. package/bin/utils/version.js +3 -3
  49. package/bin/utils/version.js.map +1 -1
  50. package/package.json +2 -7
  51. package/templates/docs/01-overview/_assumptions-constraints.mdx +19 -0
  52. package/templates/docs/01-overview/_business-context.mdx +18 -0
  53. package/templates/docs/01-overview/_firm-proposal.mdx +52 -0
  54. package/templates/docs/01-overview/_gap-analysis.mdx +18 -0
  55. package/templates/docs/01-overview/_project/342/200/221charter.mdx +23 -0
  56. package/templates/docs/01-overview/_requirements-specification.mdx +73 -0
  57. package/templates/docs/01-overview/_risks.mdx +16 -0
  58. package/templates/docs/01-overview/_scope.mdx +24 -0
  59. package/templates/docs/01-overview/_stakeholders.mdx +24 -0
  60. package/templates/docs/01-overview/as-is.mdx +64 -0
  61. package/templates/docs/01-overview/glossary.mdx +41 -0
  62. package/templates/docs/01-overview/index.mdx +41 -0
  63. package/templates/docs/01-overview/odsc.mdx +72 -0
  64. package/templates/docs/01-overview/roadmap.mdx +27 -0
  65. package/templates/docs/01-overview/system-context.mdx +22 -0
  66. package/templates/docs/01-overview/to-be.mdx +102 -0
  67. package/templates/docs/02-requirements/_category_.yaml +2 -0
  68. package/templates/docs/02-requirements/functional/_category_.json +8 -0
  69. package/templates/docs/02-requirements/functional/_req-template.mdx +46 -0
  70. package/templates/docs/02-requirements/functional/req-001.mdx +52 -0
  71. package/templates/docs/02-requirements/index.mdx +14 -0
  72. package/templates/docs/02-requirements/non-functional/_category_.json +8 -0
  73. package/templates/docs/02-requirements/non-functional/_nfr-template.mdx +42 -0
  74. package/templates/docs/02-requirements/non-functional/nfr-001.mdx +57 -0
  75. package/templates/docs/02-requirements/non-functional/nfr-002.mdx +57 -0
  76. package/templates/docs/03-external/business-model.mdx +14 -0
  77. package/templates/docs/03-external/img/business-model-by-claude.xml +107 -0
  78. package/templates/docs/03-external/img/business-model.xml +84 -0
  79. package/templates/docs/03-external/img/docsVersionDropdown.png +0 -0
  80. package/templates/docs/03-external/img/gantt.xml +1 -0
  81. package/templates/docs/03-external/img/localeDropdown.png +0 -0
  82. package/templates/docs/03-external/index.mdx +46 -0
  83. package/templates/docs/04-internal/batches/_category_.yaml +2 -0
  84. package/templates/docs/04-internal/batches/import-products.mdx +64 -0
  85. package/templates/docs/04-internal/batches/index.mdx +25 -0
  86. package/templates/docs/04-internal/index.mdx +32 -0
  87. package/templates/docs/04-internal/policies/_category_.yaml +2 -0
  88. package/templates/docs/04-internal/policies/branch-naming-rules.mdx +110 -0
  89. package/templates/docs/04-internal/policies/github.mdx +100 -0
  90. package/templates/docs/04-internal/policies/pull-request-operation-flow.mdx +118 -0
  91. package/templates/docs/04-internal/rules/_category_.yaml +2 -0
  92. package/templates/docs/04-internal/rules/database.mdx +139 -0
  93. package/templates/docs/04-internal/rules/document-creation-rules.mdx +39 -0
  94. package/templates/docs/04-internal/rules/index.mdx +10 -0
  95. package/templates/docs/04-internal/rules/markdown.mdx +148 -0
  96. package/templates/docs/04-internal/rules/review-process.mdx +32 -0
  97. package/templates/docs/04-internal/screens/_category_.yaml +2 -0
  98. package/templates/docs/04-internal/screens/dashboard.mdx +17 -0
  99. package/templates/docs/04-internal/screens/index.mdx +20 -0
  100. package/templates/docs/04-internal/screens/login.mdx +18 -0
  101. package/templates/docs/04-internal/screens/menu.mdx +17 -0
  102. package/templates/docs/04-internal/tables/_category_.yaml +2 -0
  103. package/templates/docs/04-internal/tables/customer_details.mdx +35 -0
  104. package/templates/docs/04-internal/tables/customers.mdx +35 -0
  105. package/templates/docs/04-internal/tables/index.mdx +11 -0
  106. package/templates/docs/index.module.css +96 -0
  107. package/templates/docs/index.tsx +48 -0
  108. package/templates/docs/intro.md +47 -0
  109. package/templates/docs/introduction/document-editing/_category_.yml +2 -0
  110. package/templates/docs/introduction/document-editing/how-to.mdx +31 -0
  111. package/templates/docs/introduction/index.mdx +35 -0
  112. package/templates/docs/introduction/operational-policies/_category_.yaml +2 -0
  113. package/templates/docs/introduction/operational-policies/github.mdx +33 -0
  114. package/templates/docs/introduction/operational-policies/img/branch-naming-rules.svg +73 -0
  115. package/templates/docs/introduction/operational-policies/sharepoint.mdx +28 -0
  116. package/templates/package.json.template +46 -0
  117. package/templates/src/components/Highlight/index.tsx +68 -0
  118. package/templates/src/components/PriorityMatrix/index.tsx +97 -0
  119. package/templates/src/components/TBD/index.tsx +16 -0
  120. package/templates/src/css/custom.css +81 -0
  121. package/templates/src/types/requirements.ts +19 -0
  122. package/templates/static/img/business-model.drawio.svg +4 -0
  123. package/templates/static/img/gantt.drawio.svg +1152 -0
  124. package/templates/static/img/logo.svg +21 -0
  125. package/bin/commands/create.d.ts.map +0 -1
  126. package/bin/constants/languages.d.ts.map +0 -1
  127. package/bin/core/interactive-setup.d.ts.map +0 -1
  128. package/bin/core/interactive-setup.test.d.ts.map +0 -1
  129. package/bin/core/project-generator.d.ts.map +0 -1
  130. package/bin/features/index.d.ts.map +0 -1
  131. package/bin/generators/docusaurus-config.d.ts.map +0 -1
  132. package/bin/generators/package-json.d.ts.map +0 -1
  133. package/bin/generators/template-files.d.ts.map +0 -1
  134. package/bin/index.d.ts.map +0 -1
  135. package/bin/plugins/i18n-integration.d.ts +0 -25
  136. package/bin/plugins/i18n-integration.d.ts.map +0 -1
  137. package/bin/plugins/i18n-integration.js +0 -310
  138. package/bin/plugins/i18n-integration.js.map +0 -1
  139. package/bin/plugins/plantuml-integration.d.ts +0 -17
  140. package/bin/plugins/plantuml-integration.d.ts.map +0 -1
  141. package/bin/plugins/plantuml-integration.js +0 -112
  142. package/bin/plugins/plantuml-integration.js.map +0 -1
  143. package/bin/plugins/redoc-integration.d.ts +0 -25
  144. package/bin/plugins/redoc-integration.d.ts.map +0 -1
  145. package/bin/plugins/redoc-integration.js +0 -373
  146. package/bin/plugins/redoc-integration.js.map +0 -1
  147. package/bin/plugins/search-integration.d.ts +0 -20
  148. package/bin/plugins/search-integration.d.ts.map +0 -1
  149. package/bin/plugins/search-integration.js +0 -169
  150. package/bin/plugins/search-integration.js.map +0 -1
  151. package/bin/templates/index.d.ts.map +0 -1
  152. package/bin/templates/template-definitions.d.ts +0 -10
  153. package/bin/templates/template-definitions.d.ts.map +0 -1
  154. package/bin/templates/template-definitions.js +0 -517
  155. package/bin/templates/template-definitions.js.map +0 -1
  156. package/bin/tests/integration.test.d.ts.map +0 -1
  157. package/bin/types/index.d.ts.map +0 -1
  158. package/bin/utils/config-merger.d.ts.map +0 -1
  159. package/bin/utils/errors.d.ts.map +0 -1
  160. package/bin/utils/install.d.ts.map +0 -1
  161. package/bin/utils/message-formatter.d.ts.map +0 -1
  162. package/bin/utils/template-processor.d.ts.map +0 -1
  163. package/bin/utils/template-processor.test.d.ts.map +0 -1
  164. package/bin/utils/version.d.ts.map +0 -1
  165. package/templates/classic-spec/docusaurus.config.js.template +0 -106
  166. package/templates/classic-spec/package.json.template +0 -36
  167. package/templates/external-design/docusaurus.config.js.template +0 -123
  168. package/templates/external-design/package.json.template +0 -36
  169. package/templates/internal-design/docusaurus.config.js.template +0 -123
  170. package/templates/internal-design/package.json.template +0 -36
  171. package/templates/project-analysis/docusaurus.config.js.template +0 -113
  172. package/templates/project-analysis/package.json.template +0 -36
  173. package/templates/requirements/docusaurus.config.js.template +0 -119
  174. package/templates/requirements/package.json.template +0 -36
@@ -0,0 +1,139 @@
1
+ ---
2
+ sidebar_position: 5
3
+ tags:
4
+ - Database
5
+ ---
6
+ import TBD from '@site/src/components/TBD';
7
+
8
+ # データベース
9
+
10
+ :::tip
11
+ 1. 編集中
12
+ 1. どんなプロジェクトでも使えるレベルなものにしていきたい
13
+ :::
14
+
15
+ ## オブジェクトの命名規約 {#object-naming}
16
+ ### 全般 {#general}
17
+ #### プライマリーキー、外部キー
18
+ 1. 各テーブルのプライマリーキーは `id` とし、serial型とする
19
+ 1. リレーションする際はこの `id` を使う
20
+ 1. プライマリーキーに意味を持たせない
21
+ 1. 外部キーとのリレーションはテーブル名 + `_id` とする
22
+ 1. 例
23
+ 1. 親: `class`
24
+
25
+ | 論理名 | 物理名 | 型 | コメント |
26
+ | -------- | ------ | ------- | -------------- |
27
+ | id | **id** | serial | auto increment |
28
+ | クラス名 | name | varchar | - |
29
+
30
+ 1. 子: `student`
31
+
32
+ | 論理名 | 物理名 | 型 | コメント |
33
+ | -------- | ------------ | ------- | -------------- |
34
+ | id | id | serial | auto increment |
35
+ | class_id | **class_id** | integer | 外部キー |
36
+ | 姓名 | name | varchar | - |
37
+
38
+ #### 日付 / 日時 {#date}
39
+ 1. 命名
40
+ 1. 年月日のみの場合は"xx日"、時刻まで必要な場合は"xx日時"とし、明確に使い分ける
41
+ 1. 日にちを表す項目は `受動態_on` となり、date型
42
+ 1. 日時を表す項目は `受動態_at` となり、timestamp型
43
+ 1. timestamp型はすべて `timestamp(6) without time zone` とする
44
+ 1. タイムゾーンを持たせない(標準の `UST`)
45
+ 1. 例
46
+ 1. 親: `classes`
47
+
48
+ | 論理名 | 物理名 | 型 |
49
+ | -------- | ---------- | --------- |
50
+ | 締切日 | closed_on | date |
51
+ | 締切日時 | closed_at | timestamp |
52
+ | 削除日 | deleted_on | date |
53
+ | 削除日時 | deleted_at | timestamp |
54
+
55
+ ### 大文字を使用しない
56
+ 1. 物理名は小文字とアンダーバー("_")のみを使用する
57
+ 1. テーブル名、カラム名ともに大文字を使用しない
58
+ 1. データベースによっては大文字と小文字を違う文字とみなす場合、みなさない場合があるので小文字で統一する
59
+
60
+ | OK/NG | 名前 |
61
+ | ----- | ------------ |
62
+ | :o: | **document** |
63
+ | :x: | DOCUMENT |
64
+ | :x: | Document |
65
+
66
+ #### 単語の連結はスネークケース
67
+ 1. テーブル名、カラム名ともにスネークケースを使用する
68
+ 1. 大文字を使うキャメルケースやパスカルケースは使用禁止
69
+
70
+ | OK/NG | 名前 |
71
+ | ----- | --------------- |
72
+ | :o: | **table\_name** |
73
+ | :x: | tableName |
74
+ | :x: | TableName |
75
+ | :x: | tablename |
76
+ | :x: | table-name |
77
+
78
+ ### 英語表記
79
+ 1. 基本的に単語はローマ字ではなく、英語で書く
80
+
81
+ ### 略名を使用しない
82
+ 1. 短くして意味が分からくなるよりは長くて意味がわかる名前にする
83
+ 1. ただし、データベースの種類や環境によって文字数が制限される場合は除く
84
+ 1. 以下は例外とする
85
+ 1. "数"に関する項目は `_qty` (Quantityの略)を付ける
86
+ 1. 例: `minus_points_qty`
87
+
88
+ | OK/NG | 名前 |
89
+ | ----- | --------------- |
90
+ | :o: | **start\_date** |
91
+ | :o: | **maker\_code** |
92
+ | :x: | start_dt |
93
+ | :x: | maker_cd |
94
+
95
+ ### テーブル編
96
+ #### 単数形で書く
97
+
98
+ | OK/NG | 名前 |
99
+ | ----- | ------------ |
100
+ | :o: | **document** |
101
+ | :x: | documents |
102
+ | :o: | **category** |
103
+ | :x: | categories |
104
+
105
+ #### n:n用テーブル
106
+ 1. 接頭語に`map_`を付ける
107
+
108
+ | OK/NG | 名前 |
109
+ | ----- | --------------------- |
110
+ | :o: | **map_user_category** |
111
+ | :x: | user_category |
112
+
113
+ ### カラム編
114
+ 1. ステータスを保存する項目は状態を含めて書く
115
+
116
+ | OK/NG | 名前 |
117
+ | ----- | -------------- |
118
+ | :o: | **is_working** |
119
+ | :o: | **is_deleted** |
120
+ | :x: | delete_flag |
121
+
122
+ #### flg、kbnなどの略名を使用しない
123
+ 1. 例えば"flag"と付いたboolean型にした場合、trueとfalseが見ただけでどちらがonなのかが分からないため
124
+
125
+ | OK/NG | 名前 |
126
+ | ----- | -------------- |
127
+ | :o: | **is_deleted** |
128
+ | :x: | delete_flg |
129
+ | :x: | delete_flag |
130
+
131
+ ### 制約編
132
+ 1. ユニーク制約は「テーブル名\_uq\_nn」とする
133
+ 1. `_uq` は固定文字。 `nn`はゼロ埋めの連番
134
+ 1. 例: `user_uq_01`
135
+
136
+ ### インデックス編
137
+ 1. インデックスは「テーブル名\_idx\_nn」とする
138
+ 1. `_idx` は固定文字。 `nn`はゼロ埋めの連番
139
+ 1. 例: `user_idx_01`
@@ -0,0 +1,39 @@
1
+ ---
2
+ sidebar_position: 3
3
+ ---
4
+ # ドキュメント作成ルール
5
+
6
+ ## ファイル命名規則
7
+ 1. ファイル名はケバブケースを利用。日本語禁止
8
+ 1. 例
9
+ `document-creation-rules.mdx`
10
+ 1. テンプレートファイル(ファイル名が`_`で始まるもの)がある場合は、該当ファイルをコピーして使用する
11
+
12
+ ## Frontmatter(header yaml)の書き方
13
+ 1. 各MDXファイルの先頭には必ずYAMLフロントマターを記述
14
+ 1. 必須フィールド
15
+ 1. `slug`:URLパス
16
+ 1. `title`:ページ見出し
17
+ 1. `sidebar_position`:サイドバー表示順
18
+ 1. 記述例
19
+ ```md
20
+ ---
21
+ sidebar_position: 1
22
+ ---
23
+ ```
24
+
25
+ ## 執筆スタイル
26
+ 1. 1ファイル内の文体は「です/ます調」を統一すること
27
+ 1. 専門用語や略語を初出時に日本語で説明する
28
+
29
+ ## `_category_.yaml` の書き方
30
+ 1. フォルダーをsidebarで日本語表示するために必要
31
+ 1. 各ドキュメントフォルダー直下に配置
32
+ 1. 必須フィールド
33
+ 1. `label`:カテゴリ名
34
+ 1. `position`:サイドバー内の並び順(数値)
35
+ 1. 記述例
36
+ ```yaml
37
+ label: ドキュメント作成
38
+ position: 1
39
+ ```
@@ -0,0 +1,10 @@
1
+ ---
2
+ sidebar_position: 1
3
+ ---
4
+ # 規約・ルール
5
+ 1. [markdown](markdown.mdx)
6
+ 1. [databaase](database.mdx)
7
+ 1. TypeScript
8
+ 1. Google TypeScript Style Guide
9
+ 1. https://google.github.io/styleguide/tsguide.html
10
+
@@ -0,0 +1,148 @@
1
+ ---
2
+ sidebar_position: 2
3
+ tags:
4
+ - Markdown
5
+ ---
6
+ # Markdown
7
+ ## 基本 {#basic}
8
+ ### 章立て {#chapter}
9
+ 1. 例
10
+ ```markdown
11
+ # 章タイトル
12
+ ## 章タイトルごとに"#"を増やす。最大で5章まで
13
+ 1. 実用的には3、4階層が妥当
14
+ 1. 深すぎる階層が多くなる場合は抽象度を再検討する
15
+ ```
16
+ 1. 章のひとつ上の行は空行にする
17
+ 1. ただし、更に上の行が章の場合は空行不要
18
+ 1. 例
19
+ ```markdown
20
+ # 本タイトル
21
+ ## サブタイトル1。本タイトルとサブタイトルの間に空行は不要
22
+ 1. 箇条書き例
23
+
24
+ ## サブタイトル2。上の行は章ではないため、空行を入れる
25
+ 1. 箇条書き例
26
+ ```
27
+
28
+ ### 箇条書き {#itemization}
29
+ 1. 仕様を会話で伝える際、番号であったほうが伝えやすいので数値になるように `1. ` を使用する
30
+ 1. 数値はレンダリング時に連番になるので、2番目以降でもすべて `1. ` とする
31
+ 1. 例
32
+ ```markdown
33
+ 1. 1つ目
34
+ 1. 2つ目でも "1. "
35
+ 1. インデントは半角スペース4つ。タブ文字禁止
36
+ 1. 2つ目でも "1. "
37
+ ```
38
+ 1. 例のレンダリング結果
39
+ 1. 1つ目
40
+ 1. 2つ目でも "1. "
41
+ 1. インデントは半角スペース4つ。タブ文字禁止
42
+ 1. 2つ目でも "1. "
43
+ 1. VSCode利用時にインクリメントされてしまう場合は以下の設定にする
44
+ ```json title="settings.json"
45
+ "markdown.extension.orderedList.marker": "one",
46
+ ```
47
+
48
+ ### 強調表示 {#highlighting}
49
+ 1. 以下を参考
50
+ 1. 公式Docusaurus - Markdown Features: https://docusaurus.io/docs/markdown-features
51
+
52
+ :::note
53
+ 1. 斜体(italic)も使えるけど、あまり見やすいと思えないので、仕様としては使わないようにしたい
54
+ :::
55
+
56
+ ### その他 {#other}
57
+ 1. 使えるemoji。絵文字
58
+ 1. 参考: WebFX - [EMOJI CHEAT SHEET](https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md)
59
+
60
+ ## 応用 {#application}
61
+ ### 他ドキュメントへのリンク {#link-to-other-documents}
62
+ 1. 別のドキュメントファイルへのリンクは相対パスで書く
63
+
64
+ ```markdown
65
+ 1. 同じ階層なら > [別のmdx](other.mdx)
66
+ 1. 子階層 > [カレントにあるフォルダー内のファイル](subfolder/dummy.mdx)
67
+ 1. 別階層 > [親をたどって書く](../rules/markdown.mdx)
68
+ ```
69
+
70
+ ### 詳細表示 {#details}
71
+ 1. htmlの記述と同じ
72
+ 1. 例
73
+ ```mdx-code-block
74
+ <details>
75
+ <summary>ここをクリックして開閉</summary>
76
+ <div>
77
+ <div>詳細はここに書く</div>
78
+ \
79
+ <details>
80
+ <summary>ネストして書くこともできる</summary>
81
+ <div>
82
+ :grinning::smile::grin::laughing::blush::wink:
83
+ </div>
84
+ </details>
85
+ </div>
86
+ </details>
87
+ ```
88
+ 1. 例のレンダリング結果
89
+ <details>
90
+ <summary>ここをクリックして開閉</summary>
91
+ <div>
92
+ <div>詳細はここに書く</div>
93
+ \
94
+ <details>
95
+ <summary>ネストして書くこともできる</summary>
96
+ <div>
97
+ :grinning::smile::grin::laughing::blush::wink:
98
+ </div>
99
+ </details>
100
+ </div>
101
+ </details>
102
+
103
+ ### コードブロック {#code-block}
104
+ 1. \`\`\`(バッククォート3つ)で囲うとコードブロックになる
105
+ 1. 使えるコードは以下を参照
106
+ 1. prismjs.com - [Supported languages](https://prismjs.com/#supported-languages)
107
+ 1. `{`、`}` で囲うとその行がハイライト表示される
108
+ 1. `title=` を追加するとタイトル表示できる
109
+ 1. ハイライトとtitleを続けて書く場合は区切りとして半角スペースが必要
110
+ 1. 例
111
+ ```md
112
+ ```nim {4-6,8} title="sample.nim" showLineNumbers
113
+ import tables, strutils
114
+
115
+ var wordFrequencies = initCountTable[string]()
116
+ for line in stdin.lines:
117
+ for word in line.split(", "):
118
+ wordFrequencies.inc(word)
119
+
120
+ echo "The most frequent word is '", wordFrequencies.largest, "'"
121
+ ```
122
+
123
+ 1. 例のレンダリング結果
124
+ ```nim {4-6,8} title="sample.nim" showLineNumbers
125
+ import tables, strutils
126
+
127
+ var wordFrequencies = initCountTable[string]()
128
+ for line in stdin.lines:
129
+ for word in line.split(", "):
130
+ wordFrequencies.inc(word)
131
+
132
+ echo "The most frequent word is '", wordFrequencies.largest, "'"
133
+ ```
134
+
135
+ ## docusaurus用 {#for-docusaurus}
136
+ ### 強調記号 {#emphasis-added}
137
+ 1. アンダーバー(`_`)やアスタリスクなどを使う時、強調表示されてしまうので円マークorバックスラッシュ(`\`)を使って回避する
138
+ 1. `_Italic_` {'>'} _Italic_
139
+ 1. `\_Italic\_` {'>'} \_Italic\_
140
+
141
+ ### 不等号 {#inequality-sign}
142
+ 1. `<`、`>` を使うとhtmlタグ扱いでエラーとなる場合があるので以下の方法を使って回避する
143
+ 1. 全角不等号を使う
144
+ 1. :x:: `<強調したい文言>`
145
+ 1. :o:: `<強調したい文言>`
146
+ 1. `{'`、`'}` で括る
147
+ 1. :x:: `abc <= 100`
148
+ 1. :o:: `abc {'<='} 100`
@@ -0,0 +1,32 @@
1
+ ---
2
+ sidebar_position: 4
3
+ ---
4
+ # レビュープロセス
5
+
6
+ ## モブプログラミング推奨
7
+ 1. チーム全員でリアルタイムにコードを確認し、知識を共有する
8
+ 1. その場でフィードバックを行い、修正や改善を即時反映する
9
+
10
+ ## 設計との照合
11
+ 1. 実装が設計書どおりに実現されているか確認する
12
+ 1. 設計書の該当セクションとコード箇所を突き合わせる
13
+
14
+ ## 設計の妥当性確認
15
+ 1. 設計に漏れや誤りがないかレビューする
16
+ 1. 要件やユースケースの抜け漏れ、前提条件の過不足をチェックする
17
+
18
+ ## エラー/警告対応
19
+ 1. コンパイルエラーやリンター警告がすべて解消されているか確認する
20
+ 1. CIパイプラインでのビルド失敗やテストエラーがないかチェックする
21
+
22
+ ## コード品質
23
+ 1. 可読性・保守性の高いコードになっているか確認する
24
+ 1. 冗長なロジックや複雑度の高い箇所を適切にリファクタリングする
25
+
26
+ ## issueチェックリスト
27
+ 1. issueに紐づくチェックリスト項目(テスト、ドキュメント更新など)がすべて完了しているか確認する
28
+ 1. 必要に応じて新たなテストケースやドキュメントを追加する
29
+
30
+ ## 命名規則
31
+ 1. 変数名・関数名がプロジェクトの命名規則に沿っているか確認する
32
+ 1. 一貫性があり意図が明確な名前付けになっているかチェックする
@@ -0,0 +1,2 @@
1
+ label: '画面'
2
+ position: 5
@@ -0,0 +1,17 @@
1
+ ---
2
+ sidebar_position: 4
3
+ ---
4
+ import TBD from '@site/src/components/TBD';
5
+
6
+ # ダッシュボード
7
+ ## ファイル
8
+ <!-- 1. frontend/src/routes/[dashboard.svelte](../../../../frontend/src/routes/dashboard.svelte) -->
9
+
10
+ ## 概要
11
+ 1. <TBD/>
12
+
13
+ ## 画面イメージ
14
+ 1. <TBD/>
15
+
16
+ ## 項目説明
17
+ 1. <TBD/>
@@ -0,0 +1,20 @@
1
+ ---
2
+ id: index
3
+ sidebar_position: 1
4
+ hide_table_of_contents: true
5
+ ---
6
+ import TBD from '@site/src/components/TBD';
7
+
8
+ # 画面定義
9
+ ## 画面一覧
10
+
11
+ | Physical name | Logical name | Summyry | Comment |
12
+ | -------------------------- | -------------- | ------- | ------- |
13
+ | [login](login.mdx) | ログイン | - | |
14
+ | └ registration | 新規登録 | - | |
15
+ | └ update-password | パスワード更新 | - | |
16
+ | [menu](menu.mdx) | メニュー | - | |
17
+ | [dashboard](dashboard.mdx) | ダッシュボード | - | |
18
+
19
+ ## 画面遷移
20
+ <TBD/>
@@ -0,0 +1,18 @@
1
+ ---
2
+ sidebar_position: 2
3
+ ---
4
+ import TBD from '@site/src/components/TBD';
5
+
6
+ # ログイン
7
+ ## ファイル
8
+ <!-- 1. frontend/src/routes/[login.svelte](../../../../frontend/src/routes/login.svelte) -->
9
+
10
+ ## 概要
11
+ 1. ログイン画面
12
+ 1. セッションなし
13
+
14
+ ## 画面イメージ
15
+ 1. <TBD/>
16
+
17
+ ## 項目説明
18
+ 1. <TBD/>
@@ -0,0 +1,17 @@
1
+ ---
2
+ sidebar_position: 3
3
+ ---
4
+ import TBD from '@site/src/components/TBD';
5
+
6
+ # メニュー
7
+ ## ファイル
8
+ <!-- 1. frontend/src/routes/[menu.svelte](../../../../frontend/src/routes/menu.svelte) -->
9
+
10
+ ## 概要
11
+ 1. メニュー画面
12
+
13
+ ## 画面イメージ
14
+ 1. <TBD/>
15
+
16
+ ## 項目説明
17
+ 1. <TBD/>
@@ -0,0 +1,2 @@
1
+ label: 'テーブル定義'
2
+ position: 6
@@ -0,0 +1,35 @@
1
+ ---
2
+ sidebar_position: 3
3
+ hide_table_of_contents: true
4
+ ---
5
+ import TOCInline from '@theme/TOCInline';
6
+
7
+ # customer_details - 会員詳細
8
+
9
+ <details>
10
+ <summary>目次</summary>
11
+
12
+ <TOCInline toc={toc} />
13
+ </details>
14
+
15
+ ## 説明 {#description}
16
+ 1. xxxの会員詳細
17
+ 1. 会員の電話番号、住所など
18
+
19
+ ## 表領域(schema) {#schema}
20
+ 1. `public`
21
+
22
+ ## 定義 {#definition}
23
+
24
+ | Physical name | Logical name | Type | Digit | Not null | Default value | Comment |
25
+ | ---------------- | ------------ | --------- | ----: | :------: | ----------------- | ------- |
26
+ | id | ID | serial | - | :o: | | |
27
+ | customer_id | 顧客ID | varchar | 100 | :o: | | |
28
+ | phone_number | 電話番号 | varchar | 12 | :o: | | |
29
+ | postal_code | 郵便番号 | varchar | 8 | :o: | | |
30
+ | address_1 | 住所1 | varchar | 500 | :o: | | |
31
+ | address_2 | 住所2 | varchar | 500 | :o: | | |
32
+ | created_id | 作成者ID | integer | - | :o: | | |
33
+ | created_at | 作成日時 | timestamp | - | :o: | current_timestamp | |
34
+ | last_modified_id | 更新者ID | integer | - | :o: | | |
35
+ | last_modified_at | 更新日時 | timestamp | - | :o: | current_timestamp | |
@@ -0,0 +1,35 @@
1
+ ---
2
+ sidebar_position: 2
3
+ hide_table_of_contents: true
4
+ ---
5
+ import TOCInline from '@theme/TOCInline';
6
+
7
+ # customers - 会員
8
+
9
+ <details>
10
+ <summary>目次</summary>
11
+
12
+ <TOCInline toc={toc} />
13
+ </details>
14
+
15
+ ## 説明 {#description}
16
+ 1. xxxの会員
17
+
18
+ ## 表領域(schema) {#schema}
19
+ 1. `public`
20
+
21
+ ## 定義 {#definition}
22
+
23
+ | Physical name | Logical name | Type | Digit | Not null | Default value | Comment |
24
+ | ------------------ | ------------ | --------- | ----: | :------: | ----------------- | ---------------------------- |
25
+ | id | ID | serial | - | :o: | | |
26
+ | login_id | ログインID | varchar | 255 | :o: | | |
27
+ | customer_number | 顧客番号 | varchar | 100 | :o: | | |
28
+ | password_encrypted | パスワード | varchar | 255 | :o: | | |
29
+ | is_enabled | is有効 | boolean | - | :o: | true | true:有効<br/>false:無効 |
30
+ | is_withdrawn | is退会 | boolean | - | :o: | false | true:退会済<br/>false:未退会 |
31
+ | withdrawn_at | 退会日時 | timestamp | - | - | | |
32
+ | created_id | 作成者ID | integer | - | - | | |
33
+ | created_at | 作成日時 | timestamp | - | :o: | current_timestamp | |
34
+ | last_modified_id | 更新者ID | integer | - | :o: | | |
35
+ | last_modified_at | 更新日時 | timestamp | - | :o: | current_timestamp | |
@@ -0,0 +1,11 @@
1
+ ---
2
+ sidebar_position: 1
3
+ hide_table_of_contents: true
4
+ ---
5
+ # テーブル定義
6
+ ## テーブル一覧
7
+
8
+ | Physical name | Logical name | Schema | Comment |
9
+ | ----------------------------------------- | ------------ | ------ | ------- |
10
+ | [customers](customers.mdx) | 会員 | public | |
11
+ | └[customer_details](customer_details.mdx) | 会員詳細 | public | |
@@ -0,0 +1,96 @@
1
+ .mainContent {
2
+ min-height: calc(100vh - var(--ifm-navbar-height) - var(--ifm-footer-height));
3
+ display: flex;
4
+ flex-direction: column;
5
+ }
6
+
7
+ .heroBanner {
8
+ padding: 2rem 0;
9
+ text-align: center;
10
+ position: relative;
11
+ overflow: hidden;
12
+ background: linear-gradient(
13
+ 135deg,
14
+ var(--ifm-color-primary) 0%,
15
+ var(--ifm-color-primary-darker) 100%
16
+ );
17
+ }
18
+
19
+ .heroBanner h1 {
20
+ font-size: 2.5rem;
21
+ margin-bottom: 1rem;
22
+ }
23
+
24
+ .documentSection {
25
+ padding: 3rem 0 0;
26
+ background-color: var(--ifm-background-color);
27
+ text-align: center;
28
+ }
29
+
30
+ .documentSection p {
31
+ max-width: 800px;
32
+ margin: 0 auto 2rem;
33
+ font-size: 1.1rem;
34
+ color: var(--ifm-color-emphasis-700);
35
+ }
36
+
37
+ .featureCard {
38
+ padding: 1.5rem;
39
+ height: 100%;
40
+ border-radius: 12px;
41
+ background-color: var(--ifm-card-background-color);
42
+ border: 1px solid var(--ifm-color-emphasis-200);
43
+ transition: all 0.3s ease;
44
+ margin-bottom: 0;
45
+ }
46
+
47
+ .featureCard:hover {
48
+ transform: translateY(-4px);
49
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
50
+ border-color: var(--ifm-color-primary);
51
+ }
52
+
53
+ .featureCard h3 {
54
+ margin-bottom: 1rem;
55
+ color: var(--ifm-color-primary);
56
+ font-size: 1.5rem;
57
+ }
58
+
59
+ .featureCard ul {
60
+ list-style: none;
61
+ padding-left: 0;
62
+ margin-bottom: 1.5rem;
63
+ }
64
+
65
+ .featureCard li {
66
+ margin-bottom: 0.8rem;
67
+ color: var(--ifm-font-color-base);
68
+ }
69
+
70
+ .featureCard a {
71
+ color: var(--ifm-link-color);
72
+ text-decoration: none;
73
+ transition: color 0.2s;
74
+ }
75
+
76
+ .featureCard li a {
77
+ display: block;
78
+ padding: 0.5rem;
79
+ border-radius: 6px;
80
+ transition: background-color 0.2s;
81
+ }
82
+
83
+ .featureCard li a:hover {
84
+ background-color: var(--ifm-color-emphasis-100);
85
+ color: var(--ifm-color-primary);
86
+ }
87
+
88
+ @media screen and (max-width: 996px) {
89
+ .heroBanner {
90
+ padding: 2rem;
91
+ }
92
+
93
+ .documentSection {
94
+ padding: 2rem;
95
+ }
96
+ }
@@ -0,0 +1,48 @@
1
+ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
2
+ import Heading from '@theme/Heading';
3
+ import Layout from '@theme/Layout';
4
+ import clsx from 'clsx';
5
+ import type { ReactNode } from 'react';
6
+
7
+ import styles from './index.module.css';
8
+
9
+ function HomepageHeader() {
10
+ const { siteConfig } = useDocusaurusContext();
11
+ return (
12
+ <header className={clsx('hero hero--primary', styles.heroBanner)}>
13
+ <div className="container">
14
+ <Heading as="h1" className="hero__title">
15
+ {siteConfig.title}
16
+ </Heading>
17
+ <p className="hero__subtitle">{siteConfig.tagline}</p>
18
+ </div>
19
+ </header>
20
+ );
21
+ }
22
+
23
+ function DocumentSection() {
24
+ const { siteConfig } = useDocusaurusContext();
25
+ return (
26
+ <div className={styles.documentSection}>
27
+ <div className="container">
28
+ <Heading as="h2">このサイトについて</Heading>
29
+ <p>
30
+ このサイトは{siteConfig.title}
31
+ の設計、仕様を管理するためのドキュメントサイトです。
32
+ </p>
33
+ </div>
34
+ </div>
35
+ );
36
+ }
37
+
38
+ export default function Home(): ReactNode {
39
+ const { siteConfig } = useDocusaurusContext();
40
+ return (
41
+ <Layout title={siteConfig.title} description="システム仕様書管理サイト">
42
+ <HomepageHeader />
43
+ <main className={styles.mainContent}>
44
+ <DocumentSection />
45
+ </main>
46
+ </Layout>
47
+ );
48
+ }