Version 1.2.3 – 01-12-2026
CREATOR STUDIO PORTAL, SELF-UPLOAD, CRM & REVENUE SHARE SYSTEM (MAJOR FEATURE)
* [Creator Portal / Auth] Dedicated Creator Studio Login & Self-Registration (`/creator/login`, `/creator/register`): Filmmakers and studios now have their own dedicated, secure Creator Studio portal (PBKDF2-SHA512 password hashing, encrypted HttpOnly sessions, IP rate limiting) separate from the main Admin Panel, plus a quick "Creator Studio" discovery link in the website footer.
* [Creator Studio Dashboard] Real-Time Overview & Analytics (`/creator`, `/creator/analytics`): Interactive 14-day revenue & paid unlocks charts, live coin unlock earnings ledger, per-drama conversion breakdown (Free Views vs. Paid Unlocks), active contract display, and built-in Revenue Simulator/Calculator.
* [Creator Studio Uploads] Self-Serve Drama & Bulk Episode Uploader (`/creator/series`, `/creator/series/add`, `/creator/series/[id]/episodes`): Creators can upload posters & banners, configure free preview episode counts, upload single or bulk drag-and-drop video episodes directly to configured storage (Local, S3, R2, Bunny, GCS, Backblaze), attach multi-quality sources (480p/720p/1080p) and multi-language subtitles (.vtt/.srt), and manage only their own catalog with strict ownership isolation.
* [Creator Studio Payouts & Settings] Self-Service Withdrawals & Branding (`/creator/payouts`, `/creator/settings`): Creators can upload studio avatars/logos, configure PayPal, Bank Wire (IBAN), and UPI payout channels, change account passwords, and submit atomic payout withdrawal requests directly from their studio wallet.
* [Admin Panel / Moderation] Full Creator CRM, Portal Access, Enable/Disable Toggles & Content Review Queue (`/admin/creators`): Admins can toggle the entire Creator Studio Portal ON/OFF (hiding footer links, disabling `/creator/*`, and hiding studio badges) or independently disable public registration (invite-only mode), create/manage creators, set or reset portal passwords with 1-click generator, toggle `Auto-Approve Uploads` per trusted studio, copy the Creator Studio link, approve self-registered creators in 1 click, review creator-submitted dramas in the dedicated **Content Reviews** queue (Approve & Publish or Reject with feedback reason), and settle payout requests with TxID tracking.
* [Monetization & Analytics] Independent Tracking of Free Views vs. Paid Unlocks: Upgraded stream tracking (`/api/track`) and unlock engines (`unlockEpisodeAction` & `/api/user/[uid]/unlock`) to explicitly record Free Preview Impressions (`freeViews`) separately from Monetized Episode Unlocks (`paidUnlocks`) across episodes, series, and creator portfolios, supporting both Percentage Split (`% of coin unlock revenue`) and Fixed RPM (`$ USD per 1,000 paid unlocks`).
* [Website & Admin] Creator Branding & Attribution: Displays assigned ` Studio` badges on public drama detail pages (`series-detail-view.tsx`), creator avatars/WhatsApp chat/portfolio links in Admin CRM, and moderation status badges on `/admin/series`. Public web & mobile APIs automatically hide pending or rejected creator submissions until approved.
USER AUTHENTICATION & PASSWORD RESET (FIREBASE & SMTP FIX)
* [Web / Authentication] Fixed "Firebase Service Account JSON is not configured in Admin Settings": Resolved a critical issue in `/api/auth/forgot-password` where users requesting a password reset received an error despite having configured the Service Account in Admin Settings.
* [Backend / Actions] Credential Isolation & Server-Side Settings (`data.actions.ts`): Separated client-facing settings from internal backend settings. Introduced `getGeneralSettingsInternal()` to securely retain `firebaseServiceAccount` and SMTP credentials (`smtpHost`, `smtpUser`, `smtpPassword`, `smtpPort`) for backend services while keeping client-side settings sanitized to prevent credential leaks.
* [Backend / Firebase Admin] Initialized Firebase Admin SDK with Internal Settings (`firebase-admin.ts`): Updated `getFirebaseAdmin()` to read unstripped Service Account JSON credentials via `getGeneralSettingsInternal()`, ensuring reliable server-side password reset link generation.
* [Backend / Mailer] Fixed Custom SMTP Configuration Loading (`mailer.ts`): Updated `sendMail` to load complete SMTP host, port, authentication, and encryption settings from `getGeneralSettingsInternal()`.
* [Web / Frontend] Automatic Dual-Fallback Password Reset (`auth-dialog.tsx`): Enhanced the user Forgot Password modal with a resilient dual-layer delivery system: attempts custom branded email via server-side API & SMTP, and automatically falls back to client-side Firebase Auth (`sendPasswordResetEmail`) if server delivery encounters any connectivity issues, guaranteeing users can always recover their accounts.
DRAMA COMMENTS SYSTEM & MODERATION (NEW FEATURE)
* [Multi-Platform / Feature] Full Drama Comments System: Implemented an end-to-end interactive commenting system across the Website (Next.js 15), Native Android App (Jetpack Compose), and Flutter App.
* [Admin Panel] Per-Drama Comment Control: Added an `allowComments` toggle switch in `/admin/series/edit/[id]` and `/admin/series/add` to easily enable or disable user comments on individual dramas.
* [Admin Panel] Comments Moderation Dashboard (`/admin/comments`): Added a dedicated Comments Management page to the Admin Sidebar (with `MessageSquare` icon). Admins can view all comments, view commenter details (avatar, username, email, ID), view associated drama titles with direct edit links, search/filter by drama or user, edit comment text via a modal dialog, and permanently delete comments.
* [Website] Series Detail Interactive Comments: Added a Comments button next to Like/Save/Share in the drama action bar and a complete comments section with user avatars, real-time relative timestamps, comment counter, and seamless sign-in modal triggers for guest users.
* [Android App] Material 3 Comments Bottom Sheet: Integrated `CommentsBottomSheet` across `DramaDetailScreen.kt`, `ShortsScreen.kt`, and `VideoPlayerScreen.kt`. Fixed an edge-to-edge layout issue where the Android 3-button system navigation bar (Back/Home/Recents) overlapped the comment input field by applying `navigationBarsPadding()` and `imePadding()` on a dedicated `Surface`, allowing comfortable typing above the software keyboard.
* [Flutter App] Comments Bottom Sheet: Integrated `CommentsBottomSheet` across `drama_detail_screen.dart`, `shorts_screen.dart`, and `video_player_screen.dart`.
* [Backend API] Comments Endpoints: Implemented `/api/comments` and `/api/mobile/v1/comments` (GET, POST, DELETE) with MongoDB persistence, supporting both session-based web auth and mobile API keys.
PAYMENT GATEWAY, VIP SUBSCRIPTION & IN-APP PURCHASE FIXES
* [Backend / Mobile] Fixed "Purchase verification failed" across all Payment Gateways: Resolved a critical issue where backend actions stripped payment secrets (Stripe Secret Key, PayPal Secret, Razorpay Secret, Flutterwave Secret, Cashfree Secret, PayU Salt) from memory. Introduced `getServerPaymentSettings()` to securely retain API secrets during server-side verification.
* [Cashfree] Fixed Cashfree Checkout Initialization & Mode Detection: Added dedicated hosted Cashfree v3 SDK checkout page (`/api/checkout/cashfree`) with `redirectTarget: '_self'`, safe sandbox detection (`isCashfreeSandbox()`), formatted `customer_details` validation, and MongoDB `checkout-sessions` persistence.
* [PayU / PhonePe / Flutterwave] Fixed Gateway Checkouts & Return Redirects: Implemented `/api/checkout/payu` auto-submitting hosted form with SHA-512 hash generation, query-free `/api/checkout/return/flutterwave/[packId]`, `GET/POST /api/checkout/return` handling, and decoded Base64 PhonePe S2S callbacks in `/api/webhooks/universal`.
* [Backend / Mobile] Fixed Google Play IAP & Subscription (VIP) Verification: Upgraded `/api/mobile/v1/verify-purchase` and `verifyAndExecutePurchaseAction()` to support Google Play Developer API v1, `subscriptionsv2` (`SUBSCRIPTION_STATE_ACTIVE`, `SUBSCRIPTION_STATE_IN_GRACE_PERIOD`, valid non-expired `SUBSCRIPTION_STATE_CANCELED`), and one-time `INAPP` product fallback for VIP passes, returning full `isVip`, `vipExpiry`, `type`, and `durationDays` status alongside resilient pack matching (`_id` + `googleProductId`). Updated `/api/webhooks/google-play-rtdn` with `getQueryById` and `subscriptionsv2` renewal sync.
* [Backend / Admin / Web] Enhanced Wallet & Admin Panel: Fixed search param nullability on `/[lang]/wallet`, ensured mobile `checkout` sessions resolve dynamically across reverse proxies (`resolveBaseUrl`), added `durationDays` in `/api/mobile/v1/settings`, and surfaced VIP status, expiry dates, and payment gateway details in Admin Users & Purchase History.
* [Android App] Fixed TopUp, WebView UPI Schemes & Play Billing (`TopUpScreen.kt`, `CheckoutWebViewDialog.kt`, `SnapReelsViewModel.kt`, `SnapReelsRepository.kt`, `AndroidManifest.xml`): Added Main-thread `BillingClient` safety with `enablePrepaidPlans()`, `SUBS -> INAPP` product lookup fallback, `ITEM_ALREADY_OWNED` recovery, dual-type startup subscription restoration, Room VIP sync + transaction refresh, explicit UPI `<queries>` schemes (`upi`, `tez`, `gpay`, `phonepe`, `paytmmp`, `bhim`), gateway error propagation, and nullable WebView gateway return handling.
* [Flutter App] Fixed Wallet, Gateways, IAP & Video Player Compilation (`wallet_screen.dart`, `checkout_webview.dart`, `api_service.dart`, `models.dart`): Implemented dynamic gateway selection, UPI/intent external scheme interception in `CheckoutWebView`, `isVipPack` non-consumable vs consumable Play Billing flows with `isVipActive` state syncing, and resolved pre-existing Dart analyzer errors across `models.dart`, `main_screen.dart`, `shorts_screen.dart`, and `video_player_screen.dart`.
* [Backend] Fixed `WEB_DIRECT` WebView payment redirects and Auth session state refresh (`onIdTokenChanged`).
INSTALLATION WIZARD & LICENSE ACTIVATION FIXES
* [Installation Wizard] Resilient License Verification: Resolved `Unexpected token '<', "<!DOCTYPE "... is not valid JSON` when activating licenses in Step 1 of `/install`.
* [Backend / MongoDB] Safe Database Initialization: Refactored `mongodb.ts` to prevent top-level module crashes when `MONGODB_URI` is not yet configured, enabling the installer to load and verify licenses before database setup.
* [Installation Wizard] Triple-Fallback Activation: Updated `install-wizard.tsx` with a multi-layered verification strategy: local API route -> safe Server Action fallback -> direct CORS validation against `devsnaplix-api.gadohost.com`.
* [Central Licensing API] CORS Support: Added full CORS headers (`OPTIONS`, `Access-Control-Allow-Origin: *`) to `devsnaplix-api` for seamless direct browser validation.
BUILD & SERVER DEPLOYMENT OPTIMIZATIONS
* [Next.js Build] Resolved `pages-manifest.json` ENOENT Error: Added `src/pages/_app.tsx` and `src/pages/_document.tsx` alongside Webpack compiler hooks in `next.config.ts`, ensuring Next.js 15 App Router never fails with missing `pages-manifest.json` on GadoHost, cPanel, or Docker.
* [Build Scripts] Clean Cross-Platform NPM Scripts: Removed `cross-env NODE_OPTIONS=--max-old-space-size=2048` and prebuild scripts from `package.json`, resolving `sh: 1: cross-env: not found` errors on minimal Linux servers/VPS while keeping memory optimizations inside `next.config.ts`.
CONTENT & CUSTOM PAGES FIXES
* [Website / Admin] Fixed text bunching and formatting on Custom Pages (`/p/[slug]`): Implemented structured HTML formatting (`page-formatter.ts`), line-break retention, and enhanced the Admin Custom Page Editor with an interactive toolbar (bold, lists, headings) and live preview.
COIN REWARDS & DAILY BONUS FIXES
* [Backend / Mobile] Fixed "Claim Today's Reward Bonus" failing with 401 Unauthorized: Updated `/api/user/[uid]/checkin` and `performDailyCheckInAction` to properly validate mobile requests via `X-API-Key` and Firebase Bearer tokens instead of failing on missing browser cookies.
* [Backend / Mobile] Fixed Invitation Code redemption returning "Unauthorized": Updated `/api/mobile/v1/referral/claim` and `claimReferralCodeAction` to authenticate mobile app requests and credit bonus coins to both referrer and invitee.
* [Backend / Mobile] Fixed Rewarded Ad coin claim crashing with "Failed to claim reward": Resolved a critical 500 runtime error in `/api/user/[uid]/claim` caused by an uninitialized database connection instance (`ReferenceError: db is not defined`). Users now immediately receive coins after completing rewarded video ads.
* [Backend / Mobile] Upgraded `verifyUserSession` in `auth.ts` to inspect incoming headers (`X-API-Key` and `Authorization: Bearer <token>`) ensuring seamless authentication between native mobile clients and backend actions.
DEEP LINKS & APP SHARING FIXES
* [Deep Linking] Fixed Android App Links & Direct Opening: Updated the `/share/[id]` landing page to construct Android Intent deep links so tapping "Watch in SnapReels App" directly launches the app into the corresponding drama.
* [Branding / Share] Synchronized dynamic branding on `/share/[id]`: The share page now dynamically pulls the custom Site Logo configured in Admin Panel (`/admin/settings/general`) instead of static default assets.
* [Admin / Deep Linking] Automated Digital Asset Links (`/.well-known/assetlinks.json`): Dynamically serves all configured SHA-256 app certificate fingerprints from Admin Mobile Settings (`/admin/settings/mobile`).
MOBILE EPISODE UNLOCK & AD REWARD FIXES
* [Android App] Fixed "Watch Ad to Unlock" failing with "Please try again": Replaced unsafe `context as? Activity` casting with robust `context.findActivity()` to safely unwrap Compose `ContextWrapper` / `ContextThemeWrapper`.
* [Android App] Added SDK pre-initialization (`initSdk`) before loading Rewarded and Interstitial ads in `AdsManager` to prevent AdMob silent load drops.
* [Android App] Improved AdMob error handling: The player now surfaces real diagnostic messages (e.g., No Fill, Invalid Ad ID) instead of generic error toasts.
* [Android App] Attached Firebase ID Token and added detailed HTTP error logging to `unlockEpisode()`, `claimRewardOnBackend()`, and `createCheckoutSession()` in `SnapReelsRepository`.
* [Backend / Mobile] Fixed "Unlock with Coins" failing with 401 Unauthorized: Updated `/api/user/[uid]/unlock` and `/claim` to properly authorize native mobile requests via `X-API-Key` without requiring Bearer tokens.
* [Backend / Mobile] Created shared `mobile-auth.ts` helper with multi-key fallback support to ensure seamless authentication across mobile client builds.
* [Backend / Mobile] Fixed previous episode unlock verification in `/api/user/[uid]/unlock` to accurately query both string and ObjectId episode references.
* [Backend / Mobile] Synchronized daily ad unlock limits across the unlock endpoint with Admin Panel settings (`admobRewardedLimit`).
AI & STORAGE FIXES
* [Backend] Fixed AI Generation failure across Groq, Gemini, and OpenAI: Resolved an issue where server actions stripped API keys in memory. Created `getServerPluginsSettings()` for secure backend model calls.
* [Backend] Upgraded Groq model list with dynamic active model discovery and failover to `qwen/qwen3.8-27b` and `openai/gpt-oss-120b`.
* [Backend] Fixed DigitalOcean Spaces image upload URL construction: Prevented duplicate bucket prefix injection into S3 endpoints that triggered TLS certificate mismatch errors (`ERR_TLS_CERT_ALTNAME_INVALID`).
* [Backend] Fixed Contact form Google reCAPTCHA server verification by preserving server secrets in `mailbox/send`.
Version 1.2.0 (Current Update) – 10-10-2026
NEW FEATURES & ENHANCEMENTS
* [Feature] Integrated Bunny.net Stream API backend support for multi-quality adaptive HLS streaming.
* [Feature] Premium HD Paywall: Monetize your high-quality 1080p bandwidth by requiring users to pay coins to unlock the HD stream.
* [Feature] Analytics Widget Library: Added over 30 customizable Widgets in Admin Analytics for advanced real-time data tracking and charting.
* [Feature] Universal Webhook System: Added automated webhook endpoints for Stripe, PayPal, Razorpay, Flutterwave, Cashfree, and PayU to automatically credit users for background payments.
* [Feature] Google Play RTDN: Integrated Google Play Real-Time Developer Notifications to handle automatic VIP subscription renewals in the background.
* [Feature] Restore Purchases: Added automatic purchase syncing to the Android App to restore active VIP subscriptions upon app launch.
* [Feature] Deep Linking & App Links: Added support for Multiple Android SHA-256 App Certificate Fingerprints in the Admin Panel for flawless deep linking.
UI / UX IMPROVEMENTS
* [UI/UX] Redesigned the Website Series Detail page with a sticky backdrop-blurred navbar, collapsible "Read More" synopsis, and horizontal scrollable episodes for a better mobile experience.
* [UI/UX] Added sleek hover animations for genre tags, episode padlock overlays, and scale animations for primary action buttons on the Website.
* [UI/UX] Added a sleek, modern custom scrollbar for horizontal episode lists on desktop browsers.
* [UI/UX] Added Cashfree, PhonePe, and PayU payment method logos to the Android App and Flutter App with perfectly uniform rounded designs.
NATIVE ANDROID & FLUTTER UPDATES
* [Android App] Configured ExoPlayer with HlsMediaSource to correctly parse and stream secured multi-quality HLS m3u8 playlists.
* [Android App] Added a new "1080p Upgrade" overlay button inside the Native Video Player when HD is locked.
* [Flutter App] Upgraded Flutter Android build configuration to SDK 36 and integrated HD premium overlay features.
* [Flutter App] Updated configuration for Envato compliance (removed hardcoded Firebase keys/URLs, replaced default placeholder tests, updated README).
BUG FIXES
* [Backend] Created an HLS proxy API route using Google Identity Toolkit to securely sign and manipulate Bunny .m3u8 manifests dynamically based on HD unlock status.
* [Backend] Fixed a major checkout issue where selecting Cashfree, PhonePe, or PayU would display a "No Payment Methods" error on the wallet page.
* [Backend] Fully implemented real API Session Generation for Cashfree Orders, PhonePe Checksum / X-VERIFY, and PayU HTML Forms.
* [Android App] Fixed a critical issue where Google Play IAP successfully charged the user but failed to credit coins. The app now strictly sends the purchaseToken for backend validation.
* [Android App] Fixed a bug in the Checkout WebView where PayU's auto-submitting base64 URIs failed to load.
* [Android App] Fixed a massive memory leak in TopUpScreen where Google Play BillingClient connections were not being properly closed.
* [Android App] Fixed compilation errors by migrating legacy MediaType.parse and RequestBody.create network calls to OkHttp 4 extension functions.
* [Android App] Restored missing isHdUnlocked logic to properly support 1080p HD episode unlocking.
* [Flutter App] Fixed massive UI rebuild loops and performance issues in home_screen.dart and video_player_screen.dart.
* [Flutter App] Fixed API error swallowing in the network layer to ensure proper error messages are displayed to users.
* [Mobile Apps] Fixed an issue where the device screen would turn off (Sleep Mode) while watching long videos by enforcing Screen Wakelock during playback.
* [Mobile Apps] Fixed an issue where the Like button icon would turn red but the like count would incorrectly remain at 0 by implementing optimistic UI updates.
* [Mobile Apps] Re-enabled internal views tracking and synchronized the "Top 10 / Most Viewed" sorting logic to update based on real user watch counts.
* [Website] Fixed an issue where the WebVTT subtitle track was obscured by custom video controls by adjusting vertical offset and adding a translucent background.
* [Website] Fixed a routing bug when selecting a language, replacing hard reloads with Next.js SPA router transitions.
* [Website] Fixed a mobile responsiveness issue where long titles caused horizontal overflow and broke the layout.
* [Website] Added missing ARIA labels and alt tags across the Header, Footer, and Video Player to improve accessibility and SEO compliance.
* [Website] Fixed an issue where the "GET THE APP" title in the footer would still appear when Store links were left empty in the Admin settings.
Version 1.1.9 (Current Update) – 16-09-2026
=== [NEW FEATURES & MAJOR ADDITIONS] ===
* [Feature - Video Player Watermark Overlay System (Web & Native Android)] Implemented a comprehensive brand protection and logo watermark system across the Admin Panel, Web Video Player, and Native Android App:
* **Admin Panel Settings (`/admin/settings/general`)**: Dedicated controls to toggle the watermark ON/OFF, upload transparent PNG/WEBP/SVG logos with instant live preview and single-click removal.
* **Customizable Placement**: 4-position selector allows positioning the watermark in any corner (Top Right, Top Left, Bottom Right, Bottom Left).
* **Adjustable Opacity**: Configurable transparency levels (100% Solid, 80% Recommended, 60% Subtle, 40% Ghost) ensuring an optimal balance between brand visibility and viewing immersion.
* **Web Video Player Overlay**: Dynamically positioned overlay on top of the web player container with non-blocking pointer events (`pointer-events-none`) for uninterrupted scrubbing and player controls.
* **Native Android Jetpack Compose Integration**: Seamless Coil `AsyncImage` overlay implemented in both `VideoPlayerScreen.kt` and `ShortsScreen.kt`, respecting safe window insets, camera cutouts, and bottom playback controls.
* [Monetization - Google AdMob App Open Ads (On App Launch)] Integrated high-converting AdMob App Open Ads to maximize publisher revenue upon app launch:
* **Admin Mobile Settings (`/admin/settings/mobile`)**: Added dynamic App Open Ad controls under the Google AdMob configuration section with real-time toggle and Ad Unit ID field.
* **Mobile API Delivery**: Automatically synchronized to mobile devices via `/api/mobile/v1/settings`.
* **Native Android Integration**: Implemented in `AdsManager.kt` and triggered in `MainActivity.kt` using Google Play Services Ads SDK `AppOpenAd`, presenting an ad on application launch once remote configurations are fetched.
* [Feature - Referral & Invite Friends Viral Growth Engine] Implemented an end-to-end viral growth referral system across both Web Platform and Native Android App:
* Each registered user automatically receives a unique referral code (`SNAP-<UID>`) upon registration.
* Integrated a modern, high-converting Referral & Invite Card directly in the Web Wallet page and the Android App (`RewardsScreen`) with 1-tap clipboard copying, native Android system Share Sheet / WhatsApp fallback, and real-time invite analytics (Friends Invited, Total Coins Earned).
* Interactive invite code redemption modal allowing new users to redeem friend codes and instantly receive configurable bonus coins.
* Added dedicated Admin Settings controls (`/admin/settings/general`) to enable/disable the referral system, customize Inviter reward coins, and configure Invitee welcome bonus coins.
* Full transaction auditing: logs distinct `referral` ledger transactions for both inviter and invitee in MongoDB.
* [Feature - Dynamic Social Share Landing Page & Rich Previews] Created an intelligent social sharing landing page (`/share/[...slug]`) with cinematic presentation and responsive design:
* Dynamic OpenGraph and Twitter card metadata generation (`generateMetadata`) displaying high-resolution movie posters, rating ⭐, total episodes, genre chips, and synopsis when shared across WhatsApp, Facebook, X/Twitter, and Telegram.
* Smart action buttons:
* **Watch in SnapReels App**: Uses Chrome Intent URI (`intent://drama/{id}...`) to launch the installed Native Android App directly to the series, or gracefully redirects to the Google Play Store if the app is not installed.
* **Watch on Website**: One-tap link to stream directly via the web player (`/[lang]/series/[id]`).
* **Apple App Store**: Dedicated badge redirecting iOS users to the App Store.
* Configured Next.js `middleware.ts` to bypass i18n locale rewrites for `/share` paths, guaranteeing 100% resolution without 404 errors.
* [Mobile - Android Native Deep Linking Engine] Implemented end-to-end deep linking integration across the Native Android application:
* Configured `AndroidManifest.xml` with `singleTask` launch mode and intent filters supporting both custom schemes (`snapreels://drama/...`, `snapreels://share/...`) and HTTPS URLs (`https://.../share/...`).
* Added intent resolution in `MainActivity.kt` and `SnapReelsViewModel.kt` to parse incoming drama IDs and automatically navigate users directly to the Series Details & Player screens on link click.
* [Payment Gateways - Multi-Gateway Expansion (PhonePe, Cashfree, PayU)] Added full integration for PhonePe, Cashfree, and PayU payment gateways across the Admin Panel (`/admin/settings/payment-gateway`), backend checkout endpoints (`/api/checkout`, `/api/user/...`), web wallet, and Android Native App:
* Added dynamic controls in Admin Panel to toggle ON/OFF and configure Merchant IDs, Secret Keys, and logos.
* Extended `/api/mobile/v1/settings` API endpoint to deliver real-time gateway configurations to mobile clients.
* Android Native App dynamically displays checkout buttons for active gateways based on live server settings.
* [Feature - Episode Subtitles & Multi-Language Closed Captions (.vtt / .srt)] Added native support for multi-language subtitles and closed captions across episodes on both Web and Android Native apps:
* Administrators can easily attach subtitle tracks directly from the Episode Manager (`/admin/series/[id]/episodes`) by selecting from preset languages or entering custom language codes, via direct `.vtt`/`.srt` uploads or external URLs.
* Dedicated `/api/subtitles` endpoint with on-the-fly SRT to WebVTT conversion: automatically injects the `WEBVTT\n\n` header and converts comma timestamps (`00:00:01,000` -> `00:00:01.000`), ensuring 100% compliance with Media3 ExoPlayer specifications.
* Built custom high-contrast Compose Subtitle Overlays (pill background with bold white text) in both `VideoPlayerScreen.kt` and `ShortsScreen.kt`, listening directly to ExoPlayer's `onCues()`, ensuring crisp, legible captions regardless of device OS accessibility settings or control visibility.
* Interactive Subtitles `[CC]` toggle and language selection dropdown menu directly within `VideoPlayerScreen` and `ShortsScreen`.
* [Feature - Bulk Episodes Video Uploader] Introduced a high-productivity Bulk Episodes Video Uploader in the Admin Panel (`/admin/series/[id]/episodes`):
* Drag-and-drop dozens of video files at once (`.mp4`, `.mov`, `.webm`, `.mkv`, `.m3u8`, `.ts`) with intelligent natural numeric sorting (preventing alphabetical 1, 10, 2 ordering bugs).
* Automatic sequential episode numbering with customizable starting episode index.
* Throttled parallel worker uploads (2 concurrent streams to protect server bandwidth) with real-time progress bars per episode and overall queue.
* Automated single-batch database indexing with total episode count synchronization.
* [AI Engine - Google Gemini 2026 Upgrade & Multi-Model Suite] Upgraded Google Gemini AI engine to modern 2026 production models:
* Added support for `gemini-2.5-flash`, `gemini-3.5-flash`, and `gemini-3.8-flash` (with `gemini-flash-latest` and `gemini-2.5-pro` fallback) with automatic zero-downtime failover to absorb Google 503 high-demand and 429 rate limit spikes.
* Integrated OpenAI flagship models (`gpt-4o`, `gpt-4o-mini`, and `o3-mini`) with dynamic failover for structured drama metadata generation and high-precision translations.
* Added Groq multi-model engine (`qwen/qwen3.8-27b`, `llama-3.3-70b-versatile`, `llama-3.1-8b-instant`, `openai/gpt-oss`) with high-throughput OTPM rate-limit batching.
* Redesigned AI settings in `/admin/settings/plugins` with transparent model selection labels, live model badges, and an interactive "Test Connection" diagnostic button.
* [Admin Panel - Mobile App Share & Deep Links Settings] Added a dedicated "Share Page & Deep Links" configuration tab under `/admin/settings/mobile`:
* Empowers administrators to customize the Android package name (`com.snapreels.devsnaplix`), Google Play Store URL, and Apple App Store URL directly from the dashboard.
* Allows toggling individual buttons (Watch in App, Watch on Web, App Store) on or off in real-time.
* Extended `/api/mobile/v1/settings` API endpoint to deliver real-time share configurations to all client platforms.
=== [STREAMING ENGINE, SHORTS & PLAYER ENHANCEMENTS] ===
* [Streaming Engine - Universal HLS (.m3u8) & MPEG-TS (.ts) Web & Mobile Playback] Resolved playback limitations for HLS streams and direct MPEG-2 Transport Stream (`.ts`) video files across both Web and Android Native:
* **Server Access Security Normalization**: Updated Next.js `middleware.ts` and `/api/serve-uploads/[...path]` route to safely allow direct streaming of `.m3u8`, `.ts`, `.m4s`, and `.mpd` files without 403 Forbidden interruptions, adding HTTP 206 Partial Content Range support and full CORS headers.
* **Dynamic Virtual HLS Manifest Generator**: Created `/api/hls` endpoint that dynamically wraps any direct `.ts` video into an RFC-8216 compliant single-segment HLS playlist (`#EXTM3U ... #EXTINF: ... video.ts ... #EXT-X-ENDLIST`), enabling standard web browsers without native TS support to play TS streams seamlessly.
* **Web Player HLS Engine**: Integrated and bundled `hls.js` (v1.7.3) directly into the Next.js web player (`series-detail-view.tsx`) with automatic `.ts` detection, URL rewriting, and low-latency buffer tuning.
* **Android Native ExoPlayer Stream Engine**: Added official `androidx.media3:media3-exoplayer-hls:1.5.1` and `media3-exoplayer-dash:1.5.1` dependencies. Updated `VideoPlayerScreen.kt` and `ShortsScreen.kt` to load `.m3u8` streams via `HlsMediaSource.Factory(VideoCacheManager.getHttpDataSourceFactory())` with chunkless preparation, and configured `.ts` streams with explicit `MimeTypes.VIDEO_MP2T` for direct hardware decoding.
* **URL Normalization**: Guaranteed all relative video URLs (e.g. `/uploads/videos/...`) automatically resolve with the configured backend base domain across Android API parsers.
* **Subtitle Synchronization & De-duplication**: Resolved duplicate subtitle track entries and synced multi-language subtitle tracks seamlessly between the Web Player and Native Android Compose captions overlay.
* [Mobile Shorts - Randomized Multi-Episode Feed, High-Concurrency Loading & Instant Display] Completely re-architected the Shorts video feed to eliminate the "No Shorts available" stall and deliver instant, randomized ("3achwa2i") video streams:
* Replaced sequential blocking awaits with fully independent, concurrent coroutine workers across all candidate dramas (`launch(Dispatchers.IO)` with OkHttp 32-request concurrency pool).
* Engineered progressive unblocking: as soon as the very first candidate drama resolves its episodes (~100ms), it immediately populates the feed and dismisses the loading spinner so playback begins instantly without waiting for other dramas.
* Implemented a multi-tier catalog fallback chain: if the user's active language returns 0 series, the system automatically falls back to English, and then to all available dramas, guaranteeing the Shorts feed is never empty regardless of device locale.
* Added two-tier persistent disk caching (`snapreels_cache`) for both the aggregated Shorts playlist and individual drama episode lists, enabling instant 0ms startup on subsequent visits.
* Randomized episode selection: dynamically samples random distinct episodes from each drama's pool rather than repeating Episode 1, continuously shuffling the feed for fresh content.
* Hardened JSON parsing in `SnapReelsRepository.kt` with `optString`/`optInt` and format guards, preventing empty state triggers.
* [Mobile Performance & Stability - Shorts Playback Engine & Tab Transitions]:
* Eliminated tab-switching playback freeze by removing the restrictive `isHomeActive` state constraint, allowing ExoPlayer to transition smoothly between app tabs.
* Added per-request timeout safety and strict video URL validation to filter out HTML iframe/embed tags that cannot be parsed by native ExoPlayer.
* Integrated automated prefetch on mount (`LaunchedEffect`) and an empty state fallback with an interactive "Retry" button.
* Added `onPlayerError` listener in `ShortsPageItem` to immediately dismiss buffering spinners and recover from network drops.
=== [SECURITY, STABILITY & UI/UX OPTIMIZATIONS] ===
* [Mobile UI/UX - Camera Notch & Top Cutout Insets] Adjusted Home screen top header padding to safely accommodate front-facing camera cutouts (punch-hole and teardrop notches). Replaced zero-inset immersive top spacing with an ergonomic 36.dp safe buffer, ensuring logo, coins, rewards, and search buttons never overlap device camera hardware.
* [Mobile Security & Stability - Global Guest Authentication Guards] Hardened all user-data interactive triggers across the Native Android application:
* Integrated proactive login redirection (`navController.navigate("login")`) when unauthenticated guests tap Header Coins, Header Rewards, Hero Carousel Bookmarks, "Top Up" wallet buttons, "Join VIP" pass buttons, "Earn Rewards" tasks, locked episodes in the episode selector, or attempt to unlock episodes in `VideoPlayerScreen` and `DramaDetailScreen`.
* Guarded `TopUpScreen` and `RewardsScreen` with reactive auth observers to prevent unauthenticated guests from ever entering transactional or reward state flows, eliminating crashes and inconsistent states.
* [Rewards & Anti-Cheat System] Implemented intelligent Lifecycle & Visibility detection for Social Media and External Link tasks across both the Android App and React Web App:
* If a user returns or switches tabs before the required duration (e.g., 15s on Facebook/Instagram), the timer automatically cancels and prevents unfair coin claiming.
* Added an interactive "Task Incomplete" warning dialog in the Android App that clearly displays how many seconds the user stayed versus the required duration, featuring a 1-tap "Continue Task" button to resume and complete the task seamlessly.
* Hardened One-Time Task Claiming with instant local SharedPreferences caching and remote database synchronization, ensuring claimed tasks permanently disappear and can never be re-farmed or re-claimed by the same user.
* Added full multi-language translations for the new Task Incomplete dialog system across English, Arabic (`values-ar`), Hindi (`values-hi`), and Simplified Chinese (`values-zh`, `values-zh-rCN`).
* Integrated HTML5 Page Visibility API on Web Rewards page to ensure users remain focused on sponsored links for the full duration.
* [Mobile Performance & 60/120fps Scrolling Optimization] Conducted an end-to-end performance audit and optimization on the Native Android App (Kotlin / Jetpack Compose) to guarantee smooth 60/120fps browsing:
* Created `SnapReelsApplication` implementing Coil's `ImageLoaderFactory` with a dedicated dual-layer caching engine: 25% allocated device RAM MemoryCache, 250MB persistent DiskCache (`cacheDir/image_cache`), `respectCacheHeaders(false)` (preventing repeated network requests when scrolling past posters), and hardware bitmap acceleration.
* Eliminated heavy GPU render-effect stutter on scrolling by removing `Modifier.blur(50.dp)` from the dynamic home backdrop, replacing it with a fluid alpha-gradient scrim.
* Removed `BoxWithConstraints` subcomposition from `HomeSeriesSection`, preventing expensive remeasurement passes on each scroll event.
* [Admin Panel Stability & Documentation Setup]:
* Configured dynamic server rendering across Admin panel layout to prevent Next.js dynamic server usage errors on production deployments.
* Updated `Documontation/android.html` with step-by-step setup for OneSignal Push Notifications on Android, clarifying Firebase Admin SDK configuration under **Settings > Authentication** and OneSignal App ID setup.
Version 1.1.8 (Current Update) – 07-09-2026
* [Mobile UI/UX] Redesigned Android Home Page Hero Carousel to a vertical portrait format (3:4 ratio) displaying the drama "Poster / Cover Image" (`coverUrl`) instead of wide landscape banners, perfectly matching commercial short-drama apps like DramaBox and ReelShort.
* [Mobile UI/UX] Added dynamic cinematic ambient lighting behind the Hero Carousel that dynamically blurs and glows with the colors of the active drama poster.
* [Mobile UI/UX] Added dedicated "Top 10 Rankings" section featuring stylized giant ranking numbers (Gold #1, Silver #2, Bronze #3) overlapping each poster card.
* [Mobile UI/UX] Configured true full-screen immersive mode across the entire app with auto-hiding system navigation and status bars (`BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE`), eliminating bottom/top black letterboxing.
* [Mobile UI/UX] Removed the hardcoded 9.2 rating badge from the Featured hero carousel cards.
* [Mobile UI/UX] Completely revamped Series Details & Info page: removed hardcoded 4.8 rating, introduced high-contrast cinematic backdrop, localized metadata pills (HD, Episodes, Year), expandable synopsis, and fast "My List" & native Share buttons.
* [Mobile UI/UX] Cleaned up episode list titles to eliminate repetitive labels (e.g., duplicate "Episode 1 / Episode 1").
* [Mobile UI/UX] Streamlined Home Page layout by removing the redundant 4-card Quick Actions Bar (Rankings, Rewards, Coins, Shorts) for a cleaner, modern streaming aesthetic.
* [Mobile Performance] Fixed Home Page startup latency by implementing an instant Cache-First architecture with local SharedPreferences, completely removing artificial delays so the app loads in 0ms.
* [Mobile Fix] Fixed false "Check your internet connection" error when selecting empty categories: correctly distinguishes true network failures from empty filters, and automatically hides empty categories from the filter chips.
* [Mobile Localization] Completed 100% translation of all Android app strings for Hindi (`values-hi`) and Simplified Chinese (`values-zh`, `values-zh-rCN`), eliminating previous untranslated English fallbacks.
* [Mobile Localization] Added multi-language Category & Genre translation engine (`CategoryTranslator`) supporting English, Arabic, Simplified Chinese, and Hindi with automatic cross-lingual matching.
* [Mobile Fix] Fixed Android language switcher locale tag parsing for regional codes (such as `zh-CN`) to guarantee immediate UI language changes without app reload.
* [Mobile Feature] Integrated direct playback ("Watch Now"), 1-tap Watchlist bookmarking, and Series Details navigation directly on the Hero Carousel cards.
* [Mobile Performance] Replaced remote login background loading with an offline local drawable asset, completely eliminating network latency and white flashes on Sign-In.
* [Feature] Added full support for dynamic Multi-Payment Gateways: PhonePe, Cashfree, and PayU.
* [Feature] Added Payment Gateway controls to the Admin Panel to toggle ON/OFF and configure API Keys for PhonePe, Cashfree, and PayU dynamically.
* [Feature] The Android Native App now dynamically displays checkout buttons for the newly added payment methods based on real-time server settings.
* [Feature] Added UI options and automatic processing for PhonePe, Cashfree, and PayU in the React Web Frontend Wallet Checkout.
* [Performance] Implemented Server-Side Caching (Incremental Static Regeneration) on Home and Series Pages, completely eliminating slow TTFB and causing pages to load instantly.
* [Performance] Fixed severe FCP (First Contentful Paint) and CLS (Cumulative Layout Shift) issues by migrating from render-blocking Google Fonts links to optimized Next.js native fonts.
* [Performance] Created a robust MongoDB indexing script to supercharge database searches, filters, and episode loading for large catalogs without altering existing customer databases.
* [Security] Patched a critical backend vulnerability by enforcing rigorous Admin Session Verification (`verifyAdminSession`) across 36 Next.js Server Actions to prevent unauthorized API mutations.
* [Fix] Fixed an issue where the Installation Wizard was blocked at Step 4 ("Save & Continue") due to admin session enforcement before the admin account was created. Added dedicated `installSaveSiteConfigAction` with installation-state validation and robust error recovery.
* [Documentation] Added comprehensive Server & Hardware Environment Requirements (Node.js 18/20 LTS, MongoDB 5+, RAM, CPU, Storage, and 0% PHP clarification) to documentation and CodeCanyon listing metadata so buyers can evaluate environment compatibility before purchasing.
* [Documentation & Mobile] Replaced real/ambiguous API credentials in `AppConfig.kt` and `android.html` with clean placeholders (`YOUR_DOMAIN_HERE`, `YOUR_API_KEY_HERE`) accompanied by detailed guidance for locating and generating secret keys in Admin Panel (Settings > Mobile App).
* [Documentation] Fixed responsive layout and sidebar overlap bug in `admin_guide.html` and across all documentation pages using modern sticky-flex CSS architecture.
* [Documentation] Added 5 high-resolution authentic admin UI demonstration screenshots (admin_add_series.png, admin_add_episode.png, admin_coin_packs.png, admin_payment_gateways.png, admin_user_history.png) with 100% verified asset references and zero missing images.
Version 1.1.7 (Upcoming Update) - 21-08-2026
----------------------------------------
* [Feature] Added new App Store and Google Play Store download badges to the website footer.
* [Feature] Automated IndexNow SEO ping to Bing/Yandex whenever a drama series is published or edited.
* [Feature] Added a Search Bar to the Users Admin Panel to quickly find accounts by Name, Email, or ID.
* [Security] Implemented IP Rate Limiting to prevent automated bot spam on the user registration endpoints.
* [Fix] Fixed an issue with Custom Pages (like Privacy Policy) not showing in the website footer.
* [Fix] Fixed a bug preventing the Sendmail configuration from saving properly in Security Settings.
* [Mobile App Update] Upgraded Google Play Billing Library to version 9.1.0 to comply with Google Play's mandatory policies (August 2026 requirement) and support the latest monetization features.
* [Feature] Added a completely new, polished First-Time Onboarding Experience (Welcome Slides, Feature Highlights, Language Selection) for new Android app users.
* [Fix] Fixed layout glitches when switching to the Arabic language (Right-to-Left Layout is now correctly enforced instantly without app restart).
* [Fix] Added missing Arabic translations for all the new onboarding interface elements.
* [Fix] Resolved a critical backend issue that crashed the Password Reset functionality due to improper parsing of the Firebase Admin Service Account JSON.
Version 1.1.6 (Current Update) – 12-08-2026
* [Feature] Added IndexNow API integration to the Admin Panel (Settings > Plugins) for instant search engine indexing.
* [Feature] The IndexNow API Key is served dynamically via middleware, requiring no manual server restarts (PM2) after generation.
* [Fix] Added automatic cleanup for the old IndexNow `.txt` file in the `/public` directory when generating a new key.
* [Fix] Resolved an issue with Groq Cloud AI integration in the admin panel.
* [Fix] Fixed user management bugs in the Admin Panel to ensure proper data handling.
* [Fix] Resolved an authentication issue that was creating malformed accounts (e.g., `dev_uid@snapreels.gadohost.com`).
* [Doc] Added Architecture Overview and End-User Experience sections to the main documentation index.
* [Doc] Reorganized the Admin Guide into detailed walkthroughs for Content, Monetization, and User Management.
* [Doc] Added comprehensive instructions for setting up Firebase Cloud Messaging (FCM) Push Notifications for Android.
* [Doc] Fixed step numbering and removed duplicate configuration steps in the Android App Setup guide.
* [Doc] Added specific troubleshooting steps for "Video Player Retrying Connection / Spinning Forever" issues.
* [Doc] Added a critical "Pre-Upgrade Backup" step to the Upgrade & Migration Guide.
* [Security] Removed sensitive plain-text admin credentials from the demo environment and public documentation.
Version 1.1.5 (Current Update) – 06-08-2026
* [Feature] Added full support for HLS (`.m3u8`) video streaming, allowing direct loading from external servers without heavy proxy buffering.
* [Feature] Upgraded the Admin Panel upload validation to detect and support `.m3u8` and `.ts` chunk files with correct `application/x-mpegURL` MIME types.
* [Mobile App Update] Replaced the legacy `VideoView` with Google's modern `ExoPlayer` in the Android App's Shorts feed, resolving buffering delays and adding `VideoCacheManager` background caching support.
* [Mobile App Update] Fixed an issue where Embed Videos would restart from the beginning when the device orientation (rotation) was changed by enabling configuration state persistence in `AndroidManifest.xml`.
* [Fix] Fixed an issue with Phone Authentication where the generated user email and display name would default to the long 28-character Firebase UID. It now intelligently generates a clean 8-digit random ID (e.g., `45849065@snapreels.com`).
Version 1.1.4 (Current Update) - 31-07-2026
----------------------------------------
* [Feature] Added Phone Number Authentication (OTP Login) support across both the Web Application and the Android App.
* [Feature] Added "Forgot Password" and secure password reset workflows for Admin users.
* [Feature] Added "Forgot Password" and secure password reset workflows for regular App users.
* [Feature] Introduced Rate Limiting controls in `/admin/settings/security` including "Max Failed Logins per IP / Day" (Number of incorrect attempts before blocking the IP address for 24 hours) and "Max Password Resets / Day" to prevent brute-force and spam attacks.
* [Mobile App Update] Fixed an issue where Embed Videos were not playing correctly in the Android App by improving the native WebView player fallback.
* [UI/UX] Renamed "Mail Configuration" to "Security" in the Admin Panel and updated its URL slug/link references for better clarity and alignment with Firebase Service Account inputs.
* [Feature] Added dynamic default login credentials to the Admin Panel (`/admin/login`) that automatically populate only when `NEXT_PUBLIC_DEMO_MODE` is enabled.
* [Fix] Fixed an issue where the Admin Panel sidebar was incorrectly rendering on authentication pages (Forgot Password, Reset Password) by updating the `AdminLayoutShell` routing exclusions.
* [Fix] Resolved an `ESOCKET` TLS connection error preventing system emails from being sent (e.g. Password Resets) on shared hosts like cPanel by configuring the SMTP Mailer to allow self-signed certificates.
* [Fix] Fixed an issue where the "Login with Phone" button was missing from the Android App by adding `phoneLoginEnabled` to the mobile API settings synchronization endpoint.
* [Fix] Resolved the "Invalid Firebase Service Account JSON" error encountered when sending OTPs or Password Reset links by implementing a defensive regex parser that automatically fixes unescaped newlines (`\n`) introduced during copy-pasting into the Admin Panel.
* [Fix] Fixed a bug where the Firebase Service Account JSON field would sometimes fail to save in the Admin Panel Settings by ensuring it is properly tracked in the React Hook Form default values and backend allowlist.
* [Fix] Fixed a UI glitch in the Web App Authentication Modal where the phone number would get stuck in the OTP input field by resolving React DOM reconciliation key collisions.