RAG-powered image and video generation: natural-language prompts → web search + context → optimized prompts → DALL·E 3 / Replicate (or local Stable Diffusion). FastAPI backend, React + Vite frontend.
Backend
pip install -r requirements.txt
cp .env.example .env # set OPENAI_API_KEY, REPLICATE_API_TOKEN, etc.
uvicorn backend.main:app --reload --port 8000Frontend
cd frontend && npm install && npm run devOpen http://localhost:5173. API runs at http://localhost:8000; Vite proxies /api to the backend.
- Query → DuckDuckGo search + ChromaDB context → context-rich document
- Prompt optimizer turns that into image and video prompts (style, camera, lighting, negative prompts)
- Generation: images via OpenAI or local Diffusers; video via Replicate or Veo-style APIs
- Dashboard: prompt form, context panel, results (images + video), token/credit metrics, settings
| Variable | Purpose |
|---|---|
EXECUTION_MODE |
api or local |
IMAGE_PROVIDER |
openai or local |
VIDEO_PROVIDER |
replicate (or Veo-style) |
OPENAI_API_KEY |
Required for API image generation |
REPLICATE_API_TOKEN |
Required for API video |
See .env.example for the full list.
backend/— FastAPI:/api/generate(image, video, all),/api/context,/api/settings,/api/metrics,/api/projects. Config incore/config.py, RAG inservices/rag/, generation inservices/generation/, pipeline inservices/pipeline/.frontend/— React, Vite, Tailwind. Main UI:PromptForm,ContextPanel,ResultsPanel,TokenMetricsPanel,SettingsPanel.data/— SQLite DB and Chroma (created at runtime; ignored by git).
curl http://localhost:8000/api/healthReturns status, execution mode, and active providers.