Skip to content
Merged
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
11 changes: 11 additions & 0 deletions .env.guide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Environment Variables Setup Guide

## Monorepo Structure

이 프로젝트는 모노레포 구조로 web과 admin 앱을 포함합니다:

- **apps/web**: Next.js 기반 웹 애플리케이션 (`NEXT_PUBLIC_*` 환경 변수)
- **apps/admin**: Vite 기반 어드민 애플리케이션 (`VITE_*` 환경 변수)

각 앱은 독립적인 환경 변수를 가지며, 공통 빌드 도구 설정은 `packages/config`에서 관리됩니다.

---

## Architecture Decision

### Why Only .env.development and .env.production?
Expand Down
116 changes: 107 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,40 @@ on:
branches: [main, develop]

jobs:
quality-check:
name: Code Quality Check
# 변경 감지
detect-changes:
name: Detect Changes
runs-on: ubuntu-latest
outputs:
web: ${{ steps.filter.outputs.web }}
admin: ${{ steps.filter.outputs.admin }}
root: ${{ steps.filter.outputs.root }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check changed files
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
web:
- 'apps/web/**'
admin:
- 'apps/admin/**'
root:
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'turbo.json'
- '.github/workflows/**'
# Web 앱 품질 체크
web-quality-check:
name: Web - Quality Check
runs-on: ubuntu-latest
needs: detect-changes
if: needs.detect-changes.outputs.web == 'true' || needs.detect-changes.outputs.root == 'true'
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -28,13 +59,80 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run Biome (lint & format) & TypeScript
run: pnpm run ci:check
- name: Run checks (lint & typecheck)
run: pnpm --filter @solid-connect/web run ci:check
Comment on lines +62 to +63
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

echo "=== Checking workflow file structure ==="
cat .github/workflows/ci.yml | grep -n -A 2 "Web\|Admin\|pnpm --filter" | head -50

echo ""
echo "=== Web app package.json scripts ==="
if [ -f "apps/web/package.json" ]; then
  jq '.scripts' apps/web/package.json 2>/dev/null || cat apps/web/package.json | grep -A 20 '"scripts"'
else
  echo "apps/web/package.json not found"
fi

echo ""
echo "=== Admin app package.json scripts ==="
if [ -f "apps/admin/package.json" ]; then
  jq '.scripts' apps/admin/package.json 2>/dev/null || cat apps/admin/package.json | grep -A 20 '"scripts"'
else
  echo "apps/admin/package.json not found"
fi

echo ""
echo "=== Checking for TypeScript config in Admin ==="
ls -la apps/admin/ | grep -E "tsconfig|typescript"

Repository: solid-connection/solid-connect-web

Length of output: 1840


Admin 앱의 CI 품질 체크에서 typecheck가 누락되었습니다.

검증 결과를 통해 다음과 같이 확인되었습니다:

  1. Web 앱의 quality check 명령어

    • CI 실행 명령: pnpm --filter @solid-connect/web run ci:check
    • 실제 동작: lint:check (biome 린트) + typecheck (tsc 타입 체크) 순차 실행
  2. Admin 앱의 quality check 명령어

    • CI 실행 명령: lint + format (각각 별도 스텝)
    • 타입 체크 스크립트: package.json에 정의되지 않음
    • TypeScript 설정: tsconfig.json 파일이 존재함 (활성화 상태)

Admin 앱은 TypeScript가 설정되어 있음에도 불구하고 CI 워크플로우에서 타입 체크를 수행하지 않고 있습니다. Web 앱과의 일관성을 위해 Admin 앱의 package.json에 typecheck 스크립트를 추가하고 CI 단계에서 실행하도록 수정이 필요합니다.

🤖 Prompt for AI Agents
In @.github/workflows/ci.yml around lines 62 - 63, Add a "typecheck" script to
the Admin package.json (e.g., "typecheck": "tsc --noEmit") so the project uses
the existing tsconfig.json for static checks, and update the CI workflow step
that runs Admin checks to execute that script (either by calling the Admin
ci:check that runs lint + typecheck or by adding a dedicated step to run pnpm
--filter `@solid-connect/admin` run typecheck). Target the package.json "scripts"
entry named "typecheck" and the CI job step that currently runs lint/format to
ensure typecheck runs in CI.


# Admin 앱 품질 체크
admin-quality-check:
name: Admin - Quality Check
runs-on: ubuntu-latest
needs: detect-changes
if: needs.detect-changes.outputs.admin == 'true' || needs.detect-changes.outputs.root == 'true'
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run lint check
run: pnpm --filter @solid-connect/admin run lint

- name: Run format check
run: pnpm --filter @solid-connect/admin run format

# Web 앱 빌드
web-build:
name: Web - Build
runs-on: ubuntu-latest
needs: [detect-changes, web-quality-check]
if: |
always() &&
(needs.detect-changes.outputs.web == 'true' || needs.detect-changes.outputs.root == 'true') &&
needs.web-quality-check.result == 'success'
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build web application
run: pnpm --filter @solid-connect/web run build
env:
NODE_ENV: production

build:
name: Build Verification
# Admin 앱 빌드
admin-build:
name: Admin - Build
runs-on: ubuntu-latest
needs: quality-check
needs: [detect-changes, admin-quality-check]
if: |
always() &&
(needs.detect-changes.outputs.admin == 'true' || needs.detect-changes.outputs.root == 'true') &&
needs.admin-quality-check.result == 'success'
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -53,7 +151,7 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build Next.js application
run: pnpm run build
- name: Build admin application
run: pnpm --filter @solid-connect/admin run build
env:
NODE_ENV: production
74 changes: 74 additions & 0 deletions .github/workflows/pr-auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Auto Label PR

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Detect changed apps
id: detect
run: |
# Get changed files between base and head
BASE_SHA="${{ github.event.pull_request.base.sha }}"
HEAD_SHA="${{ github.event.pull_request.head.sha }}"

FILES=$(git diff --name-only $BASE_SHA $HEAD_SHA)

echo "Changed files:"
echo "$FILES"

# Check for web changes
if echo "$FILES" | grep -q "^apps/web/"; then
echo "web=true" >> $GITHUB_OUTPUT
echo "✓ Detected changes in apps/web"
else
echo "web=false" >> $GITHUB_OUTPUT
fi

# Check for admin changes
if echo "$FILES" | grep -q "^apps/admin/"; then
echo "admin=true" >> $GITHUB_OUTPUT
echo "✓ Detected changes in apps/admin"
else
echo "admin=false" >> $GITHUB_OUTPUT
fi

- name: Add labels
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const labels = [];

if ('${{ steps.detect.outputs.web }}' === 'true') {
labels.push('web');
}

if ('${{ steps.detect.outputs.admin }}' === 'true') {
labels.push('admin');
}

if (labels.length > 0) {
console.log(`Adding labels: ${labels.join(', ')}`);

await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: labels
});
} else {
console.log('No app-specific changes detected');
}
74 changes: 40 additions & 34 deletions apps/admin/biome.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"includes": [
"**/src/**/*",
"**/.vscode/**/*",
"**/index.html",
"**/vite.config.ts",
"!**/src/routeTree.gen.ts",
"!**/src/styles.css"
]
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
"$schema": "https://biomejs.dev/schemas/2.3.12/schema.json",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check Biome CLI version in package.json and pnpm-lock.yaml
echo "=== Checking package.json for Biome CLI ==="
rg -n '"@biomejs/cli"' -A 1 -B 1 package.json 2>/dev/null || echo "Not found in root package.json"

echo -e "\n=== Checking apps/admin/package.json ==="
rg -n '"@biomejs/cli"' -A 1 -B 1 apps/admin/package.json 2>/dev/null || echo "Not found"

echo -e "\n=== Checking pnpm-lock.yaml for `@biomejs/cli` version ==="
rg -n '@biomejs/cli@' pnpm-lock.yaml | head -20

echo -e "\n=== Checking apps/admin/biome.json ==="
cat apps/admin/biome.json 2>/dev/null || echo "File not found"

Repository: solid-connection/solid-connect-web

Length of output: 1039


🏁 Script executed:

#!/bin/bash
# Find all package.json files and search for biome
echo "=== Finding all package.json files ==="
find . -name "package.json" -type f | head -20

echo -e "\n=== Searching for 'biome' in all package.json files ==="
rg -l 'biome' . --type json 2>/dev/null | grep package.json

echo -e "\n=== Searching for biome in all files (broader search) ==="
rg 'biome|@biomejs' --type json -i | head -30

echo -e "\n=== Checking for .biomeignore or other Biome config ==="
find . -name ".biomeignore" -o -name "biome.json" | head -20

echo -e "\n=== Checking root-level package.json content ==="
head -50 package.json 2>/dev/null || echo "No root package.json"

Repository: solid-connection/solid-connect-web

Length of output: 2042


Biome 스키마 버전이 CLI 버전과 맞지 않아 린트 실패를 일으킵니다.

apps/admin의 Biome CLI는 2.2.4 버전인데, biome.json에는 2.3.12 스키마가 선언되어 있어 호환성 문제가 발생합니다. 다음 두 가지 방법 중 하나로 정합성을 맞춰주세요.

  1. 스키마를 CLI 버전에 맞춰 다운그레이드

    • apps/admin/biome.json의 스키마를 2.2.4로 변경
  2. CLI 버전을 프로젝트 표준에 맞춰 업그레이드

    • apps/admin/package.json의 @biomejs/biome을 2.3.11로 변경해 루트 패키지와 동기화

(참고: apps/web와 루트 설정은 모두 2.3.11을 사용하고 있습니다.)

🧰 Tools
🪛 GitHub Actions: CI

[error] 2-2: Configuration schema version does not match the CLI version 2.2.4. Found 2.3.12. Run 'biome migrate' to migrate the configuration file.

🤖 Prompt for AI Agents
In `@apps/admin/biome.json` at line 2, The apps/admin biome schema version in
biome.json ("https://biomejs.dev/schemas/2.3.12/schema.json") is incompatible
with the installed Biome CLI; either change the schema URL to the CLI-compatible
version (downgrade to 2.2.4) or upgrade the local Biome package so the CLI
matches the project standard: update the `@biomejs/biome` entry in
apps/admin/package.json to 2.3.11 (to align with root and apps/web) and
reinstall dependencies so the CLI and the schema version are consistent.

"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"includes": [
"**/src/**/*",
"**/.vscode/**/*",
"**/index.html",
"**/vite.config.ts",
"!**/src/routeTree.gen.ts",
"!**/src/styles.css"
]
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"lineWidth": 120
},
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
}

Loading
Loading