Commit graph

178 commits

Author SHA1 Message Date
juancarlos.cavero
0b59047422 feat(dashboard): social-connect nudge at the results peak
Only 2.7% of cloud users who pass through the social flow ever connect a
network (146 of 5,406 Upload-Post profiles), yet publishing from the app
is the strongest retention loop we have. Show a dismissible banner right
when the clips appear - the moment with the best odds - prompting managed
users with no connected network to open the hosted connect page.

Instrumented like the other conversion moments: SocialNudgeSeen (once per
job), SocialNudgeConnect, SocialNudgeDismissed (persisted in localStorage,
never shown again). Hidden automatically once any network is linked.
2026-08-21 04:36:05 +02:00
juancarlos.cavero
9d18520c2e fix(editor): four UX corrections from issue #73
- The clip track's scale is now the rendered length instead of the
  current total, so trimming a segment visibly shortens its bar; before,
  a single-segment clip always filled 100% of the track and dragging its
  handle appeared to move nothing.

- Playback boundaries are enforced by a per-frame rAF loop instead of
  timeupdate (~4Hz), which let the preview overshoot a trimmed endpoint
  by up to 250ms — the exact frame is what an end trim is judged
  against. Hitting an edge also snaps currentTime back onto it.

- The transcript header now offers 'segment starts/ends here' actions on
  the selected word, where the eye already is when choosing a cut point
  from the text.

- Closing the editor mid-render is allowed and explained: the request
  keeps running and onRerendered (functional setState in App) updates
  the clip card after the editor is gone.
2026-08-21 04:20:18 +02:00
juancarlos.cavero
e4792fd3b3 feat: hand the Thumbnail Studio video and transcript straight to the clip generator
Issue #68: publishing a video to YouTube from the Studio now offers
'create clips from this video'. /api/process accepts a
thumbnail_session_id, hardlinks the session's source under the job's
name (so /api/source, the clip editor and retention treat it like a
normal upload) and forwards the session's transcript via a new
main.py --transcript flag, so the pipeline skips a second Whisper pass.

Any problem with the forwarded transcript (missing file, no segments,
silent source) falls back to transcribing normally, and empty
transcripts are not forwarded at all. Contract pinned by six endpoint
tests plus a fallback case; verified end to end locally against the
running app (speech video: 'Reusing precomputed transcript (4
segments)' in the job log).
2026-08-20 19:48:13 +02:00
juancarlos.cavero
d0e1f5adfd feat: raise the self-host job retention default to 24h and surface it in the UI
Issue #46 round two: the 1h sweep kept deleting finished projects under
self-hosters who never touched their env. The disk is already bounded by
OUTPUT_MAX_GB / UPLOADS_MAX_GB, so age can afford to be generous. Cloud
keeps the tight default because clips are archived to R2 on completion.

The results panel now tells self-host users how long their clips live
and which env var controls it, and the restorable-session window follows
the new default.
2026-08-20 19:29:55 +02:00
mutonby
05f13254e7
Merge pull request #72 from tuliovianna-lab/feat/clip-editor-ux
Clip editor: source monitor, three-point editing, and a timeline that works while edited
2026-08-20 12:33:28 +01:00
juancarlos.cavero
aa0c841b47 feat(landing): mention MCP in the hero description
The hero now pitches the agent audience too: 'also a clipping tool for ai
agents: claude, chatgpt and n8n drive it over mcp', linking to /mcp. Same
sentence added to the crawler-visible fallback copy (landing-fallback.js
must stay in sync with Landing.jsx).
2026-08-20 02:10:08 +02:00
juancarlos.cavero
2900047b78 feat(legal): full legal corpus — Terms, Privacy, Legal Notice in EN+ES
Replaces the single thin Terms & Privacy SPA view with six indexed static
pages (/terms /privacy /legal-notice + /terminos /privacidad /aviso-legal)
built like the SEO pages, in the sitemap and llms.txt but out of the
marketing interlinking ring. The #legal SPA route becomes a hub linking to
them, so the text lives in exactly one place. Footer and the rights-
attestation checkbox now link to the real documents.

Drafted from a clause inventory of OpusClip/Klap/Vizard/Submagic legals
plus a 2026 Spanish/EU compliance review. Notable substance:
- LSSI art. 10 identity (TONVI TECH SL, Málaga) — was missing entirely.
- Rights warranty covers URL-instructed downloads explicitly and declares
  the attestation record (IP+UA+date) as evidence; DSA arts. 11-17
  notice-and-action with repeat-infringer policy.
- Explicit output ownership (clips are the user's; free-tier watermark as
  a written licence condition) and a no-AI-training commitment naming
  Gemini/ElevenLabs/Whisper — clauses none of the competitors have.
- EU withdrawal per CJEU C-234/25: SaaS is a digital service, the 14-day
  right survives with pro-rata payment (not the digital-content forfeit
  the old page used); renewals do not reopen it. 15-day renewal reminder
  duty (Ley 10/2025) stated.
- AI Act art. 50: dubbed clips declared as labelled/marked; users must
  not strip marks.
- Privacy: per-purpose legal bases, named processors, DPF+SCC transfers,
  real retention (7-day free clips, sub+7 days paid — matching
  cloud/config.py), AEPD analytics exemption documented, no cookie
  banner rationale.
- Spanish versions with prevalence clause (art. 60.1 TRLGDCU; AEPD has
  fined foreign-language-only policies). renderPage supports page.lang.
2026-08-19 22:06:11 +02:00
Tulio Vianna
83c45916a2 feat(editor): rebuild the clip editor around a source monitor and a working timeline
Turns the clip editor into a three-point editing surface: mark in/out on
the source, send the range to the clip, and scrub the result — with the
timeline honest about which parts of the edit the last render can already
show.

- Chrome: the source track ignored drags entirely. Without preventDefault
  the gesture became a text selection and then a native drag, which
  swallows every later pointer event and shows the not-allowed cursor.
- The source track's block is draggable (body moves, edges trim) and every
  gesture on it scrubs the source monitor, so a cut is chosen against the
  picture rather than against numbers.
- Three-point editing: mark in / mark out (i / o) off the monitor's
  playhead, then "replace #N" (.) or "insert after #N" (,). Dragging empty
  track marks a range instead of silently appending a segment.
- /edl ships the whole source transcript instead of a ±45s window: a cut
  can only be extended into words the editor was sent. The panel shows all
  of it, follows playback, and seeks the monitor on click.
- Layout: source monitor + its track + transcript | clip preview + its
  track | controls. Each track sits under the video it drives.
- The clip timeline works while edited. A cut that only removes material
  keeps nothing but frames the last render already produced, so it stays
  scrubbable and playable; only material the render never saw is marked
  red, and the playhead — now a solid handle — stops at its edge.

Transcript words render in memoised 50-word slices: repainting a couple of
thousand of them costs ~66ms, and timeupdate fires four times a second.
2026-08-19 15:23:30 -03:00
juancarlos.cavero
2b2e287a9b feat(hook): replace semantics — a new hook swaps the burned one, plus remove
The auto-hook was burned into the canonical clip in place, so editing the
hook stacked a second overlay on top of the first. Hooks now follow the
exact derivation pattern captions use:

- main.py: auto_hook_clip writes hooked_<ts>_<clean>.mp4 next to the clean
  canonical instead of mutating it; captions burn on top of the hooked file
  (subtitled_<ts>_hooked_<ts>_<clean>). Watermark moves BEFORE the hook so
  the branding lives in the canonical and survives hook replacement.
- app.py: _strip_burned_hook walks hooked_/legacy hook_ prefixes back like
  _strip_burned_captions; /api/hook strips captions AND the old hook before
  burning, so a new hook always REPLACES the previous one. New remove flag
  strips the hook entirely (captions re-applied, no metering). Burned hook
  recorded/cleared in clip metadata (auto_hook key) and returned as
  burned_hook. _canonical_clip_file resolves hooked_*/hook_* derivations.
- cloud/videos.py: archive the hooked_ intermediate of a captioned hook so
  restored projects keep the walk-back chain editable.
- ResultCard: stripBurns knows hooked_<ts>_ (the Remotion preview now
  composes over the truly clean clip — no more stacked preview), burned
  hook tracked in state, remove handler wired to the modal.
- HookModal: warning now says replace, plus a 'remove hook from clip'
  action when one is burned.
2026-08-19 16:01:53 +02:00
juancarlos.cavero
ac0138269d feat(hook): auto-burn AI hooks on generated clips + working emoji + editor polish
Auto-hook (opt-in per job, dashboard default ON):
- /api/process accepts auto_hook + auto_hook_style; absent means off, so
  API/MCP/webhook callers keep byte-identical output.
- main.py auto_hook_clip burns each clip's viral_hook_text (Gemini already
  produced it, it was only used to pre-fill the modal) into the canonical
  clip in place — after reframe, under watermark and captions — so every
  derived-name convention (subtitled_/recut_ walk-backs, R2 archive,
  restore) keeps working untouched. Fail-open like auto_caption_clip.
- Burned hook recorded as clip.auto_hook in metadata; the hook modal warns
  before stacking a second one.
- MediaInput: 'auto hook titles' toggle + style select in advanced options,
  persisted in localStorage.

Emoji that actually render:
- Gemini prompt now asks for 1-2 emojis in viral_hook_text.
- Dockerfile installs fonts-noto-color-emoji — without it prod silently
  stripped every emoji (no candidate font existed in the image).
- hooks.py supports fixed-bitmap color fonts (NotoColorEmoji only loads at
  its 109px strike; Apple Color Emoji at 160): glyphs render at native size
  and are Lanczos-rescaled to the text size instead of being treated as
  unavailable. macOS system font added for local dev.

Editor polish:
- HookModal persists last style/position/size/entrance (always reset to
  classic before, which read as the picker being broken).
- Remotion preview positions aligned to hooks.py (top 20%, bottom 70%).
- Warning when a bottom hook will overlap burned/preview captions.
- Entrance-animation control greyed out with a note when the clip
  re-renders on the server, where the hook is static.
2026-08-19 14:28:19 +02:00
juancarlos.cavero
8dbc6ce9bd fix(hook): Remotion overlay ignored the style picker, always rendered classic
d94e126 added the 6 hook styles to hooks.py (server FFmpeg path) and to the
HookModal picker, but never to the Remotion composition — which is what
renders both the modal preview and the final clip on the primary in-browser
render path. Picking dark/yellow/red/outline still produced the white
classic card.

- HookOverlay.tsx: HOOK_LOOKS map mirroring hooks.py HOOK_STYLES (box color,
  text color, outline stroke, shadow), applied via config.style.
- types.ts: HookStyle type on HookConfig and hookConfigSchema (default
  "classic" so older payloads keep validating).
2026-08-19 14:12:10 +02:00
juancarlos.cavero
0bfe27561d Merge PR #70 (manual per-scene reframing) onto current main
Conflicts were the parallel override parameters: render_clip /
process_video_to_vertical / reframe_v2.render / perform_recut now carry
BOTH force_strategy (whole-clip framing, main) and crop_overrides
(per-scene manual framing, PR #70). The v1-fallback safety net now also
raises for force_strategy, which had the same silent-revert hole the PR
fixed for crop_overrides.
2026-08-19 12:01:02 +02:00
juancarlos.cavero
3cff7e8cd6 fix(editor): explain why cuts are limited when the source is gone
Addresses the UX half of #67: with no retained source the editor clamps
cuts to the original clip range but never said why, reading as a bug. A
note in the segments panel now names the reason and that newly processed
videos keep their source.
2026-08-19 10:50:22 +02:00
juancarlos.cavero
3790c65851 fix(subtitles): honor user-edited caption text on the server render path
Fixes #69. The subtitle modal lets the user edit the caption text, but the
edits only traveled through the in-browser Remotion path; the FFmpeg path
(taken by every karaoke style and by any clip with server burns, i.e. all
clips with default captions) sent style params only, so the server
regenerated from the stored transcript and silently discarded the edits.

/api/subtitle now accepts an optional 'words' list (clip-relative ms, the
same shape the /transcript endpoint serves) and builds a synthetic
transcript from it, so both the SRT and karaoke ASS generators burn the
edited words verbatim. Words get Whisper's leading-space convention so the
block collector keeps their boundaries. The modal sends them only when the
text actually differs, and never on bulk apply-to-all (edits are per-clip).

Verified live: an edited 5-word line burned exactly as typed, correctly
grouped into blocks.
2026-08-19 10:50:22 +02:00
Tulio Vianna
b92012d824 feat: manual reframing, per scene
The reframe engine picks the crop automatically and is right most of the
time. When it is wrong it is badly wrong, and there was no way to say
"no, frame it here".

The unit is the SCENE, not the clip. A podcast cuts between a fixed close
camera and a fixed wide one, and the right crop differs per camera; scene
boundaries already are those camera changes. Scenes the user never touches
keep the automatic camera, so correcting one bad shot cannot spoil the
shots the tracker got right.

Backend:
- reframe_v2.apply_crop_overrides() replaces a scene's slice of the camera
  trajectory with a constant and forces it to TRACK, so a scene the
  classifier had sent to GENERAL comes back to a vertical crop. It runs
  after every automatic pass, including the ALTERNATE writes, so a manual
  choice always wins.
- A scene can also be split by hand: the override writes straight into
  `splits`, which means the user can stack a scene the detector never
  proposed, with no dependency on SPLIT_LAYOUT being enabled.
- GET /api/clip/{job}/{i}/scenes returns the scenes with a frame from the
  UNCROPPED cut plus a light preview with audio, and suggests a centre from
  the largest face in each shot.
- POST /api/clip/reframe re-renders with the clip's cut untouched. It is
  deliberately separate from /api/clip/rerender: a scene index only means
  something against a given cut, so letting framing ride along with a trim
  save would move every override onto the wrong shot.
- render_clip raises instead of falling back to the v1 engine when manual
  framing is present, since v1 ignores it and would silently return an
  automatically framed clip.

Frontend:
- ReframeEditor lists the scenes, each with the source frame, a draggable
  9:16 window, and a play button that plays that scene from the preview so
  the user can hear who is talking before choosing.
- Saved overrides are loaded when the editor reopens. Without that the next
  save would discard every earlier adjustment, because a re-render rebuilds
  from source using only what it receives.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 22:33:52 -03:00
juancarlos.cavero
9c220efddb feat(editor): manual framing override (auto / full frame / track subject)
The scene classifier only counts faces, so a screencast-style video with a
presenter in frame gets TRACK and the crop eats the slide (the SCREENCAST/
WIDE detectors sit behind the opt-in layouts=auto flag). The clip editor now
has a framing selector that pins every scene's layout: 'full' renders the
whole source frame (WIDE: no side-crop, blurred bands), 'track' forces the
subject-tracking crop, 'auto' returns to the classifier.

Plumbed as force_strategy through reframe_v2.render -> render_clip ->
perform_recut -> /api/clip/rerender (and the recut_clip MCP tool). A
non-auto choice always re-reframes from the retained source (409 without
it) and persists in the clip's recipe, so later plain trims inherit the
look instead of silently reverting; an explicit 'auto' resets it.

Verified live: framing=full on a TRACK-cropped clip re-rendered with the
full frame visible edge to edge (125s source path), and the editor reopens
with the persisted choice preselected.
2026-08-19 01:06:48 +02:00
juancarlos.cavero
100fa583a1 Merge feat/clip-editor: per-clip EDL editor + manual generation controls (PR #62, discussion #65) 2026-08-18 19:27:49 +02:00
juancarlos.cavero
b81125c572 feat(generate): manual clip count and duration controls (discussion #65)
/api/process (and the process_video MCP tool) now accept optional
target_clips (1-15) and clip_min_seconds / clip_max_seconds (5-180),
surfaced in the dashboard as a collapsed 'advanced options' section.
Blank means the AI decides, keeping the default request byte-identical.

Plumbed through the same env overrides the A/B harness already reads:
CLIP_TARGET_MIN/MAX (existing) and a new clip_duration_bounds() in
clip_selection.py backing CLIP_MIN_SECONDS/MAX_SECONDS. The detail and
visual prompts take the band as template placeholders instead of the
hardcoded 15-60, and word-snapping enforces the same bounds. All three
knobs are honest targets, not guarantees: the model still returns fewer
clips when the material doesn't hold them, and the UI copy says so.

Verified live: target_clips=2 + band 8-15s on the demo video returned
exactly 2 clips of 13.3s and 13.7s (the uncontrolled run gave one 41.7s
clip); out-of-range values 400 with a named reason.
2026-08-18 19:21:42 +02:00
juancarlos.cavero
d1bf36c666 fix(dashboard): recut duration display and stale durable URL
- A recut clip's start/end are the covering source range, so end - start
  showed a 20s two-segment clip as minutes long; duration now sums the
  recipe segments when present.
- Drop the clip's durable R2 URL after a rerender: archive_clip_edit
  deletes the superseded object, so the stale URL would 404 as the
  playback fallback.
2026-08-18 15:26:45 +02:00
juancarlos.cavero
40f530f9aa feat(landing): surface the CLI wherever the agent surface is described
Feature card, FAQ answer, crawler fallback, /mcp and the automation
page all name pip install openshorts alongside MCP and the REST API.
2026-08-05 15:04:39 +02:00
victorcavero14
b884131639 feat(editor): clip editor frontend — ClipEditor overlay wired into results
- ClipEditor.jsx: per-clip edit overlay driving the /edl + /rerender backend
- App.jsx: editingClip state, handleClipRerendered syncs results, reopened
  project state and per-clip edit state after a recut (burned layers reset)
- ResultCard.jsx: "edit clip" entry button (Scissors), layout tweak
- recut.py: write absolute paths in the concat list — the demuxer resolves
  relative entries against the list file's dir, not the process cwd

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 12:03:15 +02:00
juancarlos.cavero
9f3bedecde feat(seo): five demand-backed pages + honest agent-access comparison on /mcp
New static pages, each re-housing demand GSC already shows landing on the
homepage: no-watermark clip generator (the AI-answer gap: unwatermarked
free clipping only exists self-hosted), open-source AI video generator
(splits the text-to-video intent honestly), podcast-to-shorts (the SPLIT
layout as the capability no competitor page can show), YouTube-to-Shorts
converter (link import is free here, paid at Opus Clip), and an
automation recipe page (API + signed webhooks + n8n shape).

/mcp gains a checked comparison table: Opus Clip shipped MCP in July
2026, so the claim that survives is flat-minute billing and self-hosted
agent access with no meter, not MCP existence. All competitor claims
carry checked dates.
2026-08-04 17:58:25 +02:00
juancarlos.cavero
4c94c29964 feat(seo): close the internal-link gaps around the static cluster
The rendered React landing had zero links to the static SEO pages, so
Googlebot's rendered homepage dropped the whole cluster; the static
pages' nav and footer missed /mcp and the /alternatives hub; and the
crawler fallback missed both too. Every surface now links the full set
with descriptive anchors.
2026-08-04 14:19:28 +02:00
juancarlos.cavero
cc8fa54ffa feat(pricing): MCP + API access named where buyers compare plans
A bullet on every plan card, the always-on framing in 'included in
every plan', and a billing FAQ answering the question that actually
blocks a purchase: API calls draw from the same minutes, nothing extra
to buy, free plan included.
2026-08-04 00:24:50 +02:00
juancarlos.cavero
7eab5649a6 feat(landing): surface the agent API as a hosted-first benefit
The MCP server existed everywhere except the one page most visitors
see. Feature card + FAQ on the landing (mirrored in the SEO fallback,
which must stay in sync with Landing.jsx), and a new row in the README
edition table framing it honestly: both editions serve /mcp, but an
agent needs an endpoint that is always on, and only the hosted one is.
2026-08-04 00:02:16 +02:00
juancarlos.cavero
f10655fd1c feat(agents): the pipeline as a platform — API keys, MCP server, webhooks
Agents don't forget to come back; humans do. Make the whole pipeline
drivable without the dashboard:

- API keys (osk_...): sha256-stored tokens minted from the account page.
  get_current_user_optional resolves them like a session, so metering,
  entitlement, priority and job ownership apply to agents with zero
  endpoint changes. Key management refuses API-key auth (a leaked key
  cannot mint replacements).
- MCP server at /mcp: stateless Streamable-HTTP JSON-RPC, no SDK
  dependency. Six tools (process_video, get_job_status, list_clips,
  get_quota, add_subtitles, publish_clip) that call back into this same
  app in-process via ASGITransport with the caller's auth headers, so
  MCP can never drift from REST behavior. Cloud requires a key;
  self-host stays BYOK-open.
- Completion webhooks: webhook_url (+ optional HMAC webhook_secret) on
  /api/process, SSRF-checked at submit AND delivery, fired once after
  the R2 archive so payloads carry durable links, survives redeploys
  via the resume manifest.
- Dashboard: API keys card in the account page (create once-shown key,
  list, revoke).
- Tests pin BILLING_ENABLED=0 in conftest so the suite no longer
  depends on the developer's personal .env.
2026-08-03 22:33:16 +02:00
juancarlos.cavero
db3e7849af feat(billing): measure the click-to-Stripe gap, and sell the outcome
Between 25-jul and 1-ago the upgrade modals logged 35 checkout clicks and
Stripe recorded one new subscription. Nothing in between was measured:
TopUpModal fired only QuotaWallCheckout/UpsellModalCheckout, and
CheckoutStarted lived exclusively in PricingSection, so the funnel could
not tell "never reached Stripe" from "reached Stripe and abandoned".

Both surfaces now emit the same chain — CheckoutStarted (click) ->
CheckoutRedirected (we hold a Stripe URL) -> CheckoutFailed (we don't,
with the reason) — segmented by a `source` prop of wall | upsell |
pricing. The modal also writes the os_pending_checkout stash that
PricingSection already wrote, so a plan bought from a modal stops losing
its revenue attribution on the Subscribed goal.

The modal copy now leads with what the user gets (clips ready to post, a
library that stays) and states the free-plan limit second. Leading with
the watermark and the 7-day deletion framed the paid tier as "pay to undo
restrictions we added", which is the losing side of an argument against
our own MIT repo, whose headline is "no watermarks, no limits".

GPU rendering and the bundled Gemini key stay out of the modal on
purpose: they are the real reasons the cloud beats self-hosting, but the
free plan already gets both, so they belong on the pricing surface facing
repo visitors rather than in a modal shown to someone already using them.
2026-08-02 01:27:35 +02:00
juancarlos.cavero
4c04b37e4f feat(social): send TikTok uploads to drafts instead of publishing
Upload-Post's `post_mode` defaults to DIRECT_POST, so a clip went straight to
the user's TikTok feed. MEDIA_UPLOAD lands it in their drafts to finish in
TikTok's own editor instead.

Drafts are the right default for an automated pipeline: nothing reaches an
audience without the account owner seeing it, and covers, sounds and trending
hashtags are chosen inside TikTok anyway — the parts that decide whether a clip
travels are exactly the parts this cannot do from the outside.

Applied to both paths that can target TikTok (the clip publisher and the
SaaS-shorts publisher) through one constant, so they cannot drift apart.
TIKTOK_POST_MODE=DIRECT_POST restores publishing without a code change.

The UI now says so before the button is pressed, in both publishers, and leads
with the upside rather than the caveat. Without it the change reads as a bug:
someone expecting a live post, finding nothing on their profile, and concluding
the upload failed. The notice also tells them a TikTok notification is coming,
which the Upload-Post docs confirm for MEDIA_UPLOAD ("users will receive an
inbox notification"), so they know where to look.
2026-07-29 00:23:59 +02:00
juancarlos.cavero
9b01e02a9b feat(attribution): record where each new account came from
Every strategic read on the funnel so far has been inference: 94% of search
clicks are brand queries, so the real acquisition channel is upstream of
Google, but `users` stores no source at all and we cannot tell GitHub from
YouTube from a directory listing, nor say which channel produced the few
accounts that pay.

Capture `document.referrer` + UTM on the first page load, keep it in
localStorage (our own auth redirects destroy the referrer), and post it once
the account exists. First touch wins, so arriving from GitHub and later
returning via a search still attributes to GitHub.

- New `signup_attribution` table rather than columns on `users`: the schema
  bootstrap is create_all, which adds missing tables but never ALTERs an
  existing one, so this lands on deploy with no migration.
- Only recorded for accounts minutes old, so the 1196 existing users cannot
  be mislabelled with their next login.
- ON CONFLICT DO NOTHING for two tabs finishing the same redirect; the client
  call is fire-and-forget and can never fail a sign-in.
2026-07-27 10:39:24 +02:00
juancarlos.cavero
be1093bd4c feat(pricing): sell the GPU, the keys and the setup instead of the software
The pricing page asked people to pay for things our own MIT repo already
gives away for free (no watermark, no limits), and then closed with a
"Self-host free" button competing with the checkout right below the plans.
Nothing named the two costs self-hosting actually has: our GPU and the
managed API keys.

- Name the real hosted value on every plan card, free included, since free
  runs on the same GPU with the same bundled key: ~50s per 8-min video vs
  5-8 min on CPU. Add the missing no-watermark bullet to the paid tiers.
- Turn the landing's "Two ways to use OpenShorts" cards into a real
  side-by-side: GPU vs your CPU, our key vs your keys, we maintain it vs
  you maintain it.
- Add a detailed hosted vs self-hosted table to the standalone #/pricing,
  which had no equivalent. It lives there rather than in PricingSection so
  it does not duplicate the landing block sitting right above it.
- Realign both copies of the billing FAQ and the open-source trust card.

Retention is 1.7% and identical whether clips succeed or fail, so the plans
have to earn their price on running costs, not on features we open source.
2026-07-27 10:21:58 +02:00
juancarlos.cavero
ef7f856469 fix(pricing): name the actual platforms in the auto-posting line
"TikTok, Reels & Shorts" mixes a platform with two format names, so the two
destinations a reader is most likely to be checking for — Instagram and
YouTube — never appear. Spell all three out.
2026-07-26 23:22:23 +02:00
victormanuel.caverogracia
28a1f6aef2 Remove Plausible analytics (migrated to OpenPanel) 2026-07-26 20:39:28 +02:00
juancarlos.cavero
fd7a2b2cd9 feat(subtitles): let users remove the default captions
Clips now ship captioned, and the modal could only restyle — there was no way
back to a clean clip, so anyone who didn't want captions was stuck with them.

Adds POST /api/subtitle/remove, which points the clip at its un-captioned
original. No re-encode and no quota: the pipeline already keeps the clean file
next to the derived subtitled_<ts>_ one, so removing is choosing the other file.
It reuses the burn path's walk-back, so it undoes any number of restyles, and
running it twice is a no-op.

Verified end to end: auto-caption, restyle (burning from the clean file rather
than stacking a second layer), remove, and remove again.
2026-07-25 17:48:08 +02:00
juancarlos.cavero
5b5d3d2306 fix(billing): stop stranding customers whose payment failed
A declined card left the account in a state with no way out. `past_due` grants
no minutes, so the metering layer resolved the user to the free plan — which
meant /api/me reported status=null, the account page swapped "Manage billing"
for "Upgrade" (hiding the only button that fixes a card), and the checkout guard
then rejected the upgrade with a 409 that every call site swallowed into a
generic "Could not start checkout." Silently free, unwarned, unable to pay.

Found on 25-jul-2026 in prod: 14 subscriptions in this state, all first charges
that failed when the (now retired) 3-day trial ended. The trial is gone, but the
trap is not — a renewal failure or an abandoned 3DS payment reproduces it.

- metering: split `_subscription_row` (raw) from `_active_subscription`
  (entitling), and expose both on the balance. Entitlement logic is unchanged.
- /api/me: report status/interval from a row needing attention when no
  subscription entitles, plus `has_billing_account` to route the portal button.
- checkout: drop `incomplete` from the blocking states. Stripe collects nothing
  on it and expires it within 24h, so blocking only stopped the user's retry.
  Give past_due/unpaid a message that names the problem and the fix.
- account page: explain the failed payment inline with a link to the portal
  instead of showing a bare "past_due" chip, and keep the portal reachable for
  any Stripe relationship, live or broken.
- api client: throw a typed ApiError carrying the server's detail so callers
  stop replacing real, actionable messages with generic copy.

Verified against a real DB: past_due stays blocked but visible and fixable,
incomplete can retry, canceled is silent and can subscribe again.
2026-07-25 15:14:15 +02:00
juancarlos.cavero
c88239921e feat(conversion): vender también en los momentos buenos, no solo en el muro
Hasta ahora el único camino al upgrade era fallar contra la cuota. Tres
momentos nuevos, todos con el mismo mensaje ya validado (watermark +
caducidad 7d + minutos):

- Resultados (pico de satisfacción): banner para usuarios free junto a
  sus clips recién generados — "Like these clips? Keep them forever →" —
  que abre la modal de upgrade en modo 'upsell' (copy adaptado: aún
  tienen minutos, se vende permanencia y limpieza, no "te quedaste sin").
- Medidor del header: para free abre la modal de upgrade en vez de ir a
  account — antes no existía ningún camino visible a los planes desde el
  dashboard sin fallar primero.
- Email "tus clips se borran mañana": warn_free_expiring() en el sweeper
  avisa el día 6 de los 7 de retención free, con descarga o upgrade como
  salidas. Aversión a la pérdida honesta: la fecha es real y hoy se
  borraba en silencio, lo que no convertía a nadie. Dedupe en memoria
  (peor caso tras restart: un duplicado).

Eventos UpsellModalSeen/UpsellModalCheckout separados de los del muro
para medir cada momento por su lado.

Verificado: lógica del aviso probada contra la DB local (clip de 6.5d
avisa, el de 8d ya purgeable no, segundo pase no duplica); 141 tests y
build del dashboard en verde.
2026-07-25 02:27:34 +02:00
juancarlos.cavero
95a9a5ff1e feat(conversion): vender el plan (no top-ups) en el momento del muro de cuota
De 76 impactos del muro 402 en 72h solo 4 llegaron a checkout y la única
compra fue un top-up: la modal antigua ofrecía packs de minutos sueltos
como opción principal, el upgrade a plan era un párrafo NO clickable y
un StarBanner empujaba a GitHub en pleno momento de compra.

Nueva modal (mismo fichero/props, cero cambios en App.jsx):
- Starter destacado + Creator al lado como ancla de precio; bullets del
  valor real de pagar: 5x/15x minutos, sin watermark, clips permanentes
  (los free caducan a 7 dias) y prioridad de cola sobre free — todo
  cierto, sin escasez inventada ni cuentas atras falsas.
- Copy goal-gradient con los datos del 402: "this video needs X min and
  you have Y left — upgrade and it starts processing right away".
- "cancel anytime" como reversion de riesgo; top-ups relegados a un link
  discreto que expande; StarBanner fuera.
- Eventos QuotaWallSeen / QuotaWallCheckout para medir la conversion del
  muro, que hasta ahora era invisible.

El email de sin-minutos replica el mismo mensaje (perdida + plan concreto
+ CTA unico) y por fin deja rastro en logs al enviarse.

Verificado end-to-end en local: usuario free con cuota agotada via DB,
402 real de /api/process, modal con datos reales y packs expandibles.
2026-07-25 02:14:58 +02:00
juancarlos.cavero
26135fb485 feat(abuse): abrir free a email normal + bloquear dominios desechables
El free ya no exige Google: cualquier cuenta Google o de email permanente
entra. Para que no sea un grifo de minutos gratis:
- Bloqueo de dominios desechables/temp-mail en el registro por email
  (cloud/disposable_domains.txt, 155 dominios: los clásicos temp-mail + los
  vistos en nuestra propia DB). Refrescable desde el proyecto upstream.
- Normalización de alias: gmail dots/+tags y +tags de otros proveedores se
  colapsan a una sola cuenta canónica, para que foo+1@ / f.oo@ no minten
  cuentas infinitas. Aplicado en magic-link y en Google OAuth.
- free_plan_eligible: Google siempre; email solo si el dominio no es
  desechable (defensa en profundidad además del bloqueo en registro).
- Popup de bienvenida ahora sale una vez por navegador en el primer registro
  (Google o email), no solo a los no-entitled; el botón free arranca directo
  sin forzar Google.

Verificado: registro con mailinator/luckfeed -> 400; gmail -> 200. 115 tests
(9 nuevos de email_policy).
2026-07-21 00:45:54 +02:00
juancarlos.cavero
fe0f32e86b feat(onboarding): popup de selección de plan + quitar tope diario free y 'free trial'
- Quitado el tope de 3 jobs/día por cuenta y 5 por IP en el plan free: la
  cuota de 20 min/mes es el único límite (el ledger ya capa el coste real y el
  tope diario confundía). Verificado que un free NO puede pasar de 20 min ni
  con reservas concurrentes: 10 reservas simultáneas de 5min -> solo 4
  concedidas, ledger clavado en 20, el lock por usuario serializa.
- Registro por email ya no tira a la página de pricing (rayaba): aterriza en
  la app y sale un popup PlanChoiceModal para elegir plan — free (via Google,
  por el gate anti-abuso) o los de pago inline con su precio.
- Eliminado 'start free trial' / '3 days free' de la cabecera y de settings;
  ahora dicen 'choose a plan'.
- vite.config: target del proxy configurable con VITE_PROXY_TARGET para dev
  en el host contra localhost:8000 sin CORS.

Probado en dev local: el popup aparece al aterrizar sin plan y desde el botón
'choose a plan', con free + starter/creator/pro.
2026-07-21 00:30:56 +02:00
juancarlos.cavero
bc71cb57a3 feat(disk): topes de tamaño para output/ y uploads/ + quitar el badge de trial
Con volumen persistente el barrido por antigüedad (1h) acota la edad de lo
guardado pero no su tamaño: una tanda de vídeos largos puede llenar el disco
dentro de la misma ventana. Se añaden topes duros (OUTPUT_MAX_GB=25,
UPLOADS_MAX_GB=15) que borran lo más antiguo hasta bajar del límite; los clips
están archivados en R2 y se rehidratan solos, así que solo cuesta una descarga.

Además el barrido saltaba a borrar output/thumbnails, que respalda un mount de
StaticFiles: borrarlo dejaba /thumbnails devolviendo 500 hasta el siguiente
arranque.

Y fuera el badge '3-Day Trial' de la landing, que ya no aplica.
2026-07-20 22:09:26 +02:00
juancarlos.cavero
d2fd9d3d1b fix(landing): jerarquía del hero — badge visible de 'no credit card' y la subida como enlace secundario
Dos píldoras grandes seguidas competían entre sí, y el argumento que
desactiva la objeción principal (no hace falta tarjeta) iba escondido en
un párrafo gris. Ahora el CTA manda, debajo va la badge verde y 'or upload
a video' baja a enlace.
2026-07-20 21:32:40 +02:00
juancarlos.cavero
6cb8551aa4 fix(landing): 'paste a video link' — el ingest no es solo youtube 2026-07-20 21:29:54 +02:00
juancarlos.cavero
e0b43dee83 feat(landing): input de URL en el hero — la landing arranca el producto, no la página de precios
El CTA del hero mandaba a #pricing: pedía plantearse pagar antes de ver
nada, justo el muro que el plan free venía a quitar (7.7% de los registros
pasaban). Ahora el hero acepta un enlace, lo guarda y abre la app con la
URL ya cargada en MediaInput; el login se pide al generar, no antes.
No se auto-envía: la casilla de derechos sobre el vídeo la marca el usuario.
2026-07-20 19:14:17 +02:00
juancarlos.cavero
70260108cc feat(free): watermark lockup arriba-izquierda + modal de upgrade + star-ask durante el render
- La marca pasa de texto abajo-centrado a un lockup blanco (símbolo +
  OpenShorts) superpuesto arriba a la izquierda: el borde inferior es lo
  que se recorta al repostear, así que ahí la marca se quitaba gratis.
  PNG pre-renderizado en assets/ para no depender de fuentes del contenedor.
- WatermarkModal: aviso único al descargar en plan free (descargar igual /
  upgrade / no volver a mostrar), al estilo del de OpusClip.
- StarBanner también durante la generación, que es donde el usuario tiene
  minutos muertos esperando.
2026-07-20 18:58:00 +02:00
juancarlos.cavero
a42297f120 Merge origin/main: analytics + billing cross-sub guard
Conflicto resuelto en AuthContext (se mantienen el track('Signup') y el
enrutado del plan free). Además, fix de la interacción entre ambos cambios:
AccountPage daba el checkout por activado en cuanto /api/me devolvía un
plan, pero 'free' ahora existe desde el primer instante — se exige un plan
de pago antes de parar el polling, disparar el goal Subscribed y llevar al
usuario a conectar sus redes.
2026-07-20 15:22:52 +02:00
juancarlos.cavero
9fd1cacb0c feat(billing): free plan (20 min/mes sin tarjeta) + retirar trial + opt-in galería UGC
- Plan free resuelto en metering (sin fila Stripe): 20 min/mes para cuentas
  Google, período sintético de mes natural con reset automático
- TRIAL_DAYS=0 para nuevos checkouts; trials en curso grandfathered
- Watermark drawtext en clips free (pasada única post-render, sobrevive
  subtítulos/hooks); thumbnails IA solo de pago
- Anti-abuso: 3 jobs/día por cuenta, 5 por IP, rate-limit de probes,
  contador mensual de GB de proxy con alerta Telegram a 100 GB
- Clips free caducan a 7 días (purge_free_expired); purge_expired respeta
  a cancelados que ahora son free
- Galería UGC pública pasa a opt-in (share_to_gallery, antes publicaba
  producto+guion de todos los usuarios sin permiso)
- Emails: clips listos (con star-ask) y sin-minutos (cooldown 24h)
- Frontend: card Free en pricing, copy sin trial (landing/legal/gates),
  StarBanner en resultados y TopUpModal, upsell de watermark
2026-07-20 00:26:21 +02:00
victormanuel.caverogracia
99e113130d analytics: track funnel goals (Signup, CheckoutStarted, Subscribed) via Plausible
Add a small no-op-safe track() helper and emit three custom events so we can
see where users drop off between landing and paid: Signup on auth callback,
CheckoutStarted before the Stripe redirect, Subscribed on plan activation.

Plausible here is Community Edition (no revenue goals), so the plan price rides
along as a plain value_usd prop instead of a revenue field. Self-hosted builds
without the analytics script are unaffected (track() no-ops).
2026-07-19 14:18:11 +02:00
juancarlos.cavero
8d41112617 feat(ui): gate publishing when no social accounts are linked; guide user to connect flow 2026-07-18 23:24:20 +02:00
juancarlos.cavero
1e40f9aa6e fix(ui): stack icon over label on clip action buttons so they never collide 2026-07-18 23:15:32 +02:00
juancarlos.cavero
1b82315615 fix(ui): keep clip action button labels on one line and square up the post button 2026-07-18 14:49:31 +02:00
juancarlos.cavero
f65a35762e feat(ui): compact one-line description rows with full-text modal on clip cards 2026-07-18 14:45:48 +02:00
juancarlos.cavero
f57cb7a29a fix(ui): let clip cards grow to content (min-h) and cap description area so footer never clips 2026-07-18 14:37:07 +02:00
juancarlos.cavero
d7a1c35154 fix(ui): fixed-height clip cards with true 9:16 video column; stop hover-expanding descriptions 2026-07-18 14:33:37 +02:00
juancarlos.cavero
928b4a3ddc fix(ui): hide model name in HUD badge; show clips at true aspect with resolution chip 2026-07-18 13:56:20 +02:00
juancarlos.cavero
927ee09ffc feat(projects): reopen archived projects from history for further editing
- New projects table (job_id, metadata_r2_key, state JSONB) — created via create_all
- archive_job also uploads the metadata JSON (transcript) and upserts the
  Project row + user_videos (no more duplicate rows on re-archive)
- archive_clip_edit re-archives a clip after each server-side edit, keeping
  only the pristine original + current version per clip in R2
- fix /api/edit: persist new video_url in job result + metadata.json (the
  other edit endpoints already did)
- POST /api/projects/{job_id}/restore re-hydrates R2 files into output/{job_id}
  (per-job lock, temp-dir download, .owner sidecar, idempotent fast path)
- GET /api/projects + PUT /api/projects/{job_id}/state (debounced Remotion
  layer sync from the frontend)
- History tab groups clips by project with a reopen button; App restores
  jobId/results/project state; ResultCard seeds serverVideoFile/activeLayers
  from the restored state and reports changes upward
2026-07-18 03:42:17 +02:00
juancarlos.cavero
8160fc6465 feat(cloud): user-friendly job logs + transcription progress; hide auto profile id in header
- log_view.py: whitelist-based cloud log view — transcription percentage,
  clip counters, errors; no file paths, model names or pipeline internals.
  Self-host (BILLING off) and DEBUG_LOGS keep the full raw output.
- transcribe_backends: emit '🎙️ Transcribing… NN% (Xs)' at 25% steps from
  both parakeet and whisper paths.
- dashboard: profile selector shows connected networks instead of the
  auto-generated os_<hash> id.
2026-07-18 02:20:31 +02:00
juancarlos.cavero
afe320ca04 ui: aspect-ratio glyph + use hint under each output-format option
Each format button now shows a little rectangle in its real proportion
(tall 9:16, square 1:1, wide 16:9) plus what it's for, so the choice reads
at a glance instead of needing a hover tooltip.
2026-07-17 22:41:55 +02:00
juancarlos.cavero
861134f8fe feat: quality gate, output-format selection, whisper small (PR #50)
- Quality gate: quality_probe.py probes the offered YouTube resolution before
  starting; /api/process returns needs_confirmation below QUALITY_GATE_MIN_HEIGHT
  (720p) and the UI shows a 'process anyway' modal that resends with
  force_low_quality. Fail-open on any probe error. URL sources only.
- Output format: MediaInput picks 9:16 / 1:1 / 16:9; threaded through
  /api/process -> main.py --format. render_clip() routes vertical/square to the
  reframe (aspect_ratio param) and horizontal to a passthrough (keep landscape).
- Whisper: main pipeline defaults to 'small' (better non-English) with
  vad_filter + no cross-segment conditioning; env-overridable.
2026-07-17 22:21:46 +02:00
juancarlos.cavero
9693543f2d fix(ui): fall back to backend source preview on recovery when media is missing
The save-side fix only helps sessions saved after it; already-recovered
sessions (and any older ones) had processingMedia=null and stayed null. On
recovery, when no media is stored, point the preview at /api/source/{jobId}
so existing upload sessions get their original-video preview back too.
2026-07-17 22:01:10 +02:00
juancarlos.cavero
97378ab102 feat: restore original-video preview for uploads after reload
The live-analysis preview above the logs used a blob URL for uploaded
sources, which dies on page reload — so a recovered upload session showed an
empty preview (YouTube-URL jobs were fine, their URL persists).

- GET /api/source/{job_id} streams the job's original upload (FileResponse,
  unauthenticated like /videos, UUID job_id is the capability).
- ProcessingAnimation: new 'server' media type -> <video src> from the backend.
- Session save persists uploads as { type:'server', payload:/api/source/id }
  instead of null, so the recovered preview plays the real source.
2026-07-17 21:57:37 +02:00
juancarlos.cavero
80a3e2fda7 fix(ui): pristine preview base + sync cards after bulk subtitles
Two bugs, one root cause: the Remotion preview base was derived from
clip.video_url, which mutates to subtitled_/hook_ files after server burns.

- originalVideoUrl now strips subtitled_<ts>_/hook_ prefixes back to the
  pristine clip, so the preview composites new subtitles over the clean clip
  instead of stacking them on an already-subtitled file (the 'subtitles on
  top for a few seconds' double-render when opening another clip's modal).
- currentVideoUrl inits to the actual current file (not pristine), and a new
  effect adopts clip.video_url when an external refresh (bulk apply from
  another card) changes it — so every card shows its freshly subtitled video
  instead of a stale/blank one.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
7162667bbf fix(ui): keep subtitle preview playable for karaoke presets
Selecting a karaoke preset swapped the playable RemotionPreview for a static
CSS mock, so the preview video couldn't be played/scrubbed. Instead, teach
the Remotion Subtitles component to render dim (baseOpacity, opaque scaled
color like the backend) and uppercase, and pass those from the modal — so
the preview stays a live, playable Player that also reflects the karaoke
look. Drops the static mock.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
f683dc66df refactor(ui): move 'apply to all' into the subtitle modal itself
Instead of a separate header button + bulk modal, the per-clip subtitle
editor now has a second action: 'apply this style to all N clips'. Same
bulk loop, but you pick and preview the look on the clip you opened, then
one click applies it everywhere (progress shown inline). Header keeps only
'download all' + 'schedule week'.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
82dcd0af89 feat: bulk subtitles + download-all-as-ZIP (PR #50 block 2)
- app.py: GET /api/jobs/{job_id}/download-all bundles every clip's current
  file into one ZIP (stored, not deflated — already compressed), streamed
  via FileResponse and cleaned up after send; owner-guarded in cloud mode.
- App.jsx: 'subtitle all' opens the SubtitleModal in bulk mode and applies
  the chosen style to every clip sequentially (progress in the button),
  then refreshes results so each card shows its subtitled file. 'download
  all' fetches the ZIP and triggers a browser download.
- SubtitleModal: bulkCount prop -> 'apply to N clips' label.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
d94e126e0f feat(hook): 6 hook styles (classic/dark/yellow/red/outline/outline+)
Previously a single look (white card, black serif). Add a style parameter
end to end:
- hooks.py: HOOK_STYLES table drives box fill / text color / optional text
  outline; box-less 'outline' styles (caption/MrBeast look) use a stroke.
- HookOverlay.tsx: same looks mirrored so the Remotion preview and the
  browser burn match the server FFmpeg output.
- HookModal: visual style picker; ResultCard + /api/hook thread style through.

Note on t=0: the server FFmpeg burn shows the hook immediately (enable
between t,0,dur); the Remotion preview fades it in per the entrance
animation, so at exactly 0:00 the preview is mid-fade (pick 'None' for an
instant-on preview).
2026-07-17 21:26:04 +02:00
juancarlos.cavero
8e8c6afaae fix(ui): edit chaining — server-burned subtitles/hooks survive later edits
The browser (Remotion) render paths compose layers over the ORIGINAL clip,
so running Auto Edit (or a hook / classic subs) after a server-side karaoke
burn silently produced a video without the subtitles.

- Track serverVideoFile: the latest file that exists on the server; all
  server operations chain from it (blob: preview URLs never leak into
  input_filename anymore).
- When the server file has burned-in content (subtitled_/hook_), skip the
  browser-render paths and chain through the server FFmpeg endpoints, which
  preserve the file and enable caption-safe Auto-Edit.
- After a karaoke burn, re-compose any remaining browser layers (hook/
  effects) over the new server file instead of dropping them.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
eb7504f00a fix(ui): live karaoke preview (dim/uppercase/effects) + no local Gemini key required for managed users
- SubtitleModal: karaoke styles burn server-side, so the Remotion preview
  never reflected dim/uppercase/effect controls. Show a CSS mock that
  mirrors the burned ASS look (opaque scaled dim color, uppercase, glow/
  pop/box on the active word) using the clip's own first words.
- ResultCard: auto-edit demanded a local Gemini key even for managed
  (paid) users whose key resolves server-side; only BYOK needs one now.
2026-07-17 21:26:04 +02:00
juancarlos.cavero
40151e1708 feat: karaoke subtitles, deterministic Auto-Edit v2, emoji hooks, retries (PR #50 block 1)
Ported from PR #50 (Themegaindex) onto current main, adapted to the
billing-mode app.py and the Lumen dashboard:

- subtitles.py: karaoke ASS generation (word-level highlight, glow/pop/box
  effects, dim/uppercase), whisper continuation-word merging, env-configurable
  whisper model, ASS/font input sanitization, faststart
- editor.py + edit_builder.py: Auto-Edit v2 — Gemini returns a structured
  edit-decision list and the FFmpeg filter is built deterministically with
  hard caps (no raw filter strings from the LLM), 2s dry-run + one
  self-repair round, caption-safe mode blocks zooms on subtitled clips
- app.py: /api/subtitle karaoke fields + re-subtitle prefix walk-back
  (fixes double subtitles), has_captions passed to Auto-Edit
- hooks.py: emoji rendering (color-emoji font with strip fallback),
  char-level hard wrap, unique temp PNGs, ffmpeg timeouts; keeps the
  duration/enable overlay from b1113d7
- translate.py: exponential-backoff retries for transient ElevenLabs errors
- dashboard: 11 caption presets in SubtitleModal; karaoke burns server-side
- tests/: 50 pytest tests; .github/workflows/ci.yml runs them + fe build

Encode settings kept at CRF 18 (medium for post-process steps) per f791a74.

Co-authored-by: Themegaindex <themegaindex@users.noreply.github.com>
2026-07-17 21:26:04 +02:00
juancarlos.cavero
b1113d7a3f fix: Gemini retry with backoff, hook overlay duration, configurable job retention
- Retry transient Gemini errors (503/429/500) up to 3x with exponential
  backoff before falling back to whole-video conversion (#27)
- Thread the hook Duration slider through /api/hook down to the FFmpeg
  overlay enable filter so hooks can end after N seconds (#2)
- Read JOB_RETENTION_SECONDS from env so self-hosters can keep finished
  jobs longer than the 1h default (#46)
2026-07-17 16:47:38 +02:00
juancarlos.cavero
3bc51e1f7c ui: remove 9:16 crop-window overlay from pricing demo 2026-07-17 12:43:25 +02:00
juancarlos.cavero
e50db9f607 seo: keyword-rich h1, clipping/clipper terms, FAQ schema sync + remove crop overlay
- H1 restores 'free open source ai clip generator' keeping the redesign tagline
- Hero subline recovers the AI UGC keyword and adds 'online'
- Add clipping/clipper mentions (top non-brand GSC queries with zero on-page presence)
- FAQ schema: dual pricing answer synced with visible FAQ, dateModified bumped
- Remove orange crop-window overlay from the Smart Crop demo
2026-07-17 12:25:14 +02:00
victormanuel.caverogracia
7ea3ad5308 seo: keyword phrase back in hero subline
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 10:14:24 +02:00
victormanuel.caverogracia
aa676a7814 redesign: Lumen design system across landing, app and paywall
Full visual rework to a single locked design system (design.md, Lumen
Night Foundry): dark violet canvas, molten-brass accent, Instrument
Serif + Geist + JetBrains Mono, hairline cards, zero gradients and
zero glassmorphism.

- Landing: marquee hero with real vertical demo clip in an instrument
  bezel, meter strip, smart-crop before/after section, cloud-first
  copy (start free trial primary, self-host demoted to secondary),
  text density cut, SEO surfaces preserved (single h1, ids, FAQs,
  comparison table intact)
- App: workbench restyle — sidebar with mono ordinals, unified header,
  settings/ai-agent/dashboard views on shared tokens; per-feature
  gradient identities retired
- Shared UI: new Modal, SegmentedControl and StepIndicator replace 8+
  duplicated modal shells and 2 wizard steppers
- New pricing paywall page (#/pricing): demo proof strip, honest trust
  signals, billing FAQ
- Routing: app logo links back to landing via #landing without
  resetting the skip-landing preference
- Responsive: audited and fixed at 320/375/414/768px (no horizontal
  scroll, tables scroll in-container, single-line CTAs)
- ScheduleWeekModal translated to English; ProcessingAnimation comment
  noise removed

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 02:41:22 +02:00
victormanuel.caverogracia
54bb701b83 fix(social): stop 'Error fetching User Profiles' alert loop
fetchUserProfiles used a raw fetch without the bearer token, so managed
users always got a 400 from /api/social/user, and the mount effect fired
an alert() on every page load. Use apiFetch (auth attached), let managed
users fetch without a local key, and make the background auto-fetch
silent — only the manual Settings button alerts now.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 00:24:16 +02:00
victormanuel.caverogracia
0311b6143d fix(social): let managed users post without BYOK Upload-Post key
The Post modal and Schedule Week modal gated on the localStorage
uploadPostKey, so managed (plan/trial) users saw 'Configure API Keys'
even though the backend already posts with the server-side managed key.
Gate on isManaged || BYOK keys instead.

Fixes #3559

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 00:10:47 +02:00
juancarlos.cavero
687412a860 fix(cloud): preview falls back to durable R2 url when local clip is gone
After a reload the ephemeral /videos/ files may be cleaned up (1h retention),
leaving black previews on the results screen. For managed users, fetch the job's
clips from /api/history (now includes clip_index) and fall back to the durable R2
url on video error (with a retry for the load race).
2026-07-16 19:44:26 +02:00
juancarlos.cavero
3f6ee50b86 feat(cloud): hide Gemini token cost from managed users on the results screen 2026-07-16 19:39:43 +02:00
juancarlos.cavero
0373c8571b feat(social): keep scheduling calendar + add Content calendar button in dashboard
- revert showCalendar to true (calendar stays available in the white-label page)
- add a 'Content calendar' button (opens the Upload-Post page in a new tab) so users
  can consult/manage scheduled posts from the dashboard
2026-07-16 19:26:51 +02:00
juancarlos.cavero
8ce4d3c5d9 feat(social): auto-connect socials after paying, same-tab redirect, hide calendar
- social connect JWT: showCalendar=false (hide scheduling calendar in white-label page)
- connect opens in the same tab so the page's redirectUrl returns the user to the app
- after the first plan activation (checkout success), take the user straight to the
  social-connect flow; guarded so top-up checkouts don't re-trigger it
2026-07-16 19:24:49 +02:00
juancarlos.cavero
a122c90c89 feat(ui): make file upload the primary input, video URL secondary 2026-07-16 18:41:24 +02:00
juancarlos.cavero
41f43dc0dc docs(legal): remove infra hints from Terms (proxy, vendor names, ingestion) 2026-07-16 18:31:55 +02:00
juancarlos.cavero
0f8e19f119 feat(ui): support email, in-app pricing link, landing pricing section
- App sidebar: Support card (mailto:info@openshorts.app) + "Plans & Pricing" link (billing-gated)
- Landing: embedded 3-tier pricing section (live from Stripe), Pricing nav link,
  hosted card mentions the saved video library — all gated on billingEnabled so
  self-host shows nothing broken
2026-07-16 17:43:28 +02:00
juancarlos.cavero
6ec6935532 fix(cloud): harden paid-mode surface + source-available license for cloud/
Security fixes on the hosted/paid surface (all no-op in self-host / BYOK):
- upload path traversal: basename() client filenames in /api/process,
  /api/thumbnail/upload, /api/thumbnail/analyze fallback, /api/thumbnail/generate
  (face/bg + session_id) so "../" can't escape UPLOAD_DIR
- SSRF: saasshorts subpage scraper now follow_redirects=False + assert_public_url
  per hop (was open to 302 -> 169.254.169.254 metadata)
- metering: reserve+commit/release on /api/render, /api/subtitle, /api/hook and a
  fixed guard cost on /api/thumbnail/upload transcription (were entitlement-gated
  but unmetered -> unlimited off-quota compute)
- entitlement: SaaSShorts generate/actor-options/actor-upload now require a plan
  in cloud; /api/edit ignores body api_key in cloud (no gate/meter bypass)
- multi-tenant IDOR: stamp user_id on thumbnail_sessions/saas_jobs and reject
  non-owners (404) across status/mutation/publish/post endpoints
- DoS: bounded/streamed reads on actor-upload and thumbnail uploads
- retry_job_id routed through _safe_under

Frontend: raw fetch -> apiFetch on the now-gated/owner-checked endpoints so the
bearer token attaches.

License: cloud/ is now source-available under the OpenShorts Commercial License
(self-host/personal use allowed; no competing hosted service). Core stays MIT.
2026-07-16 17:30:12 +02:00
juancarlos.cavero
c0ad5e0de8 feat(billing): 20-min trial cap + activate-plan-now upgrade flow
- config: TRIAL_MINUTE_CAP=20 — trial allowance capped across all plans
- metering: apply the cap in _balance while status=trialing (full minutes once active)
- billing: POST /api/billing/end-trial ends the Stripe trial immediately (charge now,
  unlock full minutes); webhook flips status→active
- frontend: hitting the cap while trialing opens TrialUpgradeModal (activate plan now)
  instead of the top-up modal; polls /api/me until active
- Legal: disclose the 20-minute trial allowance
2026-07-16 02:13:55 +02:00
juancarlos.cavero
d298f69f12 feat(cloud): bake bgutil 720p into image, profile menu, video-URL info, trial→pricing
- Dockerfile: bake bgutil PO-token provider in script mode (no sidecar); 720p verified
- main.py / cloud/metering.py: support BGUTIL_SCRIPT_PATH (script mode) alongside HTTP
- docker-compose.cloud.yml: drop bgutil sidecar; .env.cloud.example documents script mode
- docker-compose.e2e.local.yml: local FRONTEND_URL/ALLOWED_ORIGINS/VITE_API_URL for testing
- AuthContext: new/non-entitled sign-ins land on pricing to start the trial
- ProfileMenu: header account dropdown (email, account & billing, sign out)
- MediaInput: "YouTube URL" → "Video URL" + supported-platforms info popover
2026-07-16 02:07:53 +02:00
juancarlos.cavero
1901b06f3a docs(legal): rewrite Terms & Privacy for the paid hosted service
Covers accounts/sign-in, the 3-day trial + auto-renewal disclosure, plans &
billing via Stripe, cancellation/refunds (incl. EU immediate-performance
waiver), what we store and for how long (video library kept while subscribed +
7 days), the subprocessor list (Stripe, Cloudflare R2, Google, Upload-Post,
proxy, email), account/data deletion, and self-host carve-out.
2026-07-15 15:19:13 +02:00
juancarlos.cavero
0ba4fac47b feat: durable video library on Cloudflare R2 (history + retention)
- cloud/storage.py: R2 (S3-compatible) client — upload, presigned view/download
  URLs, delete-by-prefix.
- cloud/videos.py: archive a completed managed job's clips to R2 under
  users/<uid>/<job>/, GET /api/history (private signed links), and a retention
  sweeper that deletes a user's videos 7 days after their subscription ends.
- models.py: user_videos table (created via create_all).
- app.py: archive clips to R2 on managed-job completion.
- billing.py: email the admin the moment a subscriber hits cancel.
- Frontend: History tab (library grid with per-video view + download).

R2 bucket 'openshorts-videos' + scoped API token created; end-to-end verified:
archive -> presigned GET (200) -> purge after grace -> object 404.
2026-07-14 14:56:40 +02:00
juancarlos.cavero
05578c5456 feat: add hosted paid mode (managed keys, Stripe trial, metering)
Adds an optional cloud/paid mode behind a BILLING_ENABLED flag. With the flag
off the app is byte-identical to today's self-hosted BYOK build (regression-zero).

Backend (cloud/ package, only imported when BILLING_ENABLED):
- Auth: magic link (Resend) + Google OAuth (authlib) + JWT sessions
- Stripe: hosted Checkout with 3-day card trial, Customer Portal, idempotent
  order-safe webhooks; 3 plans (Starter/Creator/Pro) resolved by lookup_key
- Postgres + SQLAlchemy async; atomic minute metering (reserve/commit/release,
  plan->topup FIFO, restart-safe) with sweeper
- Managed keys: Gemini + Upload-Post server-side for entitled users; paid-only
  (BYOK core header ignored on hosted); Upload-Post white-label per-user profiles
- Metering wired into /api/process (probe->reserve->402, priority queue) and
  thumbnail image generation (3 min/batch)
- yt-dlp residential PROXY_URL support + 720p cap for hosted YouTube downloads

Frontend:
- AuthContext, LoginModal, PricingSection (3-day trial), AccountPage, UsageMeter,
  TopUpModal, TrialGate/AdvancedBanner
- Paid-only UI: hide BYOK core inputs, trial prompts per tool
- Included (Clip Generator, YouTube Studio) vs BYOK (AI Shorts/dubbing: fal.ai +
  ElevenLabs) clearly separated; ThumbnailStudio + SaaShortsTab managed-aware
- Landing: free-self-host vs paid-hosted messaging

Verified end-to-end against real Postgres + Stripe test mode.
2026-07-14 13:04:43 +02:00
juancarlos.cavero
d19739925a fix: Remove "Made with by Upload-Post" credit from app footer
A second instance of the footer credit was still rendering inside the
authed app view (App.jsx). Drop it together with the now-empty footer
strip so the credit is gone from both Landing and App.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 12:33:46 +02:00
juancarlos.cavero
b8602fd841 feat: Add minimal Terms & Privacy page
- New Legal.jsx single-page notice covering AS-IS, user responsibility,
  retention (1h job purge), third-party APIs, GDPR rights, copyright
  takedown via GitHub Issues, self-hosted disclaimer
- main.jsx routes #legal to the Legal page; Landing footer adds the link
- Attestation checkbox now references the Terms & Privacy page
- Drop "Made with by Upload-Post" footer credit

Anchors the ownership attestation to a written notice and gives a
public surface for GDPR/DMCA contact, without inventing fake emails.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 12:31:15 +02:00
juancarlos.cavero
521ba638b9 fix: Drop "URL or file" mention from clip generator subtitle
The clip generator subtitle leaked "URL" into the copy even when YouTube
URL ingest is disabled by DISABLE_YOUTUBE_URL. Make the line neutral so
it reads correctly in both modes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 12:10:53 +02:00
juancarlos.cavero
12c1b8e1d5 feat: Require ownership attestation before processing a video
- MediaInput shows a checkbox the user must tick before Generate enables
- Frontend sends acknowledged=true alongside URL/file payload
- /api/process rejects with 400 if attestation is missing, and records
  IP/UA/timestamp/source on the job for legal record-keeping

Defensive posture for the public deployment: shifts responsibility to
the user via an explicit affirmative act, even without login.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 11:55:12 +02:00
juancarlos.cavero
3f4c814e22 feat: Add DISABLE_YOUTUBE_URL flag and reframe marketing copy
- New env var DISABLE_YOUTUBE_URL gates URL ingest in /api/process (403)
- /api/config exposes the flag so MediaInput can hide the YouTube tab
- Landing.jsx and index.html (meta + JSON-LD) reworded around
  "your long-form videos" instead of marketing YouTube downloads,
  reducing inducement exposure on the public deployment

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 11:51:08 +02:00
juancarlos.cavero
a7d54f2158 feat: Add AI Agent sidebar tab linking to skill-autoshorts repo
Introduces a new sidebar entry that explains the autonomous clipping
workflow (drop videos → AI clippers cut → user validates → auto-publish)
and warns that source footage must already be in vertical 9:16 format.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 16:52:05 +02:00
juancarlos.cavero
9575b774d0 fix: Auto Edit no longer throws "setCompositionParams is not defined"
handleAutoEdit referenced setCompositionParams and setShowPreviewModal — neither exists in ResultCard, leftovers from a prior refactor. Align it with handleSubtitle/handleHook: accumulate the generated effects into activeLayers and re-render the clip via renderInBrowser.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 07:09:49 +02:00
juancarlos.cavero
42ca76c48b feat: Make Upload-Post API key required and warn on every screen
Treat the Upload-Post key as mandatory like the Gemini key: block /api/process when either is missing, mark the Settings section as Required, and show a persistent banner plus a header pill on every screen until both keys are configured. The missing-key modal now lets the user paste each key inline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 07:05:41 +02:00
juancarlos.cavero
9c9342c499 feat: Add Remotion integration for animated subtitles, hooks and effects
Replace static FFmpeg post-processing with Remotion-powered browser rendering:
- Animated word-by-word subtitles (pop, karaoke, glow styles) with real-time preview
- Hook overlays with entrance animations (spring, fade, slide-up)
- Video effects layer (zoom, brightness, contrast, saturate)
- Browser-side rendering via @remotion/web-renderer (WebCodecs)
- Editable transcript text in subtitle modal
- Layers accumulate across operations (subtitles + hook rendered together)
- Gemini EffectsConfig endpoint for structured JSON instead of fragile FFmpeg strings
- Render service (Node.js) as alternative server-side renderer
- New API endpoints: /api/clip/transcript, /api/effects/generate, /api/render

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 14:00:11 +02:00
juancarlos.cavero
ccf86d61a9 feat: Add weekly content scheduler with timezone support
Schedule all generated clips across consecutive days with a single click.
Includes IANA timezone selector, platform picker, progress tracking,
and redirects to Upload-Post calendar after scheduling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 22:53:31 +02:00
juancarlos.cavero
f09cd0ca0c feat: Add Upload-Post branding, competitor table, showcase, and fix voice gender
- Landing: Add "Social media API" link to Upload-Post in features card
- Landing: Add "Made with ❤️ by Upload-Post" in footer
- Dashboard: Add "Made with ❤️ by Upload-Post" footer
- README: Add competitor comparison table (vs Opus Clip, CapCut, Vizard, Klap, Descript)
- README: Add cost breakdown section with free tiers
- README: Add AI Shorts showcase from gallery
- README: Add "Who Is This For?" section
- README: Add Docker, GitHub stars, last commit badges
- README: Expand social auto-publishing and scheduling info
- Fix: Reset voice selection when actor gender changes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:43:53 +01:00
juancarlos.cavero
d128fcab95 feat: Add competitor comparison, cost breakdown, showcase, and fix gender voice selection
- README: Add comparison table vs Opus Clip, CapCut, Vizard, Klap, Descript
- README: Add cost breakdown section highlighting free tiers (Gemini, Upload-Post)
- README: Add AI Shorts showcase with gallery examples
- README: Add "Who Is This For?" section
- README: Add Docker, GitHub stars, last commit badges
- README: Expand social auto-publishing and scheduling info
- Fix: Reset selected voice when actor gender changes (male now defaults to male voices)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:30:10 +01:00
juancarlos.cavero
37bd3b0352 feat: Add API key modal when Gemini key is missing
Shows a popup with setup instructions for Gemini (required) and
Upload-Post (optional) when user tries to generate clips without
an API key configured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 09:20:24 +01:00