From 69857b98a1fdef1cc63e6ba4db80355493e9619b Mon Sep 17 00:00:00 2001 From: Koseeee-27 Date: Thu, 16 Apr 2026 16:34:02 +0900 Subject: [PATCH 1/7] =?UTF-8?q?chore:=20.DS=5FStore=E3=82=92gitignore?= =?UTF-8?q?=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8a6488f..d31fb81 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ dist/ .env *.js.map +.DS_Store From 6c2a1ee1f1ba519752e90a5263a97b76d5abb5fd Mon Sep 17 00:00:00 2001 From: Koseeee-27 Date: Thu, 16 Apr 2026 16:34:55 +0900 Subject: [PATCH 2/7] =?UTF-8?q?docs:=20=E9=96=8B=E7=99=BA=E3=83=AB?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=83=89=E3=82=AD=E3=83=A5=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 5 ++ docs/development-rule.md | 113 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 docs/development-rule.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..3b81df4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,5 @@ +# Contributing + +開発ルール(ブランチ・コミット・PR・Issue の運用ルール)は以下を参照してください。 + +→ [docs/development-rule.md](docs/development-rule.md) diff --git a/docs/development-rule.md b/docs/development-rule.md new file mode 100644 index 0000000..0320e19 --- /dev/null +++ b/docs/development-rule.md @@ -0,0 +1,113 @@ +# 開発ルール + +このドキュメントは KC3-2026(Real You)の開発ルールをまとめたものです。 +チームメンバー全員がこのルールに沿って開発を進めます。 + +## ブランチ運用 + +- デフォルトブランチは `develop` +- 作業は必ずブランチを切って行い、PR 経由で `develop` にマージする +- `develop` に直接コミットしない + +### ブランチの命名規則 + +`/<短い説明>` の形式で付ける。説明は英語で短く。 + +| type | 用途 | 例 | +|------|------|-----| +| `feature/` | 新機能の追加 | `feature/add-share-button` | +| `fix/` | バグ修正 | `fix/result-display-error` | +| `docs/` | ドキュメントの追加・修正 | `docs/add-setup-guide` | +| `refactor/` | リファクタリング | `refactor/cleanup-game-logic` | +| `chore/` | 設定変更・雑務 | `chore/update-dependencies` | + +### ブランチの作り方(コマンド例) + +```bash +# develop を最新にする +git checkout develop +git pull origin develop + +# 新しいブランチを作成 +git checkout -b feature/add-share-button +``` + +## コミットメッセージ + +英語の prefix + 日本語の本文で書く。 + +### 形式 + +``` +: <日本語で変更内容> +``` + +### prefix 一覧 + +| prefix | 用途 | 例 | +|--------|------|-----| +| `feat:` | 新機能 | `feat: SNSシェアボタンを追加` | +| `fix:` | バグ修正 | `fix: 結果画面が表示されない問題を修正` | +| `docs:` | ドキュメント | `docs: 環境構築手順を追加` | +| `style:` | スタイル調整(機能変更なし) | `style: ボタンの余白を調整` | +| `refactor:` | リファクタリング | `refactor: ゲームロジックを整理` | +| `chore:` | 設定・雑務 | `chore: パッケージを更新` | + +### コミットの粒度 + +- 1 つの論理的な変更につき 1 コミット +- 「あれもこれも」と 1 コミットに詰め込まない +- こまめにコミットする(変更を放置しない) + +## Pull Request + +- 基本的には `develop` ブランチに向けて PR を出す +- PR はテンプレートに沿って書く(`.github/PULL_REQUEST_TEMPLATE.md` が自動で反映される) +- レビューが通ってからマージする + +### PR のサイズ目安 + +- 変更ファイル: 10 個以下 +- 変更行数: 300 行以下 + +大きくなりそうな場合は Issue を分割して、PR も分ける。 + +## Issue + +### Issue の作成ルール + +- バグ報告・新機能・改善提案は Issue テンプレートに沿って作成する +- タイトルは何が問題か / 何をしたいかが一目でわかるように書く +- 良い例: 「結果画面のレーダーチャートが表示されない」 +- 悪い例: 「バグ」「表示がおかしい」 + +### ラベル運用 + +Issue には以下の 3 軸からラベルを付ける。**カテゴリと種別は必ず付ける。** 優先度は相談して決める。 + +#### カテゴリ(何を変えるか) + +| ラベル | 用途 | +|-------|------| +| `frontend` | フロントエンドの変更 | +| `backend` | バックエンドの変更 | +| `design` | デザイン・UI/UX の変更 | +| `infra` | デプロイ・CI/CD・環境系 | +| `docs` | ドキュメントのみの変更 | + +#### 種別(何をするか) + +| ラベル | 用途 | +|-------|------| +| `bug` | バグ修正 | +| `feature` | 新機能追加 | +| `improve` | 既存機能の改善・UX 向上 | +| `refactor` | リファクタリング | + +#### 優先度(技育博に向けてどれが重要か) + +| ラベル | 基準 | +|-------|------| +| `priority: high` | デモに必須。これがないと見せられない | +| `priority: mid` | あると体験が良くなる | +| `priority: low` | 余裕があればやる | From d87e01232a8b763f198761eade1f69e86d18dc95 Mon Sep 17 00:00:00 2001 From: Koseeee-27 Date: Thu, 16 Apr 2026 16:42:47 +0900 Subject: [PATCH 3/7] =?UTF-8?q?docs:=20PR=E3=83=86=E3=83=B3=E3=83=97?= =?UTF-8?q?=E3=83=AC=E3=83=BC=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..dcf6cda --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,14 @@ +## 概要 + + +## 変更内容 + +- + +## 関連 Issue + + + + +## 動作確認 + From d435a713a548d7ddf4404a8bdd4b5e0b7215deae Mon Sep 17 00:00:00 2001 From: Koseeee-27 Date: Thu, 16 Apr 2026 16:59:50 +0900 Subject: [PATCH 4/7] =?UTF-8?q?docs:=20Issue=E3=83=86=E3=83=B3=E3=83=97?= =?UTF-8?q?=E3=83=AC=E3=83=BC=E3=83=88=E3=81=A8=E3=83=A9=E3=83=99=E3=83=AB?= =?UTF-8?q?=E9=81=8B=E7=94=A8=E3=83=AB=E3=83=BC=E3=83=AB=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug.yml | 32 ++++++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature.yml | 22 ++++++++++++++++++++ docs/development-rule.md | 18 ++++++++--------- 3 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug.yml create mode 100644 .github/ISSUE_TEMPLATE/feature.yml diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..6d956f6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,32 @@ +name: バグ報告 +description: バグの報告 +labels: ["type: bug"] +body: + - type: textarea + attributes: + label: 概要 + description: 何が起きているか + validations: + required: true + - type: textarea + attributes: + label: 再現手順 + description: バグを再現する手順 + value: | + 1. + 2. + 3. + validations: + required: true + - type: textarea + attributes: + label: 期待する動作 + description: 本来どうなるべきか + validations: + required: true + - type: textarea + attributes: + label: スクリーンショット + description: あれば貼ってください + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 0000000..c9fa772 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,22 @@ +name: 機能追加・改善 +description: 新機能の追加や既存機能の改善 +labels: ["type: feature"] +body: + - type: textarea + attributes: + label: 概要 + description: 何をしたいか + validations: + required: true + - type: textarea + attributes: + label: 背景・理由 + description: なぜ必要か + validations: + required: true + - type: textarea + attributes: + label: 実現イメージ + description: スクリーンショットやモックがあれば貼ってください + validations: + required: false diff --git a/docs/development-rule.md b/docs/development-rule.md index 0320e19..3ed3423 100644 --- a/docs/development-rule.md +++ b/docs/development-rule.md @@ -89,20 +89,20 @@ Issue には以下の 3 軸からラベルを付ける。**カテゴリと種別 | ラベル | 用途 | |-------|------| -| `frontend` | フロントエンドの変更 | -| `backend` | バックエンドの変更 | -| `design` | デザイン・UI/UX の変更 | -| `infra` | デプロイ・CI/CD・環境系 | -| `docs` | ドキュメントのみの変更 | +| `cat: frontend` | フロントエンドの変更 | +| `cat: backend` | バックエンドの変更 | +| `cat: design` | デザイン・UI/UX の変更 | +| `cat: infra` | デプロイ・CI/CD・環境系 | +| `cat: docs` | ドキュメントのみの変更 | #### 種別(何をするか) | ラベル | 用途 | |-------|------| -| `bug` | バグ修正 | -| `feature` | 新機能追加 | -| `improve` | 既存機能の改善・UX 向上 | -| `refactor` | リファクタリング | +| `type: bug` | バグ修正 | +| `type: feature` | 新機能追加 | +| `type: improve` | 既存機能の改善・UX 向上 | +| `type: refactor` | リファクタリング | #### 優先度(技育博に向けてどれが重要か) From fcb393885237db92ee43c3635badad27125f0a4a Mon Sep 17 00:00:00 2001 From: Koseeee-27 Date: Thu, 16 Apr 2026 17:24:01 +0900 Subject: [PATCH 5/7] =?UTF-8?q?chore:=20frontend=E3=81=AB.env.local.exampl?= =?UTF-8?q?e=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.env.local.example | 1 + frontend/.gitignore | 1 + 2 files changed, 2 insertions(+) create mode 100644 frontend/.env.local.example diff --git a/frontend/.env.local.example b/frontend/.env.local.example new file mode 100644 index 0000000..d658484 --- /dev/null +++ b/frontend/.env.local.example @@ -0,0 +1 @@ +NEXT_PUBLIC_API_URL=http://localhost:3001 diff --git a/frontend/.gitignore b/frontend/.gitignore index 5ef6a52..b721bff 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -32,6 +32,7 @@ yarn-error.log* # env files (can opt-in for committing if needed) .env* +!.env.local.example # vercel .vercel From eb20bbb044b70aaa5eaba20ce862a2c379f16a70 Mon Sep 17 00:00:00 2001 From: Koseeee-27 Date: Thu, 16 Apr 2026 17:26:00 +0900 Subject: [PATCH 6/7] =?UTF-8?q?docs:=20=E9=96=8B=E7=99=BA=E3=82=B3?= =?UTF-8?q?=E3=83=9E=E3=83=B3=E3=83=89=E3=81=A8PR=E5=89=8D=E3=83=81?= =?UTF-8?q?=E3=82=A7=E3=83=83=E3=82=AF=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/development-rule.md | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/docs/development-rule.md b/docs/development-rule.md index 3ed3423..3eebf9a 100644 --- a/docs/development-rule.md +++ b/docs/development-rule.md @@ -59,6 +59,50 @@ git checkout -b feature/add-share-button - 「あれもこれも」と 1 コミットに詰め込まない - こまめにコミットする(変更を放置しない) +## 開発コマンド + +### Frontend + +```bash +cd frontend +``` + +| コマンド | 用途 | いつ使う? | +|---------|------|----------| +| `npm run dev` | 開発サーバー起動(ホットリロードあり) | 普段の開発 | +| `npm run build` | 本番用ビルド | PR 前チェック、デプロイ前 | +| `npm start` | ビルド済みアプリを本番モードで起動 | build の成果物を確認したいとき | +| `npm run lint` | ESLint でコードチェック | PR 前チェック | +| `npm run format` | Prettier でコード整形 | コード整形したいとき | +| `npm run format:check` | Prettier で整形チェック(変更なし) | CI 用 | + +### Backend + +```bash +cd backend +``` + +| コマンド | 用途 | いつ使う? | +|---------|------|----------| +| `npm run dev` | 開発サーバー起動(自動リロードあり) | 普段の開発 | +| `npm run build` | TypeScript → JavaScript にコンパイル | PR 前チェック、デプロイ前 | +| `npm start` | ビルド済みアプリを起動 | build の成果物を確認したいとき | + +### PR 前チェック + +PR を出す前に以下を実行してエラーがないことを確認する。 + +```bash +# Frontend +cd frontend +npm run lint +npm run build + +# Backend +cd ../backend +npm run build +``` + ## Pull Request - 基本的には `develop` ブランチに向けて PR を出す From 57fae5eaaa1a6e2bef5f56823e6182cd971626df Mon Sep 17 00:00:00 2001 From: Koseeee-27 Date: Thu, 16 Apr 2026 17:26:11 +0900 Subject: [PATCH 7/7] =?UTF-8?q?docs:=20=E7=92=B0=E5=A2=83=E6=A7=8B?= =?UTF-8?q?=E7=AF=89=E6=89=8B=E9=A0=86=E3=81=A8CONTRIBUTING.md=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 10 +++++++- docs/setup.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 docs/setup.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3b81df4..8253311 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,13 @@ # Contributing -開発ルール(ブランチ・コミット・PR・Issue の運用ルール)は以下を参照してください。 +## はじめに + +環境構築がまだの場合は、まずこちらを参照してください。 + +→ [docs/setup.md](docs/setup.md) + +## 開発ルール + +ブランチ・コミット・PR・Issue の運用ルールはこちら。 → [docs/development-rule.md](docs/development-rule.md) diff --git a/docs/setup.md b/docs/setup.md new file mode 100644 index 0000000..44ce7e8 --- /dev/null +++ b/docs/setup.md @@ -0,0 +1,66 @@ +# 環境構築 + +## 前提 + +- Mac +- Git がインストール済み +- Node.js がインストール済み(未インストールの場合は [公式サイト](https://nodejs.org/) からインストール) + +## 1. リポジトリのクローン + +```bash +git clone https://github.com/kc3hack/2026_team6.git +cd 2026_team6 +``` + +## 2. Frontend のセットアップ + +```bash +cd frontend +npm install +``` + +### 環境変数の設定 + +```bash +cp .env.local.example .env.local +``` + +必要な環境変数は `.env.local.example` を参照してください。 + +## 3. Backend のセットアップ + +```bash +cd ../backend +npm install +``` + +### 環境変数の設定 + +```bash +cp .env.example .env +``` + +必要な環境変数は `.env.example` を参照してください。各キーの値は管理者に確認してください。 + +## 4. 起動確認 + +ターミナルを 2 つ開いて、それぞれで起動する。 + +### Backend(先に起動) + +```bash +cd backend +npm run dev +``` + +`http://localhost:3001/health` にアクセスして、レスポンスが返ってくれば OK。 + +### Frontend + +```bash +cd frontend +npm run dev +``` + +`http://localhost:3000` にアクセスして、トップページが表示されれば OK。