Skip to content

Latest commit

 

History

History
142 lines (101 loc) · 3.58 KB

File metadata and controls

142 lines (101 loc) · 3.58 KB

Content Forge AI - Standalone Application

Content Forge AI dapat berjalan sebagai standalone web application, tidak hanya sebagai WordPress plugin.

📦 Apa itu Standalone Application?

Standalone application berarti aplikasi yang bisa berjalan sendiri tanpa dependency pada WordPress atau CMS lainnya. Aplikasi ini adalah:

  • React Application - Frontend built dengan Vite
  • Node.js Backend - Express server untuk image generation (menghindari CORS)
  • Static Files - HTML, CSS, JavaScript yang bisa di-serve oleh web server apapun

🏗️ Architecture

┌─────────────────┐
│   Web Browser   │
│  (Frontend App) │
└────────┬────────┘
         │
         ├───> OpenLiteSpeed ───> Static Files (dist/)
         │
         └───> Backend API ───> Gemini API (Image Generation)
              (Node.js:5000)

🚀 Quick Start (Standalone)

Local Development:

# Install dependencies
npm install

# Run backend + frontend together
npm run dev:full

# Or separately:
# Terminal 1: npm run server (backend)
# Terminal 2: npm run dev (frontend)

Production Build:

# Build standalone application
npm run build

# Output: dist/ folder
# Contains: index.html, js/, assets/

Production Deployment:

# Deploy frontend static files to web server
# Deploy backend Node.js server separately
# See DEPLOYMENT_STANDALONE.md for full guide

📋 Features

All Features Available:

  • Ideation (Generate content ideas)
  • Curation (Select & rate ideas)
  • Expansion (Platform-specific content)
  • Image Generation (via backend proxy)
  • AI Brain
  • Content Library (with CSV/TXT export)
  • Settings (OpenRouter, Gemini API keys)

🔧 Configuration

Frontend Configuration:

Tidak perlu konfigurasi khusus. Frontend akan:

  • Auto-detect jika running di WordPress (via window.wpApiSettings)
  • Fallback ke OpenRouter jika API key ada
  • Fallback ke Gemini jika tidak ada OpenRouter key

Backend Configuration:

Create .env file:

GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_API_KEY_IMAGE=your_gemini_api_key_here
BACKEND_PORT=5000
FRONTEND_URL=https://your-domain.com
NODE_ENV=production

🌐 Deployment Options

1. OpenLiteSpeed Server

  • Serve static files (frontend)
  • Proxy backend API requests
  • See DEPLOYMENT_STANDALONE.md for complete guide

2. Apache Server

  • Similar to OpenLiteSpeed
  • Use .htaccess for routing
  • Configure reverse proxy for backend

3. Nginx Server

  • Serve static files
  • Configure reverse proxy for backend API

4. Static Hosting (Vercel, Netlify, etc.)

  • Frontend only (no backend)
  • Image generation akan menggunakan direct API call (butuh API key di frontend, less secure)

📚 Documentation

  • DEPLOYMENT_STANDALONE.md - Complete standalone deployment guide for OpenLiteSpeed
  • DEPLOYMENT_GUIDE.md - WordPress plugin deployment guide
  • README_IMAGE_GENERATION.md - Image generation setup guide
  • QUICK_START.md - Quick start guide

⚡ Benefits of Standalone Mode

  1. No WordPress Required - Run anywhere
  2. Easy to Deploy - Just static files + Node.js backend
  3. Full Control - Customize server configuration
  4. Performance - Optimized static file serving
  5. Scalability - Can use CDN for static assets

🔐 Security

  • API keys stored securely in backend .env
  • CORS configured for production domains
  • Backend proxy prevents API key exposure
  • HTTPS recommended for production

Last Updated: 2025-01-15
Version: 1.0.0