How nq-solution/ctbuh works
목적과 범위
입체도시건축학회(구 CTBUH Korea) 홈페이지 개편 저장소다. 현재 최상위 README의 명시적 1단계 산출물은 프레임워크 없는 HTML/CSS 메인 페이지 시안 5종이며, 별도로 IJHRB 학술지 운영을 위한 OJS·SSO·워크플로우 커스터마이징과 자체 호스팅 CMS(Instatic) 코드베이스를 포함한다. 핵심 진입점은 mockups/index.html, ojs/docker-compose.yml, instatic/src/admin/main.tsx, instatic/server/index.ts이다.
디자인 시안 단계
정적 목업은 동일 IA/콘텐츠를 서로 다른 시각 체계로 비교하는 독립 페이지들이다. 브라우저 또는 python3 -m http.server로 제공되며, CMS나 OJS 런타임과 직접 결합된 구조는 트리상 확인되지 않는다.
• mockups/index.html
• mockups/a-structural.html
• mockups/e-monument.html
Instatic CMS: 관리자와 도메인 모델
instatic/은 React 관리자와 Bun/TypeScript 서버를 함께 가진 시각적 사이트 빌더/CMS다. 관리자는 사이트 캔버스, 콘텐츠, 데이터 테이블, 미디어, 플러그인, 사용자 및 AI 기능을 작업공간 단위로 제공한다. 사이트 문서/page-tree, 스타일 규칙, 모듈, 템플릿, visual component가 편집의 중심 데이터 모델이다.
• instatic/src/admin/AdminEntry.tsx
• instatic/src/admin/pages/site/SitePage.tsx
• instatic/src/core/page-tree/siteDocument.ts
CMS 서버, 보안, 영속성 경계
HTTP 라우터가 CMS 핸들러를 노출하고, 인증·역할·capability·MFA/step-up 정책이 관리자 및 API 접근을 통제한다. 저장소 계층은 비즈니스 핸들러와 DB 구현을 분리하며 SQLite와 PostgreSQL의 마이그레이션/방언을 지원한다. 미디어는 별도 저장소 어댑터와 업로드 경로를 통해 다뤄진다.
• instatic/server/http.ts
• instatic/server/handlers/cms/index.ts
• instatic/server/db/index.ts
• instatic/server/auth/authz.ts
편집에서 공개 발행까지
관리자 변경은 CMS persistence API를 거쳐 사이트 문서·콘텐츠·미디어·데이터 저장소에 저장된다. 발행 계층은 페이지 트리와 모듈을 HTML/CSS/런타임 자산으로 렌더·번들링하고, 정적 산출물·캐시·동적 hole/loop 런타임을 통해 공개 라우터에서 제공한다. 폼 제출은 공개 런타임에서 별도 핸들러와 rate limit/challenge 경계를 가진다.
• instatic/src/admin/pages/site/hooks/usePersistence.ts
• instatic/server/handlers/cms/publish.ts
• instatic/server/publish/publishSite.ts
• instatic/server/publish/publicRouter.ts
확장성과 AI 경계
플러그인은 SDK/manifest를 통해 관리자 UI, 모듈, 훅, 스케줄, 미디어 및 서버 기능을 확장하지만, 서버 측 QuickJS worker sandbox와 RPC/capability 경계를 통과해야 한다. AI는 Anthropic, OpenAI 호환, OpenRouter, Ollama 드라이버를 지원하며, 대화·자격증명·감사 로그를 저장하고 도구 호출 및 MCP 커넥터를 capability-gate한다.
• instatic/server/plugins/runtime.ts
• instatic/server/plugins/quickjs/vm.ts
• instatic/server/ai/drivers/index.ts
• instatic/server/ai/mcp/server.ts
IJHRB OJS와 SSO 운영
ojs/는 Docker 기반 PHP OJS 배포 패키지다. IJHRB 테마와 심사/대시보드 정책 플러그인을 OJS 볼륨으로 주입한다. Keycloak realm 정의와 OpenID 플러그인이 OJS 인증 연동을 구성하며, Cloudtype 매니페스트가 OJS와 Keycloak 배포 단위를 나타낸다. 최상위 Playwright E2E는 OJS 탐색·로케일·SSO 및 편집/심사/출판 흐름을 검증한다.
• ojs/volumes/plugins/generic/ijhrbWorkflow/IjhrbWorkflowPlugin.php
• ojs/volumes/plugins/themes/ijhrb/IjhrbThemePlugin.php
• keycloak/import/ctbuh-realm.json
• .cloudtype/ojs.yaml
Main entry points: docker-compose.yml OJS deployment · SitePage.tsx Site canvas editor · http.ts CMS HTTP router · index.ts CMS handlers
Components 23
Design mockups
Five framework-free homepage visual directions.
- Mockup index
mockups/index.html - Structural direction
mockups/a-structural.html - Monument direction
mockups/e-monument.html
Instatic CMS
Visual site builder with React admin and Bun server.
- CMS admin workspace · Workspace UI for site, content, media, users, plugins, and AI.
instatic/src/admin/AdminEntry.tsx - Site canvas editor
instatic/src/admin/pages/site/SitePage.tsx - Site document model · Pages, styles, modules, templates, and visual components.
instatic/src/core/page-tree/siteDocument.ts - Persistence API
instatic/src/admin/pages/site/hooks/usePersistence.ts - CMS HTTP router
instatic/server/http.ts - CMS handlers
instatic/server/handlers/cms/index.ts - Access policy · Roles, capabilities, MFA, and step-up controls.
instatic/server/auth/authz.ts - CMS data stores · SQLite and PostgreSQL implementations and migrations.
instatic/server/db/index.ts - Publish API
instatic/server/handlers/cms/publish.ts - Static publisher · Renders and bundles pages into public assets and runtime output.
instatic/server/publish/publishSite.ts - Public site runtime · Serves static output, cache, dynamic holes, loops, and protected forms.
instatic/server/publish/publicRouter.ts - Plugin runtime · Loads SDK and manifest extensions for UI and server capabilities.
instatic/server/plugins/runtime.ts - QuickJS sandbox · RPC and capability boundary for server-side plugins.
instatic/server/plugins/quickjs/vm.ts - AI provider drivers · Provider abstraction for Anthropic, OpenAI-compatible, OpenRouter, and Ollama.
instatic/server/ai/drivers/index.ts - MCP tool gateway
instatic/server/ai/mcp/server.ts
IJHRB journal platform
Docker-deployed OJS with SSO and journal customizations.
- OJS deployment · PHP OJS runtime with injected journal plugins and theme.
ojs/docker-compose.yml - Editorial workflow plugin · Custom review and dashboard policy.
ojs/volumes/plugins/generic/ijhrbWorkflow/IjhrbWorkflowPlugin.php - IJHRB theme
ojs/volumes/plugins/themes/ijhrb/IjhrbThemePlugin.php - Keycloak realm · OpenID identity realm for OJS.
keycloak/import/ctbuh-realm.json - Cloudtype manifest · Declares OJS and Keycloak deployment units.
.cloudtype/ojs.yaml
Connections 22
- Mockup index → Structural direction: links to
- Mockup index → Monument direction: links to
- CMS admin workspace → Site canvas editor: hosts
- Site canvas editor → Site document model: edits
- Site canvas editor → Persistence API: saves through
- Persistence API → CMS HTTP router: calls
- CMS HTTP router → Access policy: enforces
- CMS HTTP router → CMS handlers: routes to
- CMS handlers → CMS data stores: persists content and media
- CMS handlers → Publish API: publishes via
- Publish API → Static publisher: invokes
- Static publisher → CMS data stores: reads site data
- Static publisher → Public site runtime: produces output for
- Plugin runtime → QuickJS sandbox: executes in
- QuickJS sandbox → Access policy: uses capabilities
- AI provider drivers → MCP tool gateway: enables tool calls through
- MCP tool gateway → Access policy: capability-gated by
- OJS deployment → Editorial workflow plugin: mounts
- OJS deployment → IJHRB theme: mounts
- OJS deployment → Keycloak realm: uses OpenID SSO
- Cloudtype manifest → OJS deployment: deploys
- Cloudtype manifest → Keycloak realm: deploys