feat: scaffold Tauri v2 + Svelte 5 project with base layout and utilities

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-21 10:45:53 -04:00
parent 95815ca6e0
commit 5cf61578ae
80 changed files with 8832 additions and 0 deletions

View File

@@ -0,0 +1 @@
// Dependency check and install commands — implemented in Task 2

View File

@@ -0,0 +1 @@
// Clip export commands — implemented in Task 12

View File

@@ -0,0 +1 @@
// Keyframe, waveform, thumbnail extraction commands — implemented in Tasks 9-11

View File

@@ -0,0 +1,4 @@
pub mod dependencies;
pub mod export;
pub mod media_analysis;
pub mod video;

View File

@@ -0,0 +1 @@
// Video resolve and download commands — implemented in Task 4/5

14
src-tauri/src/lib.rs Normal file
View File

@@ -0,0 +1,14 @@
mod commands;
mod models;
mod services;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_store::Builder::new().build())
.plugin(tauri_plugin_process::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

6
src-tauri/src/main.rs Normal file
View File

@@ -0,0 +1,6 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
tauri_app_lib::run()
}

105
src-tauri/src/models.rs Normal file
View File

@@ -0,0 +1,105 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct VideoMetadata {
pub url: String,
pub title: String,
pub duration: f64,
pub fps: f64,
pub thumbnail_url: Option<String>,
pub stream_url: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Clip {
pub id: String,
pub start_time: f64,
pub end_time: f64,
pub label: String,
pub color: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ThumbnailSpritesheet {
pub file_path: String,
pub start_index: usize,
pub count: usize,
pub thumb_width: u32,
pub thumb_height: u32,
pub columns: u32,
pub interval_seconds: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase", tag = "type")]
pub enum CookieSource {
#[serde(rename = "browser")]
Browser { browser: String },
#[serde(rename = "file")]
File { path: String },
#[serde(rename = "none")]
None,
}
impl CookieSource {
pub fn to_ytdlp_args(&self) -> Vec<String> {
match self {
CookieSource::Browser { browser } => {
vec!["--cookies-from-browser".to_string(), browser.clone()]
}
CookieSource::File { path } => {
vec!["--cookies".to_string(), path.clone()]
}
CookieSource::None => vec![],
}
}
}
impl Default for CookieSource {
fn default() -> Self {
CookieSource::Browser {
browser: "firefox".to_string(),
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase", tag = "mode")]
pub enum CutMode {
#[serde(rename = "lossless")]
Lossless,
#[serde(rename = "precise")]
Precise { format: String },
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase", tag = "scope")]
pub enum ExportScope {
#[serde(rename = "individual")]
Individual,
#[serde(rename = "merged")]
Merged,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ExportConfig {
pub clips: Vec<Clip>,
pub cut_mode: CutMode,
pub export_scope: ExportScope,
pub output_directory: String,
pub video_title: String,
pub source_file_path: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DependencyStatus {
pub name: String,
pub installed: bool,
pub version: Option<String>,
pub install_command: String,
}

View File

@@ -0,0 +1 @@
// Implemented in Task 12

View File

@@ -0,0 +1 @@
// Implemented in Task 2

View File

@@ -0,0 +1 @@
// Implemented in Task 5

View File

@@ -0,0 +1 @@
// Implemented in Task 9

View File

@@ -0,0 +1,7 @@
pub mod clip_exporter;
pub mod dependency_manager;
pub mod download_manager;
pub mod keyframe_index;
pub mod thumbnail_extractor;
pub mod video_resolver;
pub mod waveform_generator;

View File

@@ -0,0 +1 @@
// Implemented in Task 11

View File

@@ -0,0 +1 @@
// Implemented in Task 4

View File

@@ -0,0 +1 @@
// Implemented in Task 10