04 — 2025

Sora 2 Tool

A front end for OpenAI's Sora 2 video API that tracks every job to completion and keeps the results.

Role
Solo — design, build, ship
Year
2025
Stack
TypeScript · React 18 · Vite · Tailwind CSS · Supabase (Postgres, Storage) · OpenAI Sora 2 API
Links
LiveSource
The Sora 2 generator: a prompt field, example chips, an optional starting-image upload, and model, resolution and duration selectors

What it is

Sora 2 Tool takes a prompt, an optional starting image, a model, a resolution and a duration, launches a video-generation job against OpenAI's Sora 2 API, and then does the unglamorous part: it polls the job, reconciles its status into Supabase, downloads the finished MP4 into a storage bucket under a deterministic name, and plays it back in a history view that survives reloads.

A second screen is an operator console — a four-step test suite (OpenAI connectivity, Supabase connectivity, schema validation, a minimal smoke generation) with a timestamped log you can paste into a bug report. Your API key never leaves the browser: it lives in localStorage and requests go straight from your machine to OpenAI.

How it's built

  • Vite + React + TypeScript single-page app with Tailwind. VideoService orchestrates Supabase records and the SoraAPI wrapper; a background poll flips pending jobs to completed or failed without user action.
  • Supabase migrations define the video_generations table, its triggers and indexes, plus the video_files and image_files storage buckets.
  • Starting images are uploaded to storage first and the public URL is persisted with the job, so image-to-video runs are reproducible.

Highlights

  1. 01Status reconciliation is idempotent: re-checking a job updates metadata and uploads the MP4 once, under a name derived from the job id.
  2. 02The test console turned debugging from guesswork into a checklist — it's how the image-to-video failure path was isolated.
  3. 03Deployed on Vercel with only Supabase environment variables; the OpenAI key is supplied per browser by the user.

What I'd do next

  • Per-user rows and locked-down storage policies before it's more than a single-user tool.
  • Automatic cleanup of MP4s and images when a generation is deleted.

More screens

The operator test console: a four-step test suite for API, database, schema and generation, beside an empty debug log panel
The Sora 2 generator on a phone