Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
27 changes: 13 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,30 @@ jobs:

# 작업 단계(Step)들
steps:
# 1. 레포지토리 코드 체크아웃
# 0. 레포지토리 코드 체크아웃
- name: Checkout repository
uses: actions/checkout@v5

# 1. pnpm 설치 (모노레포 필수)
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false

# 2. Node.js 환경 설정
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22" # 중요! -> 프로젝트에 맞는 Node.js 버전 지정

# 3. NPM 의존성 캐싱 (2단계 Dependency Install 최적화)
# - node_modules 폴더를 캐싱하여 매번 새로 설치하는 시간 절약
- name: Cache node_modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version: "20"
cache: "pnpm"

# 4. 의존성 설치 (2단계 Dependency Install)
# - CI 환경에서는 'npm ci'를 사용하는 것이 더 빠르고 안정적.
- name: Install Dependencies
run: npm ci
run: pnpm install --frozen-lockfile

# 5. 빌드 유효성 검사 (3단계 Build Validation)
- name: Run Build
run: npm run build
run: pnpm turbo run build --filter=editor
# run: npm run build
31 changes: 22 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- main
- dev
- feature

jobs:
build:
Expand All @@ -14,28 +13,42 @@ jobs:
- name: Checkout code
uses: actions/checkout@v5

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

- name: Setup Node.js and Cache
uses: actions/setup-node@v6
with:
node-version: "22"
# npm install 속도 향상을 위한 캐시 (Optional)
cache: "npm"
cache: "pnpm"

- name: Install Dependencies & Build Project
run: |
pnpm install --frozen-lockfile
cd apps/editor
touch .env
echo NEXT_PUBLIC_SUPABASE_URL=${{secrets.NEXT_PUBLIC_SUPABASE_URL}} >> .env
echo NEXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY=${{secrets.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY}} >> .env
echo SUPABASE_DATABASE_PASSWORD=${{secrets.SUPABASE_DATABASE_PASSWORD}} >> .env
npm install
npm run build
ls -al
cd ../..
pnpm turbo run build --filter=editor

# 🚨 핵심: 빌드 결과물을 압축
- name: zip file
# 🚨 핵심: 배포 패키지 만들기 (Standalone 활용)
- name: Create Deploy Artifact
run: |
zip -r artifact.zip ./.next ./package.json ./package-lock.json ./.env ./scripts ./appspec.yml ./public

mkdir deploy_package
cp -r apps/editor/.next/standalone/* deploy_package/
mkdir -p deploy_package/.next/static
cp -r apps/editor/.next/static/* deploy_package/.next/static/
cp -r apps/editor/public deploy_package/public
cp apps/editor/appspec.yml deploy_package/
cp -r apps/editor/scripts deploy_package/scripts
cp apps/editor/.env deploy_package/
cd deploy_package
zip -r ../artifact.zip .
- name: AWS configure credentials
uses: aws-actions/configure-aws-credentials@v5
with:
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
!.yarn/releases
!.yarn/versions

node_modules
.pnpm-store
.turbo
# testing
/coverage

Expand Down Expand Up @@ -39,3 +42,8 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# 앱별 빌드 결과물 무시
apps/*/out
apps/*/.next
apps/*/dist
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["prettier-plugin-tailwindcss"]
}
File renamed without changes.
File renamed without changes.
222 changes: 222 additions & 0 deletions apps/editor/db.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
{
"nodes": [
{
"id": 1001,
"page_id": 201,
"parent_id": null,
"type": "Hero",
"position": 0,
"props": {
"heading": "WebCreator-X에 오신 것을 환영합니다",
"subheading": "세상에 하나뿐인 당신의 웹사이트를 만들어보세요.",
"button": { "text": "시작하기", "link": "/signup" },
"backgroundImage": {
"url": "https://images.example.com/hero-bg.jpg",
"alt": "추상적인 배경 이미지"
}
},
"style": {
"layout": {
"display": "flex",
"flexDirection": "column",
"alignItems": "center",
"justifyContent": "center",
"gap": "20px"
},
"dimensions": { "minHeight": "500px", "padding": "80px 24px" },
"background": {
"backgroundColor": "#111827",
"backgroundSize": "cover",
"backgroundPosition": "center"
},
"typography": { "color": "#FFFFFF", "textAlign": "center" },
"className": "hero-container-main"
},
"created_at": "2025-11-13T06:18:00Z"
},
{
"id": 1002,
"page_id": 201,
"parent_id": null,
"type": "Container",
"position": 1,
"props": {},
"style": {
"layout": { "display": "block" },
"dimensions": {
"padding": "50px 24px",
"maxWidth": "1200px",
"margin": "0 auto"
},
"background": { "backgroundColor": "#FFFFFF" },
"className": "content-section"
},
"created_at": "2025-11-13T06:20:00Z"
},
{
"id": 1003,
"page_id": 201,
"parent_id": 1002,
"type": "Heading",
"position": 0,
"props": {
"text": "주요 기능 소개",
"level": "h2"
},
"style": {
"typography": {
"color": "#111827",
"fontSize": "36px",
"textAlign": "center"
},
"dimensions": { "marginBottom": "30px" }
},
"created_at": "2025-11-13T06:21:00Z"
},
{
"id": 1004,
"page_id": 201,
"parent_id": 1002,
"type": "Text",
"position": 1,
"props": {
"text": "직관적인 드래그 앤 드롭 인터페이스로 코딩 없이 웹사이트를 완성하세요. 모든 컴포넌트는 사용자가 원하는 대로 커스터마이징할 수 있습니다."
},
"style": {
"typography": {
"color": "#374151",
"fontSize": "18px",
"lineHeight": 1.6,
"textAlign": "center"
},
"dimensions": { "maxWidth": "800px", "margin": "0 auto" }
},
"created_at": "2025-11-13T06:22:00Z"
},
{
"id": 1005,
"page_id": 201,
"parent_id": null,
"type": "Container",
"position": 2,
"props": { "id": "gallery" },
"style": {
"layout": {
"display": "grid",
"gridTemplateColumns": "1fr 1fr",
"gap": "20px"
},
"dimensions": {
"padding": "50px 24px",
"maxWidth": "1200px",
"margin": "0 auto"
},
"background": { "backgroundColor": "#F9FAFB" },
"className": "gallery-section"
},
"created_at": "2025-11-13T06:23:00Z"
},
{
"id": 1006,
"page_id": 201,
"parent_id": 1005,
"type": "Image",
"position": 0,
"props": {
"src": "https://images.example.com/gallery-1.jpg",
"alt": "갤러리 이미지 1"
},
"style": {
"dimensions": {
"width": "100%",
"height": "300px",
"objectFit": "cover"
},
"effects": { "borderRadius": "8px" }
},
"created_at": "2025-11-13T06:24:00Z"
},
{
"id": 1007,
"page_id": 201,
"parent_id": 1005,
"type": "Image",
"position": 1,
"props": {
"src": "https://images.example.com/gallery-2.jpg",
"alt": "갤러리 이미지 2"
},
"style": {
"dimensions": {
"width": "100%",
"height": "300px",
"objectFit": "cover"
},
"effects": { "borderRadius": "8px" }
},
"created_at": "2025-11-13T06:25:00Z"
},
{
"id": 1008,
"page_id": 201,
"parent_id": 1005,
"type": "Text",
"position": 2,
"props": {
"text": "이미지 설명 1"
},
"style": {
"typography": {
"textAlign": "center",
"fontSize": "14px",
"color": "#6B7280"
},
"dimensions": { "marginTop": "10px" }
},
"created_at": "2025-11-13T06:26:00Z"
},
{
"id": 1009,
"page_id": 201,
"parent_id": 1005,
"type": "Text",
"position": 3,
"props": {
"text": "이미지 설명 2"
},
"style": {
"typography": {
"textAlign": "center",
"fontSize": "14px",
"color": "#6B7280"
},
"dimensions": { "marginTop": "10px" }
},
"created_at": "2025-11-13T06:27:00Z"
},
{
"id": 1010,
"page_id": 201,
"parent_id": null,
"type": "Button",
"position": 3,
"props": {
"text": "더 알아보기",
"link": "/features"
},
"style": {
"layout": { "display": "block", "margin": "40px auto" },
"dimensions": { "padding": "15px 30px", "width": "200px" },
"background": { "backgroundColor": "#3B82F6" },
"typography": {
"color": "#FFFFFF",
"fontSize": "16px",
"fontWeight": "bold",
"textAlign": "center"
},
"effects": { "borderRadius": "5px", "cursor": "pointer" }
},
"created_at": "2025-11-13T06:28:00Z"
}
]
}
File renamed without changes.
8 changes: 8 additions & 0 deletions apps/editor/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
output: "standalone", // 배포에 필요한 파일만 모아줍니다
transpilePackages: ["@repo/ui"],
};

export default nextConfig;
39 changes: 39 additions & 0 deletions apps/editor/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "editor",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
"build": "next build --turbopack",
"start": "next start",
"lint": "next lint",
"lint:fix": "eslint . --ext ts,tsx --fix"
},
"dependencies": {
"@repo/ui": "workspace:*",
"@tanstack/react-query": "^5.90.8",
"json-server": "^1.0.0-beta.3",
"next": "15.5.6",
"react": "19.1.0",
"react-dom": "19.1.0",
"zustand": "^5.0.8"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@tailwindcss/postcss": "^4",
"@tanstack/eslint-plugin-query": "^5.91.2",
"@tanstack/react-query-devtools": "^5.90.2",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@typescript-eslint/eslint-plugin": "^8.46.4",
"@typescript-eslint/parser": "^8.46.4",
"eslint": "^9.39.1",
"eslint-config-next": "15.5.6",
"eslint-plugin-immutable": "^1.0.0",
"prettier": "^3.6.2",
"prettier-plugin-tailwindcss": "^0.7.1",
"tailwindcss": "^4",
"typescript": "^5"
}
}
File renamed without changes.
Loading
Loading