a698c6b2255e6bf72db8fa5392d5ad977063d5e9
En vez de esperar el render dentro de la request (imposible con la cola nocturna de H3), ahora el ciclo es async y la cola/worker viven server-side en h3api: - submit no bloqueante: POST /v1/jobs → se persiste una variación `queued` con h3_job_id y se responde al instante. video-service expone submitVideoJob() + getJobStatus() (sin polling). - nueva acción `sync-jobs` en el route de vídeos: avanza los jobs pendientes del capítulo (queued→processing→ready/error); en `done` descarga el mp4, lo guarda y auto-selecciona la primera variación lista. Reintenta en el siguiente tick ante fallos de red (no marca error). - SQLite: columnas `status`/`h3_job_id`/`error` en video_variations + migración idempotente (filas existentes → 'ready'). video_url pasa a DEFAULT '' (queued aún no tiene vídeo). - UI: la tarjeta de variación muestra spinner 'En cola'/'Generando…' y estado 'error'; el player solo con variación 'ready'. La página hace polling cada 45s solo si hay pendientes. - resolución por plano (16:9 832×480 / 9:16 480×832 vía body.aspect). cost_usd = 0. NO mergear a master hasta que essia-server dé "live" + H3API_KEY. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Deploy
Producción: https://story-studio.carlosnarro.com — desplegada en Dokploy (instancia personal "Forja", panel.carlosnarro.com) con autodeploy desde Gitea.
- Push a
masterengit.carlosnarro.com/carlos/story-studio→ Dokploy reconstruye la imagen (Dockerfile) y redespliega automáticamente. - Build:
Dockerfile(npm run buildcon webpack +next start). Elbuildscript usa--webpacka propósito (la config de@remotiones incompatible con el Turbopack por defecto de Next 16). - Datos persistentes (bind mounts, no van en la imagen):
/app/data→ SQLite (story-studio.db)/app/projects→ imágenes y vídeos generados
- Env vars en Dokploy:
GEMINI_API_KEY(imagen),OPENAI_API_KEY(texto), y opcionalmenteARK_API_KEY(vídeo).
Description
Languages
TypeScript
94.1%
JavaScript
5.4%
CSS
0.4%
Dockerfile
0.1%