Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .github/workflows/ci-admin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Actionの名前
name: User Code Quality

permissions:
contents: write

on:
# Pull Request時
pull_request:
# 対象のブランチを指定
branches: ["gm3/develop"]

jobs:
Code-Check:
name: Code-Check
runs-on: ubuntu-latest
steps:

# github appトークンを作成する
- name: Create github app token
id: create
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_KEY }}

# GitHubリポジトリのコードをチェックアウト
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
token: ${{ steps.create.outputs.token }}
persist-credentials: true

# Corepack を有効にして pnpm を使えるようにする
- name: Enable Corepack
run: corepack enable

# Node.js v22をセットアップ
- name: Use Node.js v22
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
cache-dependency-path: |
./admin/package.json
./admin/pnpm-lock.yaml

# pnpmで依存関係をインストール
- name: pnpm install dependencies
run: pnpm install --frozen-lockfile
working-directory: ./admin

# prettierでコードのフォーマットを実行
- name: Format code with Prettier
run: pnpm run fmt
working-directory: ./admin

# 変更があれば、コミット&プッシュする
- name: Commit formatted files
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Action
author_email: action@github.com
message: "chore: auto format code"
push: true

# ESLintでコードの自動修正を実行
- name: Fix lint issues with ESLint
run: pnpm run lint-fix
working-directory: ./admin

# 変更があれば、コミット&プッシュする
- name: Commit lint fixed files
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Action
author_email: action@github.com
message: "chore: auto fix lint issues"
push: true

# tscで型チェックを実行
- name: Check types with TypeScript
run: pnpm run type-check
working-directory: ./admin
File renamed without changes.
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
// Prettierをデフォルトのフォーマッタに設定
"editor.defaultFormatter": "esbenp.prettier-vscode",
// eslintのpathを指定
"eslint.workingDirectories": ["./user"],
// Prettierの設定ファイルを指定
"prettier.configPath": "./user/.prettierrc.json",
"eslint.workingDirectories": ["./admin"],
// Prettierの設定ファイルを指定
"prettier.configPath": "./admin/.prettierrc.json",

// 自動保存時に実行するアクションを設定
"editor.codeActionsOnSave": {
Expand Down
44 changes: 44 additions & 0 deletions admin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# pnpm
.pnpm-store/*
8 changes: 8 additions & 0 deletions admin/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"trailingComma": "es5",
"bracketSpacing": true,
"plugins": ["prettier-plugin-tailwindcss"]
}
11 changes: 11 additions & 0 deletions admin/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ベースイメージとして Node.js 20.11.0 を指定
FROM node:22.13.0

# 必要なツールをインストール
RUN npm install -g pnpm

# 作業ディレクトリを設定
WORKDIR /app

# コンテナ起動時に実行するデフォルトコマンド
CMD ["pnpm", "run", "dev"]
36 changes: 36 additions & 0 deletions admin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
Binary file added admin/app/favicon.ico
Binary file not shown.
26 changes: 26 additions & 0 deletions admin/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@import 'tailwindcss';

:root {
--background: #ffffff;
--foreground: #171717;
}

@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
}

@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}

body {
background: var(--background);
color: var(--foreground);
font-family: Arial, Helvetica, sans-serif;
}
34 changes: 34 additions & 0 deletions admin/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import type { Metadata } from 'next';
import { Geist, Geist_Mono } from 'next/font/google';
import './globals.css';

const geistSans = Geist({
variable: '--font-geist-sans',
subsets: ['latin'],
});

const geistMono = Geist_Mono({
variable: '--font-geist-mono',
subsets: ['latin'],
});

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
</body>
</html>
);
}
103 changes: 103 additions & 0 deletions admin/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import Image from 'next/image';

export default function Home() {
return (
<div className="grid min-h-screen grid-rows-[20px_1fr_20px] items-center justify-items-center gap-16 p-8 pb-20 font-[family-name:var(--font-geist-sans)] sm:p-20">
<main className="row-start-2 flex flex-col items-center gap-[32px] sm:items-start">
<Image
className="dark:invert"
src="/next.svg"
alt="Next.js logo"
width={180}
height={38}
priority
/>
<ol className="list-inside list-decimal text-center font-[family-name:var(--font-geist-mono)] text-sm/6 sm:text-left">
<li className="mb-2 tracking-[-.01em]">
Get started by editing{' '}
<code className="rounded bg-black/[.05] px-1 py-0.5 font-[family-name:var(--font-geist-mono)] font-semibold dark:bg-white/[.06]">
app/page.tsx
</code>
.
</li>
<li className="tracking-[-.01em]">
Save and see your changes instantly.
</li>
</ol>

<div className="flex flex-col items-center gap-4 sm:flex-row">
<a
className="bg-foreground text-background flex h-10 items-center justify-center gap-2 rounded-full border border-solid border-transparent px-4 text-sm font-medium transition-colors hover:bg-[#383838] sm:h-12 sm:w-auto sm:px-5 sm:text-base dark:hover:bg-[#ccc]"
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
className="dark:invert"
src="/vercel.svg"
alt="Vercel logomark"
width={20}
height={20}
/>
Deploy now
</a>
<a
className="flex h-10 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-4 text-sm font-medium transition-colors hover:border-transparent hover:bg-[#f2f2f2] sm:h-12 sm:w-auto sm:px-5 sm:text-base md:w-[158px] dark:border-white/[.145] dark:hover:bg-[#1a1a1a]"
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Read our docs
</a>
</div>
</main>
<footer className="row-start-3 flex flex-wrap items-center justify-center gap-[24px]">
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/file.svg"
alt="File icon"
width={16}
height={16}
/>
Learn
</a>
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/window.svg"
alt="Window icon"
width={16}
height={16}
/>
Examples
</a>
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/globe.svg"
alt="Globe icon"
width={16}
height={16}
/>
Go to nextjs.org →
</a>
</footer>
</div>
);
}
Loading
Loading