How choichoi3227-crypto/cloud-press works
The repository contains two independently deployed products: a root-level search, research, and AI-image API, and an AI-model platform exposed through a Cloudflare gateway and inference server, with WordPress-facing account and deployment plugins. The main workflows run from API request through routing and domain processing to results; model text requests additionally fetch research context before inference. Training code is represented as a separate model-development stage. Edges cite README statements or shown source/index references; unsampled details are not inferred.
Main entry points: index.ts API gateway · main.py Inference server · research-handler.js Research handler · worker-search.js Worker router
Components 33
Search and image API
- Worker router
worker-search.js - Pages endpoints
functions/api/search.js - Research endpoint
functions/api/research.js - Search scraping
search-core.js - Research handler
research-handler.js - Research synthesis
research-core.js - Image art director
image-core.js - Image style briefs
image-styles.js - SVG audit
svg-audit.js
Model API gateway
- API gateway
ai-models/workers/api-gateway/src/index.ts - Text route
ai-models/workers/api-gateway/src/routes/text.ts - Image route
ai-models/workers/api-gateway/src/routes/image.ts - API key auth
ai-models/workers/api-gateway/src/middleware/auth.ts - Rate limiting
ai-models/workers/api-gateway/src/middleware/rateLimit.ts - Inference client
ai-models/workers/api-gateway/src/lib/inferenceClient.ts
Inference serving
- Inference server
ai-models/inference-server/main.py - Text generation
ai-models/inference-server/routers/text.py - Image generation
ai-models/inference-server/routers/image.py - Flash Texter
ai-models/inference-server/models/flash_texter.py - Nano-Tech Artist
ai-models/inference-server/models/nano_tech_artist.py - Search augmentation
ai-models/inference-server/models/search_augment.py
Model training
- Flash Texter training
ai-models/training/flash-texter/train.py - Text model definition
ai-models/training/flash-texter/model.py - Text tokenizer
ai-models/training/flash-texter/tokenizer.py - Artist training
ai-models/training/nano-tech-artist/train.py
WordPress experience
- Account connector
ai-models/wordpress/cloud-press-connector/cloud-press-connector.php - Account access
ai-models/wordpress/cloud-press-connector/includes/class-cp-auth.php - Deploy approvals
ai-models/wordpress/cloud-press-deploy/includes/class-cp-deploy-approval.php - Site theme
ai-models/wordpress/cloud-press-theme/functions.php
Other components
- API caller
- Google and Naver
- Workers AI
- Site user
Connections 37
- API caller → Worker router: requests API
- Worker router → Search scraping: routes search
worker-search.js - Worker router → Research handler: routes research
worker-search.js - Worker router → Image art director: routes image
worker-search.js - Pages endpoints → Search scraping: uses search
functions/api/search.js - Research endpoint → Research handler: handles research
functions/api/research.js - Research handler → Search scraping: fetches results
research-handler.js - Research handler → Research synthesis: builds research
research-handler.js - Search scraping → Google and Naver: scrapes results
search-core.js - Research synthesis → Workers AI: optionally enhances
- Image art director → Image style briefs: uses style briefs
- Image art director → SVG audit: audits output
- Image art director → Workers AI: generates artwork
- API caller → API gateway: calls model API
- API gateway → Text route: routes text
ai-models/workers/api-gateway/src/index.ts - API gateway → Image route: routes image
ai-models/workers/api-gateway/src/index.ts - API gateway → API key auth: enforces API keys
ai-models/workers/api-gateway/src/index.ts - API gateway → Rate limiting: limits model routes
ai-models/workers/api-gateway/src/index.ts - Text route → Inference client: calls inference
ai-models/workers/api-gateway/src/routes/text.ts - Image route → Inference client: calls inference
- Inference client → Inference server: proxies requests
ai-models/workers/api-gateway/src/lib/inferenceClient.ts - Inference server → Text generation: mounts router
ai-models/inference-server/main.py - Inference server → Image generation: mounts router
ai-models/inference-server/main.py - Inference server → Flash Texter: loads model
ai-models/inference-server/main.py - Inference server → Nano-Tech Artist: loads model
ai-models/inference-server/main.py - Text generation → Search augmentation: fetches context
ai-models/inference-server/routers/text.py - Text generation → Flash Texter: generates response
ai-models/inference-server/routers/text.py - Search augmentation → Research handler: requests research
ai-models/inference-server/models/search_augment.py - Image generation → Nano-Tech Artist: generates image
ai-models/inference-server/routers/image.py - Flash Texter training → Text model definition: trains model
- Flash Texter training → Text tokenizer: uses tokenizer
- Artist training → Text model definition: imports model module
ai-models/training/nano-tech-artist/train.py - Site user → Account connector: uses account site
- Account connector → Account access: provides authentication
- Account connector → API gateway: requests API keys
- Site user → Site theme: views site
- Deploy approvals → API gateway: uses deploy proxy