161 Commits

Author SHA1 Message Date
Dorian
99dd6894fd fix: default APP_PORT to 7755 to avoid conflicts 2026-03-17 00:44:23 +00:00
Dorian
e1f7394a6d fix: use POSTGRES_USER env var in healthcheck 2026-03-17 00:24:29 +00:00
Dorian
8d56fe392d refactor: update environment configuration and documentation
- Modified `.env.example` to reflect new API URL structure and added CDN configuration for external storage.
- Updated `.gitignore` to include deployment secrets and certificate files, ensuring sensitive information is not committed.
- Revised `BACKEND_INTEGRATION.md` to clarify authentication methods, replacing Cognito references with Nostr NIP-98.
- Deleted outdated documentation files (`CONTENT-INTEGRATION-COMPLETE.md`, `CURSOR-MCP-SETUP.md`, `FINAL-STATUS.md`, `FIXES-APPLIED.md`, `INDEEHHUB-INTEGRATION.md`, `PROJECT-COMPLETE.md`, `PROJECT-SUMMARY.md`) to streamline project documentation.

These changes enhance the clarity of the environment setup and improve the overall documentation structure for better developer onboarding.
2026-02-17 05:12:59 +00:00
Dorian
a88022f81d feat: improve AuthModal user feedback during login process
- Added a loading state for the signing process, displaying a spinner and disabling the button while completing login.
- Introduced a reactive variable to manage the completion state of the login process, enhancing user experience with clear visual indicators.
- Updated the UI to conditionally render messages and buttons based on the login state, improving clarity and responsiveness.

These changes enhance the user experience by providing immediate feedback during the authentication process, ensuring users are informed of their login status.
2026-02-17 04:29:04 +00:00
Dorian
ffad3eb6e8 feat: enhance AuthModal loading indicators and button labels
- Replaced static icons with animated SVG loaders for various authentication actions, improving user feedback during loading states.
- Updated button labels to reflect current actions, such as 'Signing in...' and 'Waiting...', enhancing clarity for users.
- Adjusted layout spacing for buttons to ensure consistent visual presentation.

These changes improve the user experience by providing clear visual cues during authentication processes.
2026-02-17 04:25:23 +00:00
Dorian
d8f54a5032 feat: add remote signer QR flow to AuthModal
- Introduced a new phase for remote signer login using QR codes, enhancing the authentication experience for desktop users.
- Implemented UI elements for displaying the QR code and handling user interactions, including error messages and loading states.
- Updated the Nostr Connect composable to support the new QR flow, including cancellation handling and improved error management.

These changes provide users with a seamless and modern way to authenticate using remote signers, improving overall usability.
2026-02-17 04:18:55 +00:00
Dorian
bd1f370760 feat: enhance Nostr login options in AuthModal
- Added a new login button for Nostr using Primal, providing a default option for users.
- Implemented handling for blocked pop-ups, allowing users to open Primal directly if the login pop-up is blocked.
- Updated the existing Nostr login button to improve layout and spacing.

These changes improve the user experience by offering additional login methods and addressing common issues with pop-up blockers.
2026-02-17 04:08:33 +00:00
Dorian
cef73f9694 feat: add Nostr Connect login functionality and update routing
- Introduced a new login option in AuthModal for Nostr Connect using remote signer (Primal), enhancing authentication methods.
- Updated the router to include a new path for Nostr Connect callback, allowing for seamless integration after remote signer approval.
- Enhanced error handling in AuthModal to surface Nostr Connect errors, improving user feedback during the login process.

These changes improve the authentication experience by providing additional login options and ensuring robust error management.
2026-02-17 04:00:40 +00:00
Dorian
023653eec5 docs: update README and improve zap handling in webhooks and services
- Added a production checklist for Zaps (Lightning) in README.md, detailing necessary steps for historic zap visibility.
- Enhanced comments in webhooks.service.ts to clarify zap handling and webhook requirements for BTCPay Server.
- Improved logging in zaps.service.ts to provide more detailed information on zap payouts and recorded stats.
- Updated error handling in zaps.service.ts to ensure robust logging if zap stats recording fails.
- Refined getZapStats method in indeehub-api.service.ts to clarify mock data usage in development.

These changes improve documentation and enhance the handling of zap-related functionalities across the application.
2026-02-14 16:35:21 +00:00
Dorian
50915f8c52 fix: improve mock data handling in IndeehubApiService
- Updated the getZapStats method to merge mock zap data when the API returns empty results or in development mode.
- Introduced a new environment variable, VITE_HIDE_MOCK_ZAPS, to control the visibility of mock zaps in production.

These changes ensure that the zap UI remains functional during development and improves the handling of scenarios with no available zap data.
2026-02-14 16:29:56 +00:00
Dorian
f40b4a1268 refactor: update caching and zap handling in components
- Replaced CacheInterceptor with HttpCacheInterceptor in app.module.ts for improved caching strategy.
- Enhanced ContentDetailModal to dispatch a custom event upon zap completion, improving inter-component communication.
- Refactored ContentRow to streamline zap stats fetching and added a listener for zap completion events, ensuring real-time updates.
- Updated Analytics.vue to improve number formatting functions, handling undefined and null values more robustly.

These changes enhance the application's performance and user experience by optimizing caching and ensuring accurate, real-time data updates across components.
2026-02-14 16:11:30 +00:00
Dorian
e48e5f5b4d feat: enhance zap integration with backend stats and UI improvements
- Updated ContentDetailModal to display zap statistics from both Nostr and backend sources, improving visibility of zap activities.
- Refactored zap data handling to merge Nostr relay and backend zap stats, ensuring accurate totals and recent zapper information.
- Introduced a new function to fetch backend zap stats, enhancing the modal's responsiveness to user interactions.
- Enhanced error handling and added mock data support in the IndeehubApiService for development purposes.

These changes improve the user experience by providing comprehensive zap insights and ensuring the UI reflects real-time data accurately.
2026-02-14 15:55:02 +00:00
Dorian
66db9376ed feat: enhance zap functionality with stats tracking and pubkey support
- Added a new endpoint in ZapsController to retrieve zap statistics by project IDs, including total counts, amounts, and recent zapper pubkeys.
- Updated ZapsService to record zap statistics, including optional zapper pubkey for tracking who zapped.
- Enhanced CreateZapInvoiceDto to include an optional zapperPubkey field.
- Modified frontend components to display zap stats and integrate with the new backend functionality, improving user engagement and transparency.

These changes improve the overall zap experience by providing detailed insights into zap activities and enhancing the tracking of contributors.
2026-02-14 15:35:59 +00:00
Dorian
bb4f13fc65 feat: implement nsec login functionality in AuthModal
- Added a new nsec login option that allows users to sign in using their private key.
- Introduced a toggle to reveal the nsec input field, enhancing user experience.
- Implemented validation and error handling for nsec submissions, ensuring robust login flow.
- Updated styles and layout for better visual consistency and usability.

These changes enhance the authentication process by providing an additional secure login method for users.
2026-02-14 15:26:42 +00:00
Dorian
96542e0e8a fix: update tsbuildinfo and refine component rendering
- Updated tsconfig.tsbuildinfo to include additional components, ensuring proper TypeScript build configuration.
- Refined rendering logic in ContentRow.vue to simplify the v-for directive for better readability.
- Removed unused variables and functions in ZapModal.vue, streamlining the code and improving maintainability.

These changes enhance the build process and improve code clarity across components.
2026-02-14 13:26:05 +00:00
Dorian
8b10de2180 feat: enhance pubkey decoding and processing in AuthModal
- Updated decodePubkeyText function to support JSON input for NIP-98 events, improving flexibility in pubkey formats.
- Enhanced processPubkey function to handle signed NIP-98 events directly, streamlining the login process.
- Normalized input handling by trimming whitespace and stripping newlines, ensuring robust pubkey validation.

These changes improve the user experience by allowing more diverse input formats for pubkeys and simplifying the login flow.
2026-02-14 13:23:03 +00:00
Dorian
edf8be014e feat: integrate ZapsModule and enhance zap payment handling
- Added ZapsModule to the application, integrating it into the main app and webhooks modules.
- Introduced a new method in BTCPayService for processing payments to Lightning addresses, improving zap payout functionality.
- Updated WebhooksService to handle zap payment events, allowing for seamless integration of zap transactions.
- Enhanced UI components to display zap-related information, including zaps count and avatar stacks, improving user engagement.

These changes enhance the overall zap payment experience and ensure better integration of zap functionalities across the application.
2026-02-14 13:21:27 +00:00
Dorian
1a5cbbfbf1 feat: enhance payment confirmation handling in ZapModal
- Added conditional rendering for payment confirmation messages based on the presence of a verify URL.
- Introduced a manual confirmation button for providers that do not send automatic confirmations, improving user interaction.
- Implemented a new function, markAsPaid, to handle user confirmations and trigger success state for zaps to direct Lightning addresses.

These changes enhance the user experience by providing clearer instructions and feedback during the payment process.
2026-02-14 13:10:28 +00:00
Dorian
e10b0a0406 refactor: simplify Nostr login button and improve Amber login flow
- Removed conditional rendering for the Nostr login button, ensuring it is always displayed when the extension is available.
- Enhanced the Amber login flow with clearer messaging during the waiting phases for pubkey and signature.
- Added paste fallback options for users in case clipboard functionality fails, improving user experience during the login process.

These changes streamline the authentication experience and provide better feedback to users during the login phases.
2026-02-14 13:07:52 +00:00
Dorian
11d289d793 feat: add comment support for Lightning payments in BTCPay and Strike services
- Enhanced the sendPaymentWithAddress method in BTCPayService and StrikeService to accept an optional comment parameter.
- Updated resolveLightningAddress to include the comment in the callback URL if supported by the LNURL-pay endpoint.
- Modified PaymentService to construct a descriptive comment for Lightning invoices, improving clarity for users.

These changes enhance the payment experience by allowing users to include contextual information with their transactions.
2026-02-14 13:02:42 +00:00
Dorian
e774d20821 feat: auto-detect zap payments, show zapper profiles, fix algorithm
- ZapModal now polls LNURL verify URL for automatic payment detection
  instead of requiring manual "Done" click
- Added lightning bolt celebration animation on zap success with
  random fun quotes
- Show "Zapped by" section on film detail modal with profile pics,
  amounts, and avatar pills (like Primal/Yakihonne)
- useNostr now subscribes to kind 9735 zap receipts per content,
  parses sender pubkey from embedded zap request, and fetches profiles
- Fixed most-zapped algorithm to also parse the description tag in
  zap receipts for content matching (NIP-57 embedded zap requests)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 12:42:57 +00:00
Dorian
92182ca2ad fix: resolve creator lightning address via two-step API lookup
The /filmmakers/project/:id/owner endpoint returns a FilmmakerDTO
which doesn't include lightningAddress. Now correctly fetches the
owner's filmmaker ID first, then calls /filmmakers/:id/lightning-address
to get their actual lightning address for zap invoice generation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 12:31:16 +00:00
Dorian
8f1a28e825 feat: add zap button with lightning invoice modal and fix keys detection
- Add Zap button to film detail modal with LNURL-pay invoice generation
- Create ZapModal with 4 preset amounts, custom input, and QR code display
- Fix hasPrivateKey detection for production builds (use instanceof)
- Fix KeysModal header centering (pr-8 → px-8)
- Update most-zapped algorithm to track real Nostr zap receipts (kind 9735)
- Add BOLT11 amount decoder and zap receipt relay subscription

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 12:27:34 +00:00
Dorian
2a16802404 feat: add KeysModal for managing private key accounts
- Introduced a new KeysModal component to display and manage nsec/npub for accounts with local private keys.
- Updated AppHeader and Profile views to include a "My Keys" button, conditionally rendered based on the presence of a private key.
- Enhanced the useAccounts composable to determine if the active account holds a local private key, enabling key management functionality.

These changes improve user access to their private key information and enhance the overall account management experience.
2026-02-14 12:18:48 +00:00
Dorian
d1ac281ad9 feat: enhance webhook event handling and improve profile fetching logic
- Updated the WebhooksService to differentiate between 'InvoiceSettled' and 'InvoicePaymentSettled' events, ensuring accurate payment confirmation and logging.
- Enhanced the useAccounts composable to improve display name handling by skipping generic placeholder names and ensuring the most recent profile metadata is fetched from multiple relays.
- Modified the IndeehubApiService to handle JWT token refresh failures gracefully, allowing public endpoints to function without authentication.
- Updated content store logic to fetch all published projects from the public API, ensuring backstage content is visible to all users regardless of their active content source.

These changes improve the reliability of payment processing, enhance user profile representation, and ensure content visibility across the application.
2026-02-14 12:05:32 +00:00
Dorian
bbac44854c feat: integrate content fetching on successful Amber login
- Added content store integration to re-fetch content after successful Amber login, ensuring backstage-published projects are merged into the active catalog.
- Updated comments for clarity regarding the login flow and account registration timing.

This change enhances the user experience by ensuring that the content is up-to-date immediately after authentication.
2026-02-14 11:39:28 +00:00
Dorian
93e2f666aa feat: update default content source for new users
- Changed the default content source from 'indeehub-api' to 'topdocfilms' for new users and first visits.
- Updated comments to reflect the new default behavior, enhancing clarity for future developers.

This change aims to improve the onboarding experience for new users by providing a more relevant default content source.
2026-02-14 11:25:44 +00:00
Dorian
40485e9622 feat: enhance Amber login flow with unsigned event management
- Updated the AuthModal to reset the amberUnsignedEvent state during various phases of the login process.
- Improved handling of the unsigned NIP-98 event for better reuse during signing.
- Enhanced error handling to ensure the correct event data is used when authenticating with Amber.

These changes streamline the Amber login experience and improve state management for the signing process.
2026-02-14 11:25:27 +00:00
Dorian
ca3d390180 feat: update AppHeader and useAccounts for improved user profile handling
- Replaced robohash image source with user-defined profile picture in AppHeader.
- Enhanced name display with truncation for better UI consistency.
- Introduced caching and fetching of Nostr profile metadata in useAccounts.
- Added computed properties for active profile and profile picture to streamline user data retrieval.

This update improves the user experience by ensuring accurate profile representation and efficient data management.
2026-02-14 11:13:21 +00:00
Dorian
674c9f80c5 feat: enhance streaming functionality with format support and fallback mechanism
- Added support for an optional 'format' query parameter in the streaming endpoint to allow raw file retrieval.
- Implemented a fallback mechanism in the VideoPlayer to automatically switch to raw file playback when HLS streaming fails.
- Improved error handling and logging for HLS playback issues, ensuring better user feedback and recovery attempts.
- Updated the Indeehub API service to accommodate the new format parameter in the streaming URL request.
2026-02-14 10:56:37 +00:00
Dorian
0ae2638af9 fix: cast KeyRewriteLoader to any for TypeScript compatibility in VideoPlayer
- Updated the loader configuration in the HLS setup to ensure compatibility with TypeScript by casting KeyRewriteLoader to any. This change addresses type-checking issues while maintaining the functionality of key URL rewriting for HLS playback.
2026-02-14 10:34:34 +00:00
Dorian
8aff9271a4 feat: enhance HLS error handling and key URL rewriting in VideoPlayer
- Introduced recovery attempts for HLS errors to prevent infinite loops.
- Added detailed logging for HLS errors, including fragment URLs and response statuses.
- Implemented a custom loader to rewrite AES-128 key URLs to resolve against the app backend.
- Improved user feedback for playback errors based on recovery attempts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 10:08:14 +00:00
Dorian
276dab207c feat: implement three-phase Amber login flow in AuthModal
- Updated Amber login button to reflect new three-phase process.
- Added handling for reading public key and signature from clipboard.
- Introduced new state management for Amber login phases.
- Enhanced user feedback during each phase with appropriate messaging.
- Refactored related functions for clarity and maintainability.
2026-02-14 09:28:25 +00:00
Dorian
38293b1f95 feat: add comprehensive logging to payment cron for debugging
Every 10 minutes, the cron now logs:
- When it triggers and completes
- Satoshi rate fetched (or failure)
- Number of eligible shareholders found
- If 0 found: warns about shareholders with revenue but mismatched criteria
- Per-shareholder: revenue, filmmaker ID, lightning address
- Payment preparation: amount in sats, destination address
- Duplicate detection
- Payment send result (completed or failed with error)
- Revenue deduction confirmation

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 23:07:31 +00:00
Dorian
0e2f2b0a73 feat: allow dismissing sovereign flow to use traditional auth form
- "Go back" replaced with red italic "fuck you, I wanna be lame"
- After dismissing, sovereign trap no longer intercepts clicks
- Form fields become real inputs (email/password) for actual use
- sovereignDismissed state resets when modal reopens or closes

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 23:05:24 +00:00
Dorian
d8b8237300 copy: change sovereign flow text from NAH! to STOP!
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 23:02:47 +00:00
Dorian
169e03d72d style: keep Films rows as horizontal scroll with responsive card sizes
Cards now scale to match the Algos grid proportions at each breakpoint
(1/3, 1/4, 1/5, 1/6 of viewport) while remaining in a horizontally
scrolling flex row with nav buttons on desktop.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 23:02:27 +00:00
Dorian
db266e40a8 style: switch Films rows to responsive grid matching Algos layout
ContentRow and Browse My List sections now use a responsive CSS grid
instead of fixed-width cards in a horizontal scroll:
- Mobile: 2 columns grid
- md (768px): 3 columns
- lg (1024px): 4 columns
- xl (1280px): 5 columns
- 2xl (1536px): 6 columns

Cards fill the available width at every breakpoint, matching the
Algos/Trending tab grid layout for visual consistency.
Scroll nav buttons hidden on desktop (grid doesn't scroll).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 23:01:29 +00:00
Dorian
0559876649 fix: make Algos/filter grid match Films rows at 6 cards per row
The filter grid was using md:grid-cols-3 (3 cards) while Films
horizontal rows showed 6. Updated to md:4 lg:5 xl:6 so both
views scale consistently across breakpoints.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:58:46 +00:00
Dorian
989dd75a84 style: change content grid from 5 to 6 cards per row on desktop
Cards were feeling too large at 5 per row. Updated calc to fit 6
cards uniformly across ContentRow and Browse (My List sections).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:56:35 +00:00
Dorian
ae97cbe67b fix: resolve AES-128 key delivery blocking HLS video playback
Root cause: HLS content is AES-128 encrypted, but the key endpoint
required mandatory auth (HybridAuthGuard). HLS.js fetches the key
without auth headers, causing a silent 401 and playback failure.

Backend:
- Changed key.controller.ts to use OptionalHybridAuthGuard
- Free content (price <= 0) now serves keys without authentication
- Paid content still requires auth, returns 401 for anon requests
- Added Content entity injection to look up pricing

Frontend:
- Configured HLS.js xhrSetup to attach Bearer token on /key requests
- Uses nostr_token or auth_token from sessionStorage
- Ensures logged-in users can play paid encrypted content

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:54:52 +00:00
Dorian
31a225ec15 fix: set Nostr Extension and Amber login buttons to exact 48px height
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:48:28 +00:00
Dorian
37b0bc654a style: left-to-right fade animations on sovereign phases + match close button to film modal
- NAH! text now slides in from the left with a scale punch and glow
- Own your privacy phase slides in from the left with a smooth fade
- Close button restyled to match ContentDetailModal (circular, glassmorphism, blur)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:47:56 +00:00
Dorian
19e8186a30 fix: default auth modal to 'Join IndeeHub' register mode
- Modal now opens in register mode by default instead of login
- Removed the subtitle text under the heading
- Fake form fields update based on mode (Create a password vs Enter)
- Toggle text reads "Already have an account? Sign in" first
- Forgot password only shows in login mode

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:46:46 +00:00
Dorian
90cdd030e1 feat: sovereign identity flow — NAH! animation + keypair generation
When users click on the legacy email/password form, the form zooms
out and a bold "NAH!" animates in. This transitions to an
"Own your privacy" message with a "Generate Sovereign Identity"
button that creates a new Nostr keypair, logs the user in, and
presents a red glassmorphism "Download your new identity" button
that saves the nsec/npub keypair to a text file.

Uses applesauce PrivateKeyAccount.fromKey() for proper account
registration and persistence.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:43:23 +00:00
Dorian
941d8917f3 style: dark glass button for Nostr Extension login + or-divider
Replaced the hero-info-button class with a dark glass morphism style
matching the nav buttons — dark translucent background, subtle inset
highlight, backdrop blur, and hover lift. Added an -or- divider
between the Nostr Extension and Amber login options.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:39:34 +00:00
Dorian
6480d02b11 style: use deep black glass morphism for content detail modal
Replace the flat #141414 grey background with a dark glass container
matching the header's floating-glass style — rgba(6,6,6,0.92) with
backdrop-filter blur, subtle white/6% border, and layered shadows.
Updated the hero gradient to blend seamlessly into the new base.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:38:45 +00:00
Dorian
7da4104aa2 fix: move search icon to the left of Sign In button on desktop
Reordered the right-side header actions so the search icon appears
before the Sign In button when the user is not authenticated.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:37:44 +00:00
Dorian
0917410c9e fix: add stream diagnostics and project-ID fallback for video playback
- Stream endpoint now accepts both content ID and project ID,
  falling back to project lookup when content ID is not found
- Added /contents/:id/stream-debug diagnostic endpoint that checks
  file existence in both private and public MinIO buckets
- Stream endpoint now verifies raw file exists before generating
  presigned URL, returning a clear error if file is missing
- Added comprehensive logging throughout the stream pipeline
- VideoPlayer now logs stream URL, API responses, and playback errors
  to browser console for easier debugging
- Bumped CACHEBUST for frontend (19), API (11), and ffmpeg-worker (13)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:36:41 +00:00
Dorian
f715534c06 fix: show exactly 5 content cards per row on desktop across all tabs
Cards used a fixed 280px width which showed ~6 on most desktops.
Algorithm filter tabs used a 5-column grid. This mismatch caused
layout jumping when switching tabs.

Now uses calc((100vw - 12rem) / 5) so exactly 5 cards are visible
on desktop for all scroll rows (Films, My List, Rentals, etc.),
matching the 5-column grid in filter views. Mobile stays at 200px.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:26:40 +00:00