-
Notifications
You must be signed in to change notification settings - Fork 0
Update Next.js prototype setup #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
The head ref may contain hidden characters: "codex/\u30D7\u30ED\u30C8\u30BF\u30A4\u30D7\u6280\u8853\u69CB\u6210\u306E\u66F4\u65B0"
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "$schema": "https://biomejs.dev/schemas/1.7.3/schema.json", | ||
| "organizeImports": { "enabled": true }, | ||
| "linter": { | ||
| "enabled": true, | ||
| "rules": { | ||
| "recommended": true, | ||
| "correctness": { "useExhaustiveDependencies": "error" }, | ||
| "suspicious": { "noExplicitAny": "error" } | ||
| } | ||
| }, | ||
| "formatter": { | ||
| "enabled": true, | ||
| "indentStyle": "space", | ||
| "indentWidth": 2, | ||
| "lineWidth": 80 | ||
| }, | ||
| "javascript": { | ||
| "formatter": { | ||
| "quoteStyle": "double", | ||
| "semicolons": "always" | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| // ESLint の設定ファイル | ||
| module.exports = { | ||
| extends: ['next/core-web-vitals'], | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, develop] | ||
| pull_request: | ||
| branches: [main, develop] | ||
|
|
||
| jobs: | ||
| lint-and-typecheck: | ||
| name: Lint and Type Check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Run Biome Lint & Format Check | ||
| run: npm run lint:biome | ||
| - name: Run TypeScript Type Check | ||
| run: npm run build | ||
| build: | ||
| name: Build Project | ||
| runs-on: ubuntu-latest | ||
| needs: lint-and-typecheck | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Build Next.js application | ||
| run: npm run build |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: Deploy to Cloudflare Pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| publish: | ||
| name: Publish to Cloudflare Pages | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| deployments: write | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Build with OpenNext | ||
| run: npm run opennext:build | ||
| - name: Publish to Cloudflare Pages | ||
| uses: cloudflare/wrangler-action@v3 | ||
| with: | ||
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
| projectName: "prototyping-base-app-router" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/bin/sh | ||
| # Husky による Git フックの共通処理 | ||
| export PATH="$PATH:$(npm bin)" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #!/bin/sh | ||
| . "$(dirname "$0")/_/husky.sh" | ||
|
|
||
| npx biome check --apply . | ||
| npx biome format --write . |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # LLM開発ルール | ||
|
|
||
| ## LLMで生成したいこと | ||
| - UI生成 | ||
| - 機能実装 | ||
| - デプロイ | ||
|
|
||
| ## 絶対に守るべきこと | ||
| - シンプルなアーキテクチャ | ||
| - 日本語でのドキュメント・コードコメント | ||
| - 最新バージョン技術の使用 | ||
| - 秘匿情報を含まない公開リポジトリ | ||
| - 汎用的な記述 | ||
|
|
||
| ## 検討事項 | ||
| - 技術スタック | ||
| - DB | ||
| - UIデザイン | ||
| - デプロイ先 | ||
|
|
||
| ## リポジトリに必要なもの | ||
| - LLM用rulesファイル (このファイル) | ||
| - packages.json | ||
| - README.md | ||
| - Linter設定 | ||
| - Formatter設定 | ||
| - Typescript設定 | ||
| - TailwindCSS設定 | ||
| - envファイル | ||
| - CloudflareでのNext.jsアプリ作成方法 | ||
|
|
||
| ## 不要なもの | ||
| - サンプルアプリケーション | ||
| - 具体的な実装 | ||
| - ハッカソン情報 |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
|
|
||
| // NOTE: このファイルは自動生成されます。 | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| // Next.js の設定ファイル | ||
| /** @type {import('next').NextConfig} */ | ||
| const nextConfig = { | ||
| reactStrictMode: true, | ||
| }; | ||
|
|
||
| module.exports = nextConfig; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,37 @@ | ||
| { | ||
| "name": "interview-timer-app", | ||
| "version": "1.0.0", | ||
| "description": "A timer application for managing interview sessions", | ||
| "main": "index.js", | ||
| "scripts": { | ||
| "dev": "next dev", | ||
| "build": "next build", | ||
| "start": "next start" | ||
| }, | ||
| "dependencies": { | ||
| "next": "latest", | ||
| "react": "latest", | ||
| "react-dom": "latest" | ||
| } | ||
| "name": "prototyping-base-app-router", | ||
| "version": "0.1.0", | ||
| "private": true, | ||
| "scripts": { | ||
| "dev": "next dev", | ||
| "build": "next build", | ||
| "start": "next start", | ||
| "lint": "next lint", | ||
| "lint:biome": "biome check --apply .", | ||
| "format:biome": "biome format --write .", | ||
| "prepare": "husky install", | ||
| "cf-typegen": "wrangler types --env cloudflare-pages > src/types/cloudflare.d.ts", | ||
| "opennext:build": "opennext build" | ||
| }, | ||
| "dependencies": { | ||
| "next": "latest", | ||
| "react": "latest", | ||
| "react-dom": "latest" | ||
| }, | ||
| "devDependencies": { | ||
| "@biomejs/biome": "latest", | ||
| "@cloudflare/workers-types": "latest", | ||
| "@types/node": "latest", | ||
| "@types/react": "latest", | ||
| "@types/react-dom": "latest", | ||
| "autoprefixer": "latest", | ||
| "eslint": "latest", | ||
| "eslint-config-next": "latest", | ||
| "husky": "latest", | ||
| "opennext": "latest", | ||
| "postcss": "latest", | ||
| "tailwindcss": "latest", | ||
| "typescript": "latest", | ||
| "wrangler": "latest" | ||
| } | ||
| } | ||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| // PostCSS の設定ファイル | ||
| module.exports = { | ||
| plugins: { | ||
| tailwindcss: {}, | ||
| autoprefixer: {}, | ||
| }, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| /* TailwindCSS の基本スタイルを読み込み */ | ||
| @tailwind base; | ||
| @tailwind components; | ||
| @tailwind utilities; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import '../app/globals.css'; | ||
| import type { ReactNode } from 'react'; | ||
|
|
||
| // ルートレイアウト | ||
| export default function RootLayout({ children }: { children: ReactNode }) { | ||
| return ( | ||
| <html lang="ja"> | ||
| <body>{children}</body> | ||
| </html> | ||
| ); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import Timer from '../components/Timer'; | ||
|
|
||
| // トップページ | ||
| export default function Page() { | ||
| return ( | ||
| <main className="p-4"> | ||
| <h1 className="text-xl font-bold">Interview Timer App</h1> | ||
| <Timer initialTime={60} /> | ||
| </main> | ||
| ); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // アラート表示用コンポーネント | ||
| export default function Alert({ message, isVisible }: { message: string; isVisible: boolean }) { | ||
| if (!isVisible) return null; | ||
| return ( | ||
| <div style={{ backgroundColor: 'red', color: 'white' }}> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The component uses inline styles for For example, you could replace the inline style with Tailwind classes like <div className="bg-red-500 text-white p-4"> {/* Example Tailwind classes */} |
||
| <p>{message}</p> | ||
| </div> | ||
| ); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.