StoryboardHandler (#37): breaks the project's script into a numbered
scene-by-scene breakdown (description + image prompt per scene) via
OpenAI in JSON mode (added json_mode support to OpenAiDriver for
reliable structured output), stored as a JSON asset.
VideoGenerationHandler (#38): generates one still image per storyboard
scene via StabilityAI — the scene *visuals*, not motion/video clips
(no text-to-video model integrated; see the task comment for why).
VideoEditingHandler (#39): the step that actually produces a video
file — assembles the scene stills into an MP4 via ffmpeg's concat
demuxer, timed to the voiceover audio's duration (probed via ffprobe)
or a fixed per-scene duration if there's no audio, then muxes the
audio track in. Verified against the real ffmpeg/ffprobe binaries on
this box, not just Process::fake().
Asset previews (#45, #46): a reusable partial renders each asset
inline by type — image/audio/video get real playback elements, text/
JSON gets a truncated <pre> block, everything else a download link.
Wired into both the awaiting_approval step view (so approving/
rejecting is an actual content review, not just a word count) and a
general project assets grid.
Also fixes a latent bug in AssetStorage::url(), found while wiring up
previews: it called Storage::url() on the default 'local' disk, which
has no configured URL driver and throws in production — only worked
before because Storage::fake() is more permissive than the real local
driver. Now serves assets through a new authenticated streaming route
instead (VideoProjectAssetController).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
StepHandler abstraction (app/Support/VideoWorkflow/StepHandlers/) plugs
into WorkflowEngine without coupling it to how any given step type is
actually executed:
- ScriptGenerationHandler: builds a prompt from the project's title/
description (or an explicit outline/tone/keywords/target length in
step input), generates via an active OpenAI AiProvider, stores the
result as a 'script' asset.
- TtsVoiceoverHandler: voices step.input.text, or falls back to the
project's latest script asset, via an active ElevenLabs AiProvider;
voice_id/model_id are configurable per step. No direct "speed"
control — ElevenLabs' base TTS endpoint doesn't expose one.
RunWorkflowStepJob resolves a step's handler by type and runs it on
the queue, matching the existing PublishPostJob pattern (including a
stale-dispatch guard: no-op if the step isn't 'in_progress' anymore).
UI, under its own /video-projects routes and nav entry — separate
from /projects per the earlier decision:
- VideoProjects/Index (#43): list projects with status and step
progress, create new ones.
- VideoProjects/Show (#44): start a project from a WorkflowTemplate or
a hardcoded default 8-step pipeline; per-step Run/Approve/Reject/
Retry/Skip actions; auto-queues the next step after any transition
when a handler exists for its type (steps with no handler yet just
sit in_progress rather than auto-failing); lists project assets.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was already implemented, migrated, and running live, but had
never been committed. Bringing it into git: Project/Task/Idea/
TaskComment models, their JSON API (CRUD + status transitions,
task comments, idea<->project linking), Livewire UI pages, and the
nav/route wiring for them. All 42 of its own tests pass.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Create templates table with name, body, type, title, target, placeholders
- Add Template model with applyToPost method for placeholder replacement
- Add Livewire Templates/Index component for CRUD operations
- Add templates index view with form and table
- Add /templates route
- Update Posts/Index to support template selection when creating posts
- Templates can be applied to pre-fill post form fields
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Sites/Social Accounts/Posts pages now require login; add a Login
Livewire component, guest layout, and logout action. routes/api.php
is untouched, per AI_API.md's documented no-auth-by-design contract.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds the Posts index page (list/create/edit/delete) following the
existing Sites/SocialAccounts pattern, and extends the shared nav
layout with a Posts link.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>