From d08d1895d03b0cbbf6173e0c15c4a5ca6892926d Mon Sep 17 00:00:00 2001 From: kappa Date: Fri, 23 Jan 2026 09:19:01 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EA=B0=80=EA=B2=A9=ED=91=9C=20?= =?UTF-8?q?=EC=84=B9=EC=85=98=20=ED=9E=88=EC=96=B4=EB=A1=9C=20=EC=95=84?= =?UTF-8?q?=EB=9E=98=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20=EB=B0=8F=20=ED=83=AD?= =?UTF-8?q?=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=ED=86=B5=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 가격표 섹션을 페이지 하단에서 히어로 바로 아래로 이동 - 상단 패딩 축소 (py-24 → pt-12 pb-24) - 서브탭(서울/글로벌 타입) 스타일을 메인탭과 동일하게 통일 - Pages Functions API 프록시 추가 (functions/) - wrangler.toml 및 TypeScript 설정 추가 Co-Authored-By: Claude Opus 4.5 --- .env.example | 4 + CLAUDE.md | 24 +- README.md | 45 +++- app/index.html | 206 +++++++++++++-- functions/README.md | 88 +++++++ functions/_shared/proxy.ts | 102 +++++++ functions/api/health.ts | 17 ++ functions/api/instances.ts | 25 ++ functions/api/pricing.ts | 205 ++++++++++++++ functions/api/recommend.ts | 47 ++++ index.html | 528 ++++++++++++++++++------------------- package-lock.json | 25 +- package.json | 4 +- tsconfig.json | 18 ++ wrangler.toml | 16 ++ 15 files changed, 1056 insertions(+), 298 deletions(-) create mode 100644 functions/README.md create mode 100644 functions/_shared/proxy.ts create mode 100644 functions/api/health.ts create mode 100644 functions/api/instances.ts create mode 100644 functions/api/pricing.ts create mode 100644 functions/api/recommend.ts create mode 100644 tsconfig.json create mode 100644 wrangler.toml diff --git a/.env.example b/.env.example index f558db8..d567701 100644 --- a/.env.example +++ b/.env.example @@ -6,3 +6,7 @@ VAULT_NAMESPACE=admin # (옵션) 기업용/클라우드 사용 시 필요 # API Path Example (KV Engine v2) # 예: secret/data/anvil-hosting -> VAULT_SECRET_PATH=secret/data/anvil-hosting VAULT_SECRET_PATH=secret/data/production + +# Cloudflare Pages Functions (API Proxy) +# API Key for Worker authentication +WORKER_API_KEY=your-api-key-here diff --git a/CLAUDE.md b/CLAUDE.md index a0f8cd6..e23821f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,12 +19,23 @@ No build step required - deploy directly. ## Architecture -Multi-file static website: +Multi-file static website with serverless API proxy: - `index.html` - 메인 랜딩 페이지 (~1000줄) - `style.css` - Tailwind CSS 빌드 결과 - `fonts.css` - 시스템 폰트 정의 - `app.js` - Alpine.js 앱 로직 (Server Launcher, Pricing Table 등) - `terms.html`, `privacy.html`, `sla.html` - 법적 페이지 +- `functions/` - Cloudflare Pages Functions (API proxy) + +### API Endpoints (Pages Functions) + +| Method | Path | Description | +|--------|------|-------------| +| GET | `/api/health` | Health check | +| GET | `/api/instances` | Query VM instances | +| POST | `/api/recommend` | Tech stack recommendations | + +**Proxy Target**: https://cloud-instances-api.kappa-d8e.workers.dev ### Tech Stack - Tailwind CSS v4 (로컬 빌드, `style.css`) @@ -48,5 +59,16 @@ Navigation → Hero (Telegram Bot Demo) → Features (`#features`) → Automatio ## External Integrations - **Telegram Bot**: @AnvilForgeBot (서버 생성, 도메인 등록) +- **Worker API**: cloud-instances-api (VM pricing aggregator) - **Credentials**: Stored in Vault at https://vault.anvil.it.com - **Registrant Info Source**: npm-linode-1 server (`/home/admin/namecheap_api/.env`) + +## Environment Configuration + +### Secrets (set via Cloudflare Dashboard or CLI) +```bash +wrangler pages secret put WORKER_API_KEY +``` + +### Variables (wrangler.toml) +- `WORKER_API_URL` - Worker API base URL diff --git a/README.md b/README.md index 474b387..736822f 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,50 @@ -# Anvil Hosting - Cloudflare Pages +# Anvil Hosting -공식 웹사이트: https://hosting.anvil.it.com +Static HTML 마케팅 웹사이트 - Cloudflare Pages 배포 + +**URL**: https://hosting.anvil.it.com ## 배포 ```bash -cd /Users/kaffa/anvil-hosting wrangler pages deploy . --project-name anvil-hosting ``` -## 구성 +빌드 단계 없이 바로 배포. -- **로고**: 3D 메탈릭 모루 + 대장간 망치 + 불꽃 (SVG) -- **서비스 순서**: 도메인 → DDoS → 해외서버 → 웹호스팅 -- **푸터 사업자 정보**: namecheap-api 등록자 정보와 동일 +## 아키텍처 + +### 파일 구조 +- `index.html` - 메인 랜딩 페이지 +- `style.css` - Tailwind CSS v4 빌드 결과 +- `fonts.css` - 시스템 폰트 정의 +- `app.js` - Alpine.js 앱 로직 (Server Launcher, Pricing Table 등) +- `terms.html`, `privacy.html`, `sla.html` - 법적 페이지 + +### Tech Stack +- Tailwind CSS v4 (로컬 빌드) +- Alpine.js 3.14.3 (CDN with SRI) +- 시스템 폰트 (-apple-system, Apple SD Gothic Neo, Malgun Gothic) + +### 디자인 시스템 +- 다크 테마 (배경: #0a0f1a) +- 글래스모피즘 효과 (glass-card, glass-panel) +- 메시 그라디언트 배경 +- Color palette: brand-* (sky blue 계열), purple, green, red + +## 페이지 섹션 + +Navigation → Hero (Telegram Bot Demo) → Features → Automation → Infrastructure → Domain → Pricing → Footer + +## 주요 컴포넌트 + +- **Server Launcher Modal**: Alpine.js 기반 서버 생성 마법사 +- **Pricing Table**: 리전별 (Global/Seoul) 동적 요금표 +- **Telegram Bot Demo**: Hero 섹션 대화형 데모 + +## 외부 연동 + +- **Telegram Bot**: @AnvilForgeBot (서버 생성, 도메인 등록) ## 등록자 정보 소스 diff --git a/app/index.html b/app/index.html index aa91a12..0e982ef 100644 --- a/app/index.html +++ b/app/index.html @@ -23,27 +23,50 @@ - - - -