gora.
GoraGen — AI video generation platform

Business logic

User journey from sign-up to publishing: personas, generation, storyboards, LoRA training.

~4 min read · 882 words

TL;DR

GoraGen is a SaaS platform for AI video generation. A user signs up, gets a credit balance, picks a character from the library or trains their own, describes a scene in words — the platform generates the video, automatically scores quality, retries until the result is acceptable, and helps schedule posts to social media.

GoraGen — what the platform does

Who needs this

Content creators, marketers, agencies, and independent sellers who need to ship video content regularly but lack the time, budget, or skills for a shoot. AI video covers the range from 5-second vertical clips for TikTok/Reels to multi-shot stories.

The main pain the platform solves: today's AI video quality is a lottery. The same prompt can deliver an excellent result or pure garbage. A professional AI videographer runs generation 5–15 times with different parameters, eyeballs the output, picks the best. GoraGen automates that — between the generation and the user stands Gemini, which scores the result on objective criteria and decides on its own: keep it, retry with different parameters, or admit the model can't handle this and switch to another.

User journey

Step 1. Sign-up and dashboard

Email sign-up — the password is hashed with Argon2. After sign-up a workspace (a team space) is created and the user receives a welcome credit. JWT cookies are set on .goragen.com, so landing, dash, and admin share the session.

In the dashboard (apps/dash) — the main screen with credit balance, recent generations, and hints. From the dash you can access: persona library, scenario builder, generation history, LoRA training, voice cloning, social distribution, billing.

Step 2. Pick a persona

A persona is a virtual "actor": appearance, dress style, manner. Three sources: — System personas — platform presets (men, women, ages, styles). — Workspace personas — custom, created inside the workspace. — Mine — ones the user trained themselves via the LoRA wizard.

Each persona has a "lookbook" — a set of generated frames for preview. And "presets" — ready bundles of parameters (camera, backgrounds, lighting) that work with this persona.

Step 3. Single-shot generation

The simplest path: pick a persona, write a prompt, hit "generate". Under the hood:

  1. The prompt in Russian (if any) is translated to English via deep-translator.
  2. Claude picks an appropriate model: WAN 2.2 (motion), HunyuanVideo (long shots), LTX 2.3 (image-to-video) — based on prompt analysis.
  3. A Vast.ai GPU instance is rented (40-80GB VRAM depending on the model).
  4. A ComfyUI workflow is composed programmatically from templates with LoRA model substitution (if the persona uses any).
  5. The job is queued on remote ComfyUI; progress streams to the client over WebSocket.
  6. The finished video is sent to Gemini 2.5 Pro for evaluation: four criteria (prompt adherence, artifacts, temporal consistency, overall quality), each 0–10, plus a verdict excellent / good / acceptable / poor / regenerate.
  7. If regenerate or poor — Gemini suggests parameter changes, generation reruns. If acceptable — increment seed by 1 and repeat. If good/excellent — save the result and record it as a recipe in the database.

The user sees this whole process in real time over WebSocket — which model is selected, which attempt we're on, what Gemini said.

Step 4. Storyboards

For multi-shot videos — a separate mode. The user describes scenes (sh1: "character enters the room", sh2: "close-up of the face", sh3: "exits through the door"). The platform generates each shot but doesn't kill the Vast instance between them — the storyboard runner passes keep_instance=True to every shot except the last. This saves 1–2 minutes of GPU provisioning per shot after the first.

If the storyboard runner crashes mid-flight — a safety net in storyboard_runner.py force-kills the instance to avoid paying for a hung GPU.

Step 5. LoRA training

If the user wants their own character — they upload 15–30 photos, and the platform trains a LoRA model on kohya_ss. Steps:

  1. BLIP-2 captioning — the model writes photo captions automatically.
  2. Validation grid — pre-training test frames generated to set a baseline.
  3. Training runs on a Vast instance with ≥40GB VRAM — 45–90 minutes.
  4. After training — a fresh validation grid to compare.
  5. The model is pushed to R2 storage, metadata — to the lora_workspaces table.
  6. The persona is automatically added to the user's library with status "Mine".

Step 6. Distribution

A finished video can be scheduled to social networks. distribution_worker ticks every 30 seconds, picks posts that have reached their publication date, ships them to the social platform. Captions are generated by Claude from the video metadata.

Economics and credits

Credits are reserved at the start of a generation (estimated load) and committed by fact (actual GPU time + API call costs). If generation fails — credits are refunded. A live ticker shows current spent / reserved / remaining / USD equivalent in the UI.

user_daily_spend caps the maximum daily spend — protection against runaway costs from code bugs.

Multi-tenant

The platform is multi-tenant in the "workspace = team" sense. One workspace can hold several users with different rights. All data is isolated per workspace: personas, LoRA models, history, billing.

The Admin role sees cross-workspace (for support and audit). All admin actions are logged in domain_events (an append-only event log).