Commit Graph
288 Commits
Author SHA1 Message Date
yusufipk b5fd73dcf2 feat(admin): show subscription status and real access in user list
Add a Subscription column to the admin user listing showing each user's
billing status (Active, Trialing, Past due, Canceled, etc.) as a badge,
plus an effective-access indicator. Access reflects real in-app access,
not just the user's own subscription: collaborators on a paying owner's
workspace/project are shown as having access 'via team' (mirrors
hasAppNavigationAccess in lib/route-access.ts). Canceled-but-not-yet-
expired and trialing users are surfaced with their access-until date.
Column is DB-sortable and gated behind isStripeBillingEnabled().
2026-07-25 13:24:55 +07:00
Yusuf İpek ae78e97fde Merge pull request #25 from eehkay/chore/commitlint-esm-config
chore: load commitlint rules by renaming config to .mjs
2026-07-22 19:52:27 +03:00
yusufipk fa1610b053 fix(api): serialize BigInt in all API success responses
successResponse() used NextResponse.json(), which calls JSON.stringify and
throws on BigInt. Prisma returns BigInt for VideoVersion.sizeBytes and
VideoAsset.sizeBytes, so any route returning one of those rows returned 500
after its database write had already committed.

#27 fixed two such endpoints by narrowing their selects, and two create
routes were already wrapped in toJsonSafe(). This closes the bug class at
the helper instead: successResponse() now serializes with a shared
bigIntReplacer, which covers every route in app/api (none construct a
NextResponse.json response directly).

The two toJsonSafe() call sites are now redundant and were removed. BigInt
values render as strings, matching what toJsonSafe already produced.
2026-07-22 23:51:18 +07:00
Yusuf İpek 29d2896cb9 Merge pull request #32 from eehkay/fix/audio-asset-proxy-and-gc-thumbnails
fix: audio asset playback and orphan-cleanup thumbnail deletion
2026-07-22 19:50:28 +03:00
Yusuf İpek 22bb6a68fb Merge pull request #27 from eehkay/fix/bigint-serialization
fix: BigInt serialization 500s in video PATCH and approval decision responses
2026-07-22 19:46:08 +03:00
eehkayandClaude Fable 5 16efba4e19 fix: audio asset playback and orphan-cleanup thumbnail deletion
The audio proxy resolved ownership only through voice comments, so
R2_AUDIO video assets (which store the same proxy path in
videoAsset.sourceUrl) always got 403s. Resolve ownership the way the
image proxy does: query comments and video assets, merge into a
unique-owning-video map, deny on ambiguity.

r2-orphan-cleanup marked videoAsset.sourceUrl as referenced but not
videoAsset.thumbnailUrl, so every R2_VIDEO asset thumbnail older than
the TTL was deleted as an orphan. Widen the query to both columns.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-19 13:17:13 -07:00
eehkayandClaude Fable 5 d830c9a386 fix: play r2 direct uploads in the compare versions view
The compare page predates the r2 upload provider: r2 versions fell
through to a URL-safety check that throws on app-relative upload URLs,
so their panels rendered nothing and registered no player — the shared
controls drove an empty list and nothing played.

- add an R2Panel mapping a plain video element over the app upload
  route to the shared adapter, using the same playback-url resolution
  as the main video page
- make play/pause state detection work without the YouTube API loaded
  (numeric fallback), so bunny/r2-only comparisons can pause
- re-sync panels that drift more than 350ms from the source player
  once per second so playback stays aligned, not just starts aligned

Verified against the running app: both versions play in lockstep
(0.000s measured drift), pause together, and seek together.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-19 10:18:22 -07:00
eehkayandClaude Fable 5 00589f3453 fix: bigint serialization 500s in video and approval responses
Two endpoints return 500 whenever they succeed, because their success
payloads include VideoVersion rows whose sizeBytes column is a BigInt
that JSON.stringify rejects:

- PATCH /api/projects/[projectId]/videos/[videoId] included all versions;
  respond with scalar video fields only, which is all any caller reads
- POST /api/approvals/[requestId]/decision included the full version row
  in the resolved request; select the scalar fields the response and
  notifications actually use

The approval bug is reachable the first time any approver responds to a
request; the decision itself commits, but the requester sees an error.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-18 09:17:57 -07:00
eehkayandClaude Fable 5 9595698b5b fix: emit one json-ld script per schema object
A single ld+json script holding a top-level array crashes naive
structured-data consumers (Safari extension content scripts) that read
parsed['@context'] without checking for arrays. Emit one script per
object so every payload has a top-level @context, and escape < in the
root layout like the marketing pages already did.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-18 09:15:57 -07:00
eehkayandClaude Fable 5 d405fc09da chore: rename commitlint config to mjs so esm rules actually load
commitlint.config.js uses export default but the package is CommonJS,
so the loader silently fell back to an empty ruleset and rejected every
commit with empty-rules. The .mjs extension loads under node and bun.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-18 09:15:04 -07:00
yusufipk 33008d33ad style: fix prettier formatting 2026-07-12 18:38:17 +07:00
yusufipk 6c6df3cf1d feat: hosted-first landing + accurate fair source licensing copy
- Replace unsubstantiated hero claim with client sign-off messaging
- Rename Open Source (Self-hosted) to Fair Source (Self-hosted) with FSL
  explanation (source visible, self-hostable, Apache 2.0 after two years)
- Put Hosted Cloud first in pricing with Recommended badge and trial note
- Move self-hosting hero link to GitHub, out of primary CTA path
- Add FAQ entries for FSL licensing and 7-day free trial
- Align license language across landing, README, terms, SEO, comparisons
- Fix contact email to [email protected] everywhere (mailto links,
  notification sender fallbacks) and SEO fallback domain
2026-07-12 18:32:38 +07:00
yusufipk 5821f73d38 feat: show live progress while downloading named files
Bunny/cross-origin downloads are fetched into a blob before saving, which
on large files or slow connections looked stuck (spinner only). Stream the
body through a counting transform and show real byte progress in a toast:
per-file percent for single downloads and file N/M + percent for bulk.

- Progress is measured from Content-Length + received bytes (not estimated).
- The blob is assembled by the browser from the stream (can be disk-backed),
  so we don't accumulate chunks in the JS heap.
- Only the blob path shows a toast; same-origin (R2/S3/MinIO) and the >10 GB
  fallback use the browser's native download UI.
2026-07-10 22:27:53 +07:00
yusufipk 8845c2c643 feat: name video downloads by title + version
Downloads now save as "<video title> <version label>" (or "<title> vN"
when no label), with the real extension derived from the file's content
type, instead of the CDN's generic "original" name.

- Bunny (cross-origin CDN redirect) files are fetched and saved as a named
  blob, but only up to 10 GB; larger files fall back to a plain navigation
  so the browser streams to disk without buffering in memory.
- R2 / S3 / MinIO uploads are same-origin (/api/upload/video/...), so the
  download attribute names them correctly at any size, no buffering.
- Applies to both single-video and bulk/project downloads; bulk downloads
  run sequentially so at most one file is buffered at a time.
- Shared helper in lib/client/download-file.ts.
2026-07-10 21:58:09 +07:00
yusufipk bede216081 perf: smooth playhead + live scrubbing preview
Drive the timeline progress fill and playhead directly via a
requestAnimationFrame loop (bypassing React state) so the playhead glides
at the display refresh rate during playback instead of stepping ~4x/sec.

Scrubbing now previews frames live like an editor: while dragging, the
video is seeked with coalescing (one seek in flight, chasing the latest
target) so HLS stays responsive without stale-seek pileup. Playback pauses
during a scrub and resumes on release. Dragging tracks the cursor anywhere
on the page via window listeners.
2026-07-10 21:31:36 +07:00
yusufipk 8d7d064647 feat: make asset downloads opt-in via "Include assets" toggle
Project/selected downloads now include only videos by default. Add an
"Include assets" checkbox toggle to both download dropdowns (default off)
that adds b-rolls and other attached assets to the download when enabled.

- buildProjectDownloadManifest gains an includeAssets option (default false).
- Download route reads ?assets=1 and passes it through.
2026-07-10 21:03:34 +07:00
yusufipk 57c5a127d1 feat: move videos to another project (single + bulk)
Add a "Move to project" action in the video card dropdown and the
selection-mode toolbar. Videos (with their versions, comments, assets and
video-scoped share links) can be moved into another project in the same
workspace.

- New GET/POST /api/projects/[projectId]/videos/move: GET lists manageable
  destination projects in the workspace; POST performs the move.
- Requires canEdit on both source and destination; same-workspace only.
- Move runs in an interactive transaction that re-asserts source ownership
  atomically (updateMany guarded by projectId) to avoid a TOCTOU race, and
  returns 409 on conflict. GET is rate-limited ('api').
2026-07-10 20:55:12 +07:00
yusufipk 654d3a6bc7 style: format download dropdown item (prettier) 2026-07-10 20:08:15 +07:00
yusufipk 34e72f6cbb fix: bulk video download (original quality, latest version by default)
- Accept source=auto in the version download route (was 400 Bad Request),
  so bulk/project downloads of Bunny videos no longer fail.
- Bulk/project downloads now request the original (uncompressed) Bunny file
  so quality never drops (was source=auto which could fall back to compressed).
- Project/selected downloads default to the latest version of each video and
  add a separate "All versions" option in the download dropdowns.
2026-07-10 20:04:18 +07:00
Yusuf İpek cbaecb92cc Merge pull request #24 from yusufipk/fix/comment-newline-rendering
fix: preserve newlines/paragraph breaks in rendered comments
2026-07-10 15:41:29 +03:00
yusufipk d500dcb042 fix: preserve newlines/paragraph breaks in rendered comments
Comment content was stored with newlines intact but rendered inside <p>
elements with default white-space, collapsing line breaks into single
spaces. Add whitespace-pre-wrap (and break-words) to the comment/reply
render wrappers in the comments pane and the compare-versions view.
2026-07-10 19:33:03 +07:00
yusufipk 880d0ac0fa feat: chunked (S3 multipart) uploads for R2/S3 video backend
Self-hosted instances on the R2/S3 backend could only upload a video as a
single PUT, which fails behind a Cloudflare proxy/tunnel (100MB request-body
cap) and is capped at 5GiB with no resilience. Bunny already avoids this via
tus; this brings the R2/S3 path to parity.

Files larger than a threshold (default 90MiB) are now split into parts
(default 32MiB, min 5MiB) and uploaded directly browser->R2 via presigned
UploadPart URLs, then reassembled server-side with CompleteMultipartUpload.
Each request stays under the 100MB cap, lifts the size ceiling well past
5GiB, and adds per-chunk retry. Files at/under the threshold keep the
existing single-PUT path unchanged. Bunny path is untouched.

Thresholds are env-overridable via OPENFRAME_R2_MULTIPART_THRESHOLD_BYTES
and OPENFRAME_R2_MULTIPART_PART_SIZE_BYTES.

Verified end-to-end against real Cloudflare R2 and a local MinIO behind an
nginx 90MB cap (single 141MB PUT 413s on master; 32MB parts pass here).

Closes #22
2026-07-10 19:19:07 +07:00
yusufipk 82932c6b22 fix: scope select-all to current page
"Select all" previously selected every video across every page, which is
too easy to trigger by accident when the user only meant the videos
visible on the current page. Scope select/deselect to the current page's
videos and relabel the button to "Select page"/"Deselect page" when the
project spans multiple pages.
2026-06-27 13:46:05 +02:00
yusufipk cebdf23b38 fix(security): bump nodemailer to 9.0.1
Resolves the high-severity advisory (dependabot #20) where the
message-level raw option bypassed disableFileAccess/disableUrlAccess,
enabling arbitrary file read and SSRF. We only use the standard
createTransport/sendMail API, so the major bump is non-breaking.
2026-06-27 13:38:07 +02:00
yusufipk 95dcf92d8b fix: clamp page after bulk video delete
When every video on the current page was bulk-deleted, router.refresh()
re-queried the same out-of-range page and rendered "No videos yet" even
though earlier pages still had videos. Clamp to the last valid page based
on the remaining video count, falling back to refresh in place.
2026-06-27 13:35:08 +02:00
yusufipk 52e4169db2 feat: add project bulk download and bulk video delete
Add a "Download project" / "Download selected" flow that builds a
server-side manifest of downloadable media, plus a selection mode with
bulk delete for project videos.

Gate viewer downloads behind a new project allowDownloads setting
(default off, opt-in). Admins can always download; enabling on a public
project allows anonymous visitors to download. Enforce the setting on
every download surface (manifest, version, asset, watch, video routes)
via canDownloadProjectMedia.

Add rate limits for the manifest endpoint, host allowlisting for direct
download URLs, and configurable file/byte caps.

Closes #16
Closes #19
2026-06-27 13:24:05 +02:00
yusufipk 9613c4f2c6 fix: harden email validation and CI permissions 2026-06-14 16:59:09 +02:00
yusufipk 56fb7403cf fix: resolve CI lint and formatting failures.
Replace internal anchor tags with Next.js Link components and format the marketing comparison route page.
2026-06-14 16:42:27 +02:00
yusufipk 51257e004f Add SEO comparison landing pages and footer compare links.
Introduces dynamic marketing comparison routes, competitor data, and Compare sections on the homepage and marketing footer.
2026-06-14 16:36:26 +02:00
yusufipk d301f3d808 docs(security): prefer GitHub private vulnerability reporting 2026-06-13 23:28:22 +02:00
Yusuf İpek 0a89e52a98 Merge pull request #21 from yusufipk/cursor/be172284
feat: bulk video uploads and S3 asset video support (fixes #18)
2026-06-14 00:27:09 +03:00
yusufipk 00124bc7c2 feat: bulk video uploads and S3 asset video support (#18)
Add multi-file drag-and-drop queues for project videos and the assets pane, and route asset video uploads through S3/R2 when direct Bunny uploads are disabled.
2026-06-13 23:24:21 +02:00
yusufipk 52ace1a1a8 fix: generate CSP from runtime storage env for self-hosted MinIO
Move Content-Security-Policy generation to proxy.ts so R2_PRESIGN_ENDPOINT
is included at request time instead of being frozen at image build time.
Document reverse-proxy layouts for Docker self-hosting and copy proxy.ts
into the Docker image.

Closes #17
2026-06-12 21:21:31 +02:00
yusufipk 4bf6e821af feat: enable S3 video uploads and update related configurations
- Added support for self-hosted S3 video uploads with new environment variables: OPENFRAME_ENABLE_S3_VIDEO_UPLOADS and OPENFRAME_MAX_VIDEO_UPLOAD_BYTES.
- Updated .env.example and .env.docker.example to reflect new configuration options.
- Enhanced Content Security Policy to include origins for S3-compatible storage.
- Updated dependencies for AWS SDK to support new features.
- Refactored upload logic to accommodate both Bunny and S3 upload providers.
- Updated documentation to clarify the usage of direct uploads and S3 configurations.
- Closes #11
2026-05-27 17:04:39 +02:00
Yusuf İpek b6de3a29aa Merge pull request #15 from yusufipk/dependabot/npm_and_yarn/npm_and_yarn-152f59e559
chore(deps): bump next from 16.2.3 to 16.2.6 in the npm_and_yarn group across 1 directory
2026-05-23 21:46:32 +03:00
yusufipk 6692db992d feat: add YouTube to connect-src in Content Security Policy 2026-05-23 20:44:52 +02:00
dependabot[bot] 1dcbb78b22 chore(deps): bump next in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [next](https://github.com/vercel/next.js).


Updates `next` from 16.2.3 to 16.2.6
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v16.2.3...v16.2.6)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 16.2.6
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-05-12 23:06:01 +00:00
yusufipk 378ca1977b feat: enhance comment functionality with timestamp range support
- Added timestampEnd to Comment and CommentReply interfaces.
- Implemented logic for handling comment timestamp ranges in the comment composer and comments pane.
- Updated video player and player core to support frame stepping and improved seeking functionality.
- Introduced frame mode toggle for precise navigation during video playback.
- Closes #12
2026-04-25 22:58:16 +03:00
yusufipek 63f331d220 docs: add instructions for using the published Docker image Closes #10 2026-04-25 21:29:31 +03:00
yusufipek 0c54498d34 chore: update Dockerfile to use full image path and add Docker publish workflow v0.1.0 2026-04-25 21:04:37 +03:00
Yusuf İpek 8329fc73e0 Merge pull request #9 from koksalenes/chore/setup-dx-tools
chore: add husky, commitlint, lint-staged, editorconfig and prettier
2026-04-25 20:31:14 +03:00
yusufipek 7058ea9f87 style: fix prettier issues after syncing with master 2026-04-25 20:24:17 +03:00
yusufipek ef7402bc23 Merge origin/master into pr-9-review 2026-04-25 20:21:40 +03:00
Enes Köksal 3cfea40fbd refactor: eslint and prettier conflict will be resolved and formatted 2026-04-23 17:05:43 +03:00
Yusuf İpek 066c4247db feat: add sorting functionality to project videos and update search parameters 2026-04-22 15:31:09 +03:00
Yusuf İpek 1014fd503a Merge pull request #7 from poyrazavsever/master
Dökümantasyon: Katkı Süreçlerini Standartlaştırma
2026-04-22 14:31:17 +03:00
Poyraz Avsever 91033b1cfb refactor: streamline bug report template and enhance contributing guidelines 2026-04-20 22:52:07 +03:00
Poyraz b8d8ccdab8 Merge branch 'yusufipk:master' into master 2026-04-20 22:31:09 +03:00
Yusuf İpek c73bc9a19a fix(README): correct description of OpenFrame to emphasize fair source 2026-04-20 16:49:18 +03:00
Poyraz Avsever d3d57b098b refactor: update issue and pull request templates for clarity and consistency 2026-04-18 21:51:19 +03:00