IndeeHub Architecture

Legacy vs Decentralized — Technology Stack, Auth, Processes & Summary of Changes

This document compares the original IndeeHub architecture (AWS, Cognito, Stripe, commercial DRM) with the decentralized prototype (Nostr, BTCPay, MinIO, self-hosted encryption). Both stacks support encryption and transcoding; the implementations differ.

Technology Stack

Layer Legacy Current (Decentralized) Summary of Changes
Auth Cognito Nostr (NIP-07, 46, 98) Replaced What: Email/password → Nostr keys (extension, remote signer, nsec).
  • Pros: No central auth provider, censorship-resistant, portable identity
  • Cons: UX learning curve for non-Nostr users
Payments Stripe BTCPay (Lightning) Replaced What: Fiat card payments → Bitcoin Lightning invoices.
  • Pros: Self-custody, no payment processor lock-in, lower fees
  • Cons: Users need Lightning wallet; fiat off-ramp complexity
Storage AWS S3 / CloudFront MinIO Replaced What: Managed S3 + CDN → self-hosted S3-compatible MinIO.
  • Pros: Full control, no AWS dependency, S3 API compatible
  • Cons: You operate storage and CDN; scaling is manual
Database PostgreSQL (RDS) PostgreSQL Replaced What: Managed RDS → self-hosted PostgreSQL.
  • Pros: Same schema, no vendor lock-in
  • Cons: You manage backups, replication, upgrades
Queue Redis + BullMQ New What: Legacy used external transcoding API; current uses BullMQ for job queue.
  • Pros: Explicit job queue, retries, progress tracking
  • Cons: Additional Redis dependency
Relay External Self-hosted nostr-rs-relay Replaced What: Third-party Nostr relay → self-hosted relay.
  • Pros: Data locality, no relay dependency
  • Cons: Relay ops and storage
Deployment AWS ECS Docker / Portainer Replaced What: Managed ECS → Docker Compose + Portainer.
  • Pros: Portable, runs anywhere, simpler ops
  • Cons: No auto-scaling; manual orchestration
Frontend React Vue 3 + Vite Replaced What: React → Vue 3 + Vite.
  • Pros: Faster builds, Composition API, smaller bundle
  • Cons: Different ecosystem, migration effort
Backend NestJS NestJS What: Unchanged. Same NestJS backend, different integrations.

Auth Flow

Step Legacy Current Summary
1 Email + password Extension, Remote Signer, or nsec User proves identity via Nostr key instead of password.
2 Cognito validates Nostr signs NIP-98 Backend verifies Nostr signature instead of calling Cognito.
3 Cognito returns JWT Backend issues JWT Backend owns JWT issuance; no third-party auth provider.
4 JWT stored JWT stored Same client-side storage pattern.

Processes

Process Legacy Current Summary of Changes
Subscription Stripe Checkout BTCPay Lightning invoice Replaced Fiat checkout → Lightning invoice. Same UX flow (redirect, webhook, activation).
Rentals Stripe BTCPay invoice Replaced Same pattern as subscriptions; payment method changed.
Zaps BTCPay → creator address New Direct tips to creators via Lightning; not present in legacy.
Encryption BuyDRM/KeyOS (Widevine/FairPlay) AES-128 HLS Replaced What: Commercial DRM → self-hosted AES-128 HLS with key server.
  • Pros: No DRM vendor, no licensing fees, full control
  • Cons: Weaker protection than Widevine; key server is single point
Transcoding External transcoding API (ECS) FFmpeg + MinIO Replaced What: AWS ECS transcoding service → self-hosted FFmpeg worker.
  • Pros: No external API, no per-job vendor cost, same HLS output
  • Cons: You run FFmpeg; scaling is manual

UI & Design

Aspect Legacy Current Summary of Changes
Framework React Vue 3 + Vite Replaced React → Vue 3 with Composition API. Vite for fast builds.
Styling CSS-in-JS / styled-components Tailwind CSS + custom classes Replaced Utility-first Tailwind; custom glass-card, hero-gradient, etc. 8px base grid.
Visual style Traditional streaming UI Glassmorphism, gradients, dark-first Replaced Semi-transparent cards with backdrop blur; hero gradient overlays; bold typography.
Colors Brand-specific (varies) #0a0a0a, #FAFAFA, #F7931A, #8E44AD Design tokens: pure black (#0a0a0a), white text (#FAFAFA), brand primary/secondary.
Layout Hero + content rows Hero + content rows + browse grid Same pattern: featured hero, horizontal content rows. Responsive browse grid (sm/md/lg).
Modals Auth, subscription, rental Auth, subscription, rental, zap, content detail, keys Expanded Added ZapModal (Lightning tips), ContentDetailModal, KeysModal (Nostr keys).
PWA Installable, offline-capable New PWA support for install-as-app on mobile/desktop.
Responsive Yes Mobile-first, 640/768/1024/1280 breakpoints Mobile-first; same content on all breakpoints; layout adapts.

High-Level Summary

Legacy relied on AWS (S3, CloudFront, RDS, ECS), Cognito, Stripe, and BuyDRM/KeyOS for encryption. Transcoding was done by an external ECS-based API. UI was React-based with traditional streaming layout.

Decentralized replaces these with self-hosted or open components: MinIO, PostgreSQL, Nostr, BTCPay, AES-128 HLS, and an FFmpeg worker. Vue 3 + Tailwind with glassmorphism, expanded modals (zaps, keys), and PWA. The trade-off is more operational responsibility in exchange for independence from proprietary services.