Files
m105andClaude Sonnet 5 c249a14d78 Add storyboard/video-gen/video-editing handlers and asset previews (#37-39, #45, #46)
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>
2026-08-06 21:15:31 +03:00

41 lines
1.9 KiB
PHP

<?php
use App\Livewire\Auth\Login;
use App\Livewire\Posts\Index as PostsIndex;
use App\Livewire\Sites\Index as SitesIndex;
use App\Livewire\SocialAccounts\Index as SocialAccountsIndex;
use App\Livewire\Templates\Index as TemplatesIndex;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('welcome');
});
Route::get('/login', Login::class)->middleware('guest')->name('login');
Route::post('/logout', function () {
Auth::guard('web')->logout();
request()->session()->invalidate();
request()->session()->regenerateToken();
return redirect('/login');
})->middleware('auth')->name('logout');
Route::middleware('auth')->group(function () {
Route::get('/sites', SitesIndex::class)->name('sites.index');
Route::get('/social-accounts', SocialAccountsIndex::class)->name('social-accounts.index');
Route::get('/posts', PostsIndex::class)->name('posts.index');
Route::get('/templates', TemplatesIndex::class)->name('templates.index');
Route::get('/projects', \App\Livewire\Projects\Index::class)->name('projects.index');
Route::get('/tasks', \App\Livewire\Tasks\Index::class)->name('tasks.index');
Route::get('/task-comments', \App\Livewire\TaskComments\Index::class)->name('task-comments.index');
Route::get('/ideas', \App\Livewire\Ideas\Index::class)->name('ideas.index');
// Video Projects — a separate domain from Projects/Tasks/Ideas above,
// see task #47 on the "YouTube Content Creation System" project.
Route::get('/video-projects', \App\Livewire\VideoProjects\Index::class)->name('video-projects.index');
Route::get('/video-projects/{videoProject}', \App\Livewire\VideoProjects\Show::class)->name('video-projects.show');
Route::get('/video-projects/{videoProject}/assets/{asset}', [\App\Http\Controllers\VideoProjectAssetController::class, 'show'])->name('video-projects.assets.show');
});