From 53133ca1bb3880a9046adaa5784a6cf247adbee7 Mon Sep 17 00:00:00 2001 From: Technote Date: Sun, 20 Apr 2025 13:43:01 +0900 Subject: [PATCH 1/7] chore: setup workflows --- .github/workflows/add-release-tag.yml | 56 +++++++++++++++++++++++++++ .github/workflows/pr-updated.yml | 23 ----------- 2 files changed, 56 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/add-release-tag.yml diff --git a/.github/workflows/add-release-tag.yml b/.github/workflows/add-release-tag.yml new file mode 100644 index 0000000..b265072 --- /dev/null +++ b/.github/workflows/add-release-tag.yml @@ -0,0 +1,56 @@ +on: + pull_request: + branches: + - master + - main + - develop/v* + types: [closed] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + +name: Add release tag + +jobs: + tag: + name: Add release tag + runs-on: ubuntu-latest + timeout-minutes: 3 + if: github.event.pull_request.merged == true && github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/') + steps: + - uses: technote-space/load-config-action@v1 + with: + CONFIG_FILENAME: workflow-settings.json, workflow-details.json + IGNORE_WARNING: 'true' + - name: Get version + uses: technote-space/get-next-version-action@v1 + with: + EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }} + if: "! startsWith(github.head_ref, 'release/v')" + - name: Get version + run: echo "NEXT_VERSION=${HEAD_REF#release/}" >> $GITHUB_ENV + env: + HEAD_REF: ${{ github.head_ref }} + if: startsWith(github.head_ref, 'release/v') + - uses: actions/github-script@v7 + with: + github-token: ${{ secrets.ACCESS_TOKEN }} + script: | + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: `refs/tags/${process.env.NEXT_VERSION}`, + sha: context.sha + }) + if: env.NEXT_VERSION + - uses: actions/github-script@v7 + with: + github-token: ${{ secrets.ACCESS_TOKEN }} + script: | + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: `refs/heads/release/next-${process.env.NEXT_VERSION}`, + sha: context.sha + }) + if: env.NEXT_VERSION diff --git a/.github/workflows/pr-updated.yml b/.github/workflows/pr-updated.yml index 536c6b1..10cc785 100644 --- a/.github/workflows/pr-updated.yml +++ b/.github/workflows/pr-updated.yml @@ -88,26 +88,3 @@ jobs: BRANCH_PREFIX: release/ NEXT_VERSION: ${{ env.NEXT_VERSION }} if: env.NEXT_VERSION - - checkPublish: - name: Check publish - runs-on: ubuntu-latest - timeout-minutes: 3 - if: "github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.head_ref, 'release/')" - steps: - - name: Set running flag - run: echo "RUNNING=1" >> $GITHUB_ENV - - name: Set running flag - run: | - if [ -z "$NPM_AUTH_TOKEN" ]; then - echo "RUNNING=" >> $GITHUB_ENV - fi - env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - - uses: actions/checkout@v3 - with: - ref: ${{ github.head_ref }} - if: env.RUNNING - - uses: technote-space/can-npm-publish-action@v1 - if: env.RUNNING From 7f0ac82edcbc4512bca6f45c5338608a34efd1b7 Mon Sep 17 00:00:00 2001 From: Technote Date: Sun, 20 Apr 2025 13:47:54 +0900 Subject: [PATCH 2/7] chore: add github settings --- .github/CODEOWNERS | 1 + .github/pull_request_template.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/pull_request_template.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..78f8b98 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @technote-space diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..9b2d570 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,22 @@ +## Description: 概要 + + + +## Changes: 変更内容 + + + + + + +## Expected Impact: 影響範囲 + + + +## Operating Requirements: 動作要件 + + + +## Additional context: 補足 + + From a6ec0660bfa8640235ef969a6c00f5ae05cbf538 Mon Sep 17 00:00:00 2001 From: Technote Date: Sun, 20 Apr 2025 13:57:34 +0900 Subject: [PATCH 3/7] chore: tweaks --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index d672ac0..3a703a4 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,14 @@ これは、Next.js、GraphQL、Prismaで構築されたモダンなTODOアプリケーションです。 このアプリケーションはクリーンアーキテクチャの原則に従い、タスクとユーザーを管理するための堅牢なAPIを提供します。 + + +
+Details + +
+ + ## 技術スタック - **フロントエンド**: App Routerを使用したNext.js From 57907d083aa4064c2c7c81d90dc0330511712ea6 Mon Sep 17 00:00:00 2001 From: technote-space Date: Sun, 20 Apr 2025 04:58:01 +0000 Subject: [PATCH 4/7] chore(docs): update TOC --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 3a703a4..6721bd3 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,20 @@
Details +- [技術スタック](#%E6%8A%80%E8%A1%93%E3%82%B9%E3%82%BF%E3%83%83%E3%82%AF) +- [API ドキュメント](#api-%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%88) + - [GraphQLスキーマ](#graphql%E3%82%B9%E3%82%AD%E3%83%BC%E3%83%9E) + - [API操作](#api%E6%93%8D%E4%BD%9C) + - [認証](#%E8%AA%8D%E8%A8%BC) + - [ページネーション](#%E3%83%9A%E3%83%BC%E3%82%B8%E3%83%8D%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3) +- [アーキテクチャ](#%E3%82%A2%E3%83%BC%E3%82%AD%E3%83%86%E3%82%AF%E3%83%81%E3%83%A3) +- [始め方](#%E5%A7%8B%E3%82%81%E6%96%B9) +- [デフォルトアカウント](#%E3%83%87%E3%83%95%E3%82%A9%E3%83%AB%E3%83%88%E3%82%A2%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88) + - [一般ユーザー](#%E4%B8%80%E8%88%AC%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC) + - [管理者](#%E7%AE%A1%E7%90%86%E8%80%85) +- [AI実装について](#ai%E5%AE%9F%E8%A3%85%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6) +- [詳細情報](#%E8%A9%B3%E7%B4%B0%E6%83%85%E5%A0%B1) +
From cd2a0df489f88f6f4b970f3247a8674243634027 Mon Sep 17 00:00:00 2001 From: Technote Date: Sun, 20 Apr 2025 14:02:50 +0900 Subject: [PATCH 5/7] chore: tweaks --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6721bd3..878d74b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ これは、Next.js、GraphQL、Prismaで構築されたモダンなTODOアプリケーションです。 このアプリケーションはクリーンアーキテクチャの原則に従い、タスクとユーザーを管理するための堅牢なAPIを提供します。 +## Table of Contents +
From e2ae4f51f036003d2e79d08d48215cb0f0e6c408 Mon Sep 17 00:00:00 2001 From: Technote Date: Sun, 20 Apr 2025 14:06:49 +0900 Subject: [PATCH 6/7] chore: tweaks --- .github/workflows/pr-updated.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-updated.yml b/.github/workflows/pr-updated.yml index 32e9e91..bb493aa 100644 --- a/.github/workflows/pr-updated.yml +++ b/.github/workflows/pr-updated.yml @@ -75,6 +75,7 @@ jobs: - name: Get version uses: technote-space/get-next-version-action@v1 with: + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }} if: "env.RUNNING && ! startsWith(github.head_ref, 'release/v')" - name: Get version From 0a5ccbc80eef704a3ebc5cae5629dc578ad151a0 Mon Sep 17 00:00:00 2001 From: Technote Date: Sun, 20 Apr 2025 14:09:38 +0900 Subject: [PATCH 7/7] feat: update package version --- package.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 82fba98..e772753 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,29 @@ { "name": "bun-nextjs-graphql", - "version": "0.1.0", + "version": "0.0.1", "private": true, "type": "module", "scripts": { - "dev": "bun run migrate && bun run seed && next dev --turbopack", "build": "next build", - "start": "next start", - "lint": "npx --yes @biomejs/biome lint ./src", - "lint:fix": "npx --yes @biomejs/biome lint --write ./src", - "format": "npx --yes @biomejs/biome format ./src", - "format:fix": "npx --yes @biomejs/biome format --write ./src", "check": "npx --yes @biomejs/biome check ./src", "check:fix": "npx --yes @biomejs/biome check --write ./src", "check:unsafe": "npx --yes @biomejs/biome check --write --unsafe ./src", - "typecheck": "tsc --noEmit", + "dev": "bun run migrate && bun run seed && next dev --turbopack", + "format": "npx --yes @biomejs/biome format ./src", + "format:fix": "npx --yes @biomejs/biome format --write ./src", + "lint": "npx --yes @biomejs/biome lint ./src", + "lint:fix": "npx --yes @biomejs/biome lint --write ./src", + "migrate": "prisma migrate deploy && prisma generate", + "migrate:reset": "rm -rdf ./src/server/frameworks/database/prisma/migrations && rm -f ./src/server/frameworks/database/prisma/*.db && prisma migrate dev --name init", + "prepare": "if [ ! -f .env ]; then cp .env.sample .env; fi && prisma generate && bun run migrate", + "seed": "npx --yes tsx src/server/frameworks/database/prisma/seed/index.ts", + "start": "next start", "test": "bun test", "test:cov": "bun test --coverage", "test:e2e": "bun test $(find ./src -name \"*.e2e-spec.ts\" -print0 | xargs -0 -J '{}' echo {}) --preload ./src/server/shared/test/setup.e2e.ts", "test:server": "source .env.test && NODE_ENV=test next dev -p $PORT --turbopack", - "migrate": "prisma migrate deploy && prisma generate", - "migrate:reset": "rm -rdf ./src/server/frameworks/database/prisma/migrations && rm -f ./src/server/frameworks/database/prisma/*.db && prisma migrate dev --name init", - "seed": "npx --yes tsx src/server/frameworks/database/prisma/seed/index.ts", - "update": "npx --yes npm-check-updates -u --timeout 100000 && bun install", - "prepare": "if [ ! -f .env ]; then cp .env.sample .env; fi && prisma generate && bun run migrate" + "typecheck": "tsc --noEmit", + "update": "npx --yes npm-check-updates -u --timeout 100000 && bun install" }, "dependencies": { "@apollo/client": "^3.13.8",