How neosubhamoy/neodlp works
Project Type and Purpose
• NeoDLP is a cross-platform desktop application (Windows, Linux, macOS) built with Tauri (Rust) for the native side and React + TypeScript for the UI.
• It provides a modern GUI wrapper around the command-line downloader yt-dlp, uses FFmpeg for post-processing, and offers browser integration via “msghost.”
High-Level File-Structure Analysis
• Top-level:
• src-tauri/ – Rust backend, Tauri configuration, native resources (binaries, autostart, installer scripts).
• src/ – React + TypeScript frontend (UI components, pages, hooks, services for data access).
• public/ & index.html – Static assets for the web-view.
• Configuration files: tauri.conf.json, vite.config.ts, package.json, Cargo.toml.
• Key sub-directories:
• src-tauri/binaries – Bundled yt-dlp executables per OS/arch.
• src-tauri/resources – Bundled FFmpeg binaries and browser-extension manifests.
• src/components & src/pages – UI layers following component-based design.
• src/services – Abstractions over local storage (SQLite via Tauri side) and app state mutations/queries.
• src/providers – React Context providers (app context, theme, state management).
README Insights
• Confirms Tauri + Rust + React + TypeScript stack.
• External dependencies: yt-dlp (download engine) and FFmpeg (post-processing).
• Build / release pipelines for multiple platforms (GitHub Actions, Winget, AUR).
Main Components
a. User Interface (Renderer Process)
• React/TypeScript web-view (components, pages, UI state).
• Context Providers and Hooks enabling UI logic.
b. Tauri Backend (Main Process)
• Rust code (src-tauri/src/lib.rs & main.rs): IPC handlers, command invocations.
• Build scripts (build.rs) and migration code (migrations.rs).
c. External Binaries
• yt-dlp executables (bundled per platform).
• FFmpeg executables (bundled per platform).
d. Local Data Store
• SQLite database or key-value store accessed through Tauri commands (services/database.ts).
e. Auto-Updater / Installer
• Tauri autoupdate mechanism configured in tauri.conf.json.
• Platform installers (NSIS, WiX, shell scripts).
f. Browser Integration (“msghost”)
• Native extension manifests under resources/msghost-manifest.
• Handles remote control of the UI from supported browsers.
Relationships and Data Flows
• UI → Tauri IPC: front-end sends commands (download request, settings updates) via Tauri’s invoke API.
• Tauri → External Binaries: Rust side spawns yt-dlp/FFmpeg processes, streams progress back via events.
• Tauri → Local DB: writes metadata (download history, settings) to SQLite.
• Local DB → UI: queries history and settings for rendering.
• Auto-Updater: Tauri main process checks for updates, prompts UI.
• Browser → Native App: “msghost” extension sends events → Tauri backend → UI updates.
Architectural Patterns and Design Principles
• Clear separation of concerns: UI layer (React) vs. native layer (Rust).
• Componentized UI (atomic design via custom/shadcn UI components).
• IPC-based bridge (request/response + event streaming).
• Bundling of cross-platform binaries and resources.
• Use of context providers for global state.