├── src-tauri ├── 2 ├── src │ ├── logger │ │ ├── mod.rs │ │ └── logger.rs │ ├── processor │ │ └── mod.rs │ ├── media │ │ ├── finalizer │ │ │ └── mod.rs │ │ ├── mod.rs │ │ ├── downloader │ │ │ ├── mod.rs │ │ │ ├── downloader.rs │ │ │ ├── thumbnail_downloader.rs │ │ │ └── default_downloader.rs │ │ ├── options.rs │ │ └── converter │ │ │ ├── mod.rs │ │ │ ├── converter.rs │ │ │ └── image_converter.rs │ ├── bootstrap │ │ ├── mod.rs │ │ └── ytdlp.rs │ ├── config │ │ ├── mod.rs │ │ ├── user_config.rs │ │ └── download_config.rs │ ├── updater │ │ ├── mod.rs │ │ ├── check.rs │ │ └── meta.rs │ ├── commands │ │ ├── mod.rs │ │ ├── update.rs │ │ ├── bootstrap.rs │ │ └── data.rs │ ├── utils │ │ ├── string.rs │ │ ├── mod.rs │ │ ├── process.rs │ │ ├── compress.rs │ │ ├── linux.rs │ │ ├── net.rs │ │ ├── directory.rs │ │ ├── serial.rs │ │ └── macos.rs │ ├── main.rs │ ├── bin.rs │ ├── lib.rs │ └── arguments.rs ├── build.rs ├── gen │ └── android │ │ ├── settings.gradle │ │ ├── app │ │ ├── src │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── vievlog │ │ │ │ │ └── windows │ │ │ │ │ └── MainActivity.kt │ │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── themes.xml │ │ │ │ │ └── colors.xml │ │ │ │ ├── xml │ │ │ │ │ └── file_paths.xml │ │ │ │ ├── values-night │ │ │ │ │ └── themes.xml │ │ │ │ ├── layout │ │ │ │ │ └── activity_main.xml │ │ │ │ └── drawable-v24 │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ └── AndroidManifest.xml │ │ ├── .gitignore │ │ └── proguard-rules.pro │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── buildSrc │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── vievlog │ │ │ └── windows │ │ │ └── kotlin │ │ │ └── BuildTask.kt │ │ ├── build.gradle.kts │ │ └── gradle.properties ├── icons │ ├── 32x32.png │ ├── icon.icns │ ├── icon.ico │ ├── icon.png │ ├── 128x128.png │ ├── 128x128@2x.png │ ├── StoreLogo.png │ ├── Square30x30Logo.png │ ├── Square44x44Logo.png │ ├── Square71x71Logo.png │ ├── Square89x89Logo.png │ ├── Square107x107Logo.png │ ├── Square142x142Logo.png │ ├── Square150x150Logo.png │ ├── Square284x284Logo.png │ └── Square310x310Logo.png ├── .gitignore ├── capabilities │ └── default.json ├── tauri.conf.json └── Cargo.toml ├── .DS_Store ├── public ├── gin.jpg ├── rust.jpg ├── .DS_Store ├── golang.jpg ├── nextjs.jpg ├── fastapi.jpg ├── og-image.jpg ├── gin_project.png ├── go_lecture.png ├── raspberrypi.jpg ├── screenshot8.png ├── screenshot9.png ├── avatars │ ├── alex.avif │ ├── jane.avif │ ├── sam.avif │ └── taylor.avif ├── courses │ ├── react.png │ ├── fullstack.jpeg │ └── javascript.png ├── nextjs_project.png ├── rust_lecture.png ├── screenshot10.png ├── screenshot11.png ├── screenshot12.png ├── screenshot13.png ├── vercel.svg ├── home │ ├── photo-1494790108377-be9c29b29330.avif │ ├── photo-1507003211169-0a1dd7228f2d.avif │ └── photo-1580489944761-15a19d654956.avif └── locales │ ├── zh-cn │ └── common.json │ ├── zh-tw │ └── common.json │ ├── ko │ └── common.json │ ├── ja │ └── common.json │ ├── am │ └── common.json │ ├── he │ └── common.json │ ├── ig │ └── common.json │ ├── ar │ └── common.json │ ├── th │ └── common.json │ ├── la │ └── common.json │ ├── fa │ └── common.json │ ├── lo │ └── common.json │ ├── af │ └── common.json │ ├── da │ └── common.json │ ├── sv │ └── common.json │ ├── ha │ └── common.json │ ├── no │ └── common.json │ ├── tg │ └── common.json │ ├── yo │ └── common.json │ ├── sr │ └── common.json │ ├── nl │ └── common.json │ ├── ps │ └── common.json │ ├── hi │ └── common.json │ ├── tr │ └── common.json │ ├── mr │ └── common.json │ ├── xh │ └── common.json │ ├── ur │ └── common.json │ ├── cs │ └── common.json │ ├── eu │ └── common.json │ ├── hr │ └── common.json │ ├── bn │ └── common.json │ ├── et │ └── common.json │ ├── is │ └── common.json │ ├── km │ └── common.json │ ├── fi │ └── common.json │ ├── sk │ └── common.json │ ├── sw │ └── common.json │ └── te │ └── common.json ├── src ├── ui │ ├── .DS_Store │ ├── components │ │ ├── .DS_Store │ │ ├── theme-provider.tsx │ │ └── layouts │ │ │ └── auth-layout.tsx │ └── primitives │ │ ├── skeleton.tsx │ │ ├── label.tsx │ │ ├── textarea.tsx │ │ ├── separator.tsx │ │ ├── input.tsx │ │ ├── avatar.tsx │ │ ├── badge.tsx │ │ ├── card.tsx │ │ └── button.tsx ├── app │ ├── favicon.ico │ ├── profile │ │ └── page.tsx │ ├── components │ │ ├── providers │ │ │ ├── Providers.tsx │ │ │ └── i18nProvider.tsx │ │ └── DevToolsDetector.tsx │ ├── auth │ │ ├── layout.tsx │ │ ├── sign-in │ │ │ └── page.tsx │ │ └── sign-up │ │ │ └── page.tsx │ ├── markdown.css │ └── page.tsx ├── utils │ └── serverI18n.ts └── lib │ ├── hooks │ └── useUser.ts │ ├── utils.ts │ └── auth-client.ts ├── postcss.config.js ├── .env.example ├── knip.json ├── .gitignore ├── components.json ├── .vscode └── settings.json ├── biome.json ├── middleware.ts ├── eslint.config.js ├── tsconfig.json ├── next.config.ts └── addons └── better.ts /src-tauri/src/logger/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod logger; 2 | -------------------------------------------------------------------------------- /src-tauri/src/processor/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod processor; 2 | -------------------------------------------------------------------------------- /src-tauri/src/media/finalizer/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod finalizer; 2 | -------------------------------------------------------------------------------- /src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/.DS_Store -------------------------------------------------------------------------------- /src-tauri/src/bootstrap/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod ffmpeg; 2 | pub mod ytdlp; 3 | -------------------------------------------------------------------------------- /public/gin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/gin.jpg -------------------------------------------------------------------------------- /public/rust.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/rust.jpg -------------------------------------------------------------------------------- /src-tauri/src/config/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod download_config; 2 | pub mod user_config; 3 | -------------------------------------------------------------------------------- /public/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/.DS_Store -------------------------------------------------------------------------------- /public/golang.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/golang.jpg -------------------------------------------------------------------------------- /public/nextjs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/nextjs.jpg -------------------------------------------------------------------------------- /src-tauri/src/updater/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod check; 2 | pub mod meta; 3 | pub mod updater; 4 | -------------------------------------------------------------------------------- /src/ui/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src/ui/.DS_Store -------------------------------------------------------------------------------- /public/fastapi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/fastapi.jpg -------------------------------------------------------------------------------- /public/og-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/og-image.jpg -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src/app/favicon.ico -------------------------------------------------------------------------------- /public/gin_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/gin_project.png -------------------------------------------------------------------------------- /public/go_lecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/go_lecture.png -------------------------------------------------------------------------------- /public/raspberrypi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/raspberrypi.jpg -------------------------------------------------------------------------------- /public/screenshot8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/screenshot8.png -------------------------------------------------------------------------------- /public/screenshot9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/screenshot9.png -------------------------------------------------------------------------------- /public/avatars/alex.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/avatars/alex.avif -------------------------------------------------------------------------------- /public/avatars/jane.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/avatars/jane.avif -------------------------------------------------------------------------------- /public/avatars/sam.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/avatars/sam.avif -------------------------------------------------------------------------------- /public/courses/react.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/courses/react.png -------------------------------------------------------------------------------- /public/nextjs_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/nextjs_project.png -------------------------------------------------------------------------------- /public/rust_lecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/rust_lecture.png -------------------------------------------------------------------------------- /public/screenshot10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/screenshot10.png -------------------------------------------------------------------------------- /public/screenshot11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/screenshot11.png -------------------------------------------------------------------------------- /public/screenshot12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/screenshot12.png -------------------------------------------------------------------------------- /public/screenshot13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/screenshot13.png -------------------------------------------------------------------------------- /src-tauri/gen/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | apply from: 'tauri.settings.gradle' 4 | -------------------------------------------------------------------------------- /src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | "@tailwindcss/postcss": {}, 4 | }, 5 | }; 6 | -------------------------------------------------------------------------------- /public/avatars/taylor.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/avatars/taylor.avif -------------------------------------------------------------------------------- /src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /src/ui/components/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src/ui/components/.DS_Store -------------------------------------------------------------------------------- /public/courses/fullstack.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/courses/fullstack.jpeg -------------------------------------------------------------------------------- /public/courses/javascript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/courses/javascript.png -------------------------------------------------------------------------------- /src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /src-tauri/src/media/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod converter; 2 | pub mod downloader; 3 | pub mod finalizer; 4 | pub mod options; 5 | -------------------------------------------------------------------------------- /src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | /gen/schemas 5 | -------------------------------------------------------------------------------- /src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /src-tauri/src/media/downloader/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod default_downloader; 2 | pub mod downloader; 3 | pub mod thumbnail_downloader; 4 | -------------------------------------------------------------------------------- /src-tauri/src/commands/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod bootstrap; 2 | pub mod data; 3 | pub mod download; 4 | pub mod update; 5 | pub mod utils; 6 | -------------------------------------------------------------------------------- /src-tauri/src/utils/string.rs: -------------------------------------------------------------------------------- 1 | pub fn clean_string_vector(v: &mut Vec) { 2 | v.retain(|s: &String| !s.is_empty()) 3 | } 4 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/home/photo-1494790108377-be9c29b29330.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/home/photo-1494790108377-be9c29b29330.avif -------------------------------------------------------------------------------- /public/home/photo-1507003211169-0a1dd7228f2d.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/home/photo-1507003211169-0a1dd7228f2d.avif -------------------------------------------------------------------------------- /public/home/photo-1580489944761-15a19d654956.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/public/home/photo-1580489944761-15a19d654956.avif -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/java/com/vievlog/windows/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.vieclone.windows 2 | 3 | class MainActivity : TauriActivity() -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # App 2 | NEXT_PUBLIC_API_URL="https://pocketbase.vietopik.com/api" 3 | BETTER_AUTH_SECRET="123" 4 | REDIS_URL ="redis://:yourpass@localhost/:6379" -------------------------------------------------------------------------------- /src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/app/profile/page.tsx: -------------------------------------------------------------------------------- 1 | import { ProfilePageClient } from "./client"; 2 | 3 | export default function ProfilePage() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /src-tauri/src/media/options.rs: -------------------------------------------------------------------------------- 1 | #[derive(Clone)] 2 | pub struct ProcessOptions { 3 | pub path_work: String, 4 | pub bin_ffmpeg: String, 5 | pub bin_ytdlp: String, 6 | } 7 | -------------------------------------------------------------------------------- /knip.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/knip@5/schema.json", 3 | "ignoreExportsUsedInFile": true, 4 | "ignoreDependencies": ["tailwindcss", "tailwindcss-animate"] 5 | } 6 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | vieclone_tauri 3 | vieclone_tauri 4 | -------------------------------------------------------------------------------- /src-tauri/src/media/converter/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod audio_converter; 2 | pub mod converter; 3 | pub mod gif_converter; 4 | pub mod image_converter; 5 | pub mod sequence_converter; 6 | pub mod video_converter; 7 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khieu-dv/vieclone/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/src/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod compress; 2 | pub mod directory; 3 | pub mod file; 4 | pub mod linux; 5 | pub mod net; 6 | pub mod process; 7 | pub mod serial; 8 | pub mod string; 9 | pub mod macos; 10 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /src/main/java/com/vieclone/windows/generated 2 | /src/main/jniLibs/**/*.so 3 | /src/main/assets/tauri.conf.json 4 | /tauri.build.gradle.kts 5 | /proguard-tauri.pro 6 | /tauri.properties -------------------------------------------------------------------------------- /src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | media_downloader_lib::run() 6 | } 7 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src-tauri/src/config/user_config.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Serialize, Deserialize, Default)] 4 | pub struct IPCUserConfig { 5 | pub valid: bool, 6 | 7 | pub ui_queue_enable: bool, 8 | 9 | pub update_notifications_enable: bool, 10 | } 11 | -------------------------------------------------------------------------------- /src/app/components/providers/Providers.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { ReactNode } from "react"; 4 | 5 | interface ProvidersProps { 6 | children: ReactNode; 7 | } 8 | 9 | export default function Providers({ children }: ProvidersProps) { 10 | return <>{children}; 11 | } 12 | -------------------------------------------------------------------------------- /src/app/auth/layout.tsx: -------------------------------------------------------------------------------- 1 | import { headers } from "next/headers"; 2 | import { redirect } from "next/navigation"; 3 | 4 | export default async function AuthLayout({ 5 | children, 6 | }: Readonly<{ 7 | children: React.ReactNode; 8 | }>) { 9 | 10 | 11 | return <>{children}; 12 | } 13 | -------------------------------------------------------------------------------- /src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue May 10 19:22:52 CST 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | tsconfig.tsbuildinfo 2 | /auth-schema.ts 3 | /node_modules 4 | next-env.d.ts 5 | .vercel 6 | .next 7 | .yarn 8 | .env 9 | /out 10 | 11 | /src-tauri/gen/android/my-release-key.jks 12 | 13 | /src-tauri/gen/android/keystore.properties 14 | 15 | # Temp files 16 | src-tauri/VieClone 17 | *.tmp 18 | *.temp -------------------------------------------------------------------------------- /src-tauri/gen/android/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = false -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /src/ui/primitives/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "~/lib/utils"; 2 | 3 | function Skeleton({ className, ...props }: React.ComponentProps<"div">) { 4 | return ( 5 |
10 | ); 11 | } 12 | 13 | export { Skeleton }; 14 | -------------------------------------------------------------------------------- /src-tauri/src/commands/update.rs: -------------------------------------------------------------------------------- 1 | use crate::updater::{ 2 | check::{check_for_updates, IPCUpdateStatus}, 3 | updater::Updater, 4 | }; 5 | 6 | #[tauri::command(async)] 7 | pub fn update_start() { 8 | Updater::new().update(); 9 | } 10 | 11 | #[tauri::command(async)] 12 | pub async fn update_check() -> IPCUpdateStatus { 13 | check_for_updates().await 14 | } 15 | -------------------------------------------------------------------------------- /src-tauri/gen/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | key.properties 17 | 18 | /.tauri 19 | /tauri.settings.gradle -------------------------------------------------------------------------------- /src/ui/components/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { ThemeProvider as NextThemesProvider } from "next-themes"; 4 | import type { ThemeProviderProps } from "next-themes"; 5 | import * as React from "react"; 6 | 7 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 8 | return {children}; 9 | } 10 | -------------------------------------------------------------------------------- /src-tauri/2: -------------------------------------------------------------------------------- 1 | 2 | up to date, audited 750 packages in 6s 3 | 4 | 225 packages are looking for funding 5 | run `npm fund` for details 6 | 7 | 12 vulnerabilities (2 low, 8 moderate, 1 high, 1 critical) 8 | 9 | To address issues that do not require attention, run: 10 | npm audit fix 11 | 12 | To address all issues (including breaking changes), run: 13 | npm audit fix --force 14 | 15 | Run `npm audit` for details. 16 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /src/utils/serverI18n.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | import path from 'path'; 3 | 4 | export const loadLocales = (locale: string) => { 5 | try { 6 | const filePath = path.join(process.cwd(), 'public/locales', locale, 'translation.json'); 7 | const fileContents = fs.readFileSync(filePath, 'utf8'); 8 | return JSON.parse(fileContents); 9 | } catch (error) { 10 | console.error(`Error loading translation for locale ${locale}:`, error); 11 | return {}; 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /src-tauri/gen/android/buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | gradlePlugin { 6 | plugins { 7 | create("pluginsForCoolKids") { 8 | id = "rust" 9 | implementationClass = "RustPlugin" 10 | } 11 | } 12 | } 13 | 14 | repositories { 15 | google() 16 | mavenCentral() 17 | } 18 | 19 | dependencies { 20 | compileOnly(gradleApi()) 21 | implementation("com.android.tools.build:gradle:8.5.1") 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src-tauri/gen/android/build.gradle.kts: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | dependencies { 7 | classpath("com.android.tools.build:gradle:8.5.1") 8 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25") 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | } 18 | 19 | tasks.register("clean").configure { 20 | delete("build") 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/app/auth/sign-in/page.tsx: -------------------------------------------------------------------------------- 1 | import { AuthLayout } from "~/ui/components/layouts/auth-layout"; 2 | import { SignInPageClient } from "./client"; 3 | 4 | export default function SignInPage() { 5 | return ( 6 | 14 | 15 | 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "", 8 | "css": "src/app/globals.css", 9 | "baseColor": "zinc", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "~/ui/components", 15 | "utils": "~/lib/utils", 16 | "ui": "~/ui/primitives", 17 | "lib": "~/lib", 18 | "hooks": "~/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } 22 | -------------------------------------------------------------------------------- /src/app/auth/sign-up/page.tsx: -------------------------------------------------------------------------------- 1 | import { AuthLayout } from "~/ui/components/layouts/auth-layout"; 2 | import { SignUpPageClient } from "./client"; 3 | 4 | export default function SignUpPage() { 5 | 6 | return ( 7 | 15 | 16 | 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /src-tauri/src/bin.rs: -------------------------------------------------------------------------------- 1 | #[cfg(target_os = "windows")] 2 | pub const YTDLP_PATH: &str = "VieClone/bin/yt-dlp.exe"; 3 | #[cfg(target_os = "windows")] 4 | pub const FFMPEG_PATH: &str = "VieClone/bin/ffmpeg.exe"; 5 | 6 | #[cfg(target_os = "linux")] 7 | pub const YTDLP_PATH: &str = "./VieClone/bin/yt-dlp"; 8 | #[cfg(target_os = "linux")] 9 | pub const FFMPEG_PATH: &str = "./VieClone/bin/ffmpeg"; 10 | 11 | // Thêm hỗ trợ cho macOS 12 | #[cfg(target_os = "macos")] 13 | pub const YTDLP_PATH: &str = "./VieClone/bin/yt-dlp"; 14 | #[cfg(target_os = "macos")] 15 | pub const FFMPEG_PATH: &str = "./VieClone/bin/ffmpeg"; -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "node_modules\\typescript\\lib", 3 | "editor.formatOnSave": true, 4 | "editor.codeActionsOnSave": { 5 | "source.fixAll": "explicit", 6 | "source.organizeImports.biome": "explicit" 7 | }, 8 | "editor.defaultFormatter": "biomejs.biome", 9 | "[markdown]": { 10 | "editor.defaultFormatter": "DavidAnson.vscode-markdownlint" 11 | }, 12 | "[html]": { 13 | "editor.defaultFormatter": "vscode.html-language-features" 14 | }, 15 | "[typescriptreact]": { 16 | "editor.defaultFormatter": "vscode.typescript-language-features" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/app/components/providers/i18nProvider.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { useEffect, useState } from 'react'; 4 | import { I18nextProvider } from 'react-i18next'; 5 | import i18n from '../../i18n'; 6 | 7 | export default function I18nProvider({ 8 | children, 9 | }: { 10 | children: React.ReactNode; 11 | }) { 12 | const [mounted, setMounted] = useState(false); 13 | 14 | useEffect(() => { 15 | setMounted(true); 16 | }, []); 17 | 18 | if (!mounted) { 19 | return null; 20 | } 21 | 22 | return ( 23 | 24 | {children} 25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /src-tauri/src/media/converter/converter.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | config::download_config::IPCDownloadConfig, 3 | logger::logger::IPCLogger, 4 | media::options::ProcessOptions, 5 | utils::directory::{create_directory, remove_directory}, 6 | }; 7 | 8 | pub trait Converter { 9 | fn new(config: &IPCDownloadConfig, options: &ProcessOptions) -> Self; 10 | 11 | fn init_dir(&self, working_dir: &str) { 12 | let _ = remove_directory(&format!("{}/convert", working_dir)); 13 | let _ = create_directory(&format!("{}/convert", working_dir)); 14 | } 15 | 16 | fn convert(&self, logger: &IPCLogger); 17 | } 18 | -------------------------------------------------------------------------------- /src-tauri/src/logger/logger.rs: -------------------------------------------------------------------------------- 1 | use serde::Serialize; 2 | use tauri::{AppHandle, Emitter}; 3 | 4 | #[derive(Clone)] 5 | pub struct IPCLogger { 6 | pub app_handle: AppHandle, 7 | } 8 | 9 | #[derive(Serialize, Clone)] 10 | struct IPCLoggerEvent { 11 | pub text: String, 12 | } 13 | 14 | impl IPCLogger { 15 | pub fn new(app_handle: AppHandle) -> Self { 16 | Self { 17 | app_handle: app_handle, 18 | } 19 | } 20 | 21 | pub fn log(&self, text: &str) { 22 | let _ = self.app_handle.emit( 23 | "log", 24 | IPCLoggerEvent { 25 | text: text.to_string(), 26 | }, 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src-tauri/src/utils/process.rs: -------------------------------------------------------------------------------- 1 | use std::{thread, time::Duration}; 2 | 3 | use sysinfo::{Pid, ProcessesToUpdate, System}; 4 | 5 | pub fn wait_for_process(pid: u32) { 6 | let mut sys: System = System::new(); 7 | 8 | let pid: Pid = Pid::from_u32(pid); 9 | 10 | loop { 11 | sys.refresh_processes(ProcessesToUpdate::Some(&[pid]), true); 12 | let still_running: bool = sys.process(pid).is_some(); 13 | 14 | if !still_running { 15 | println!("Process \"{}\" has exited.", pid.as_u32()); 16 | break; 17 | } 18 | 19 | println!("Waiting for \"{}\" to exit...", pid.as_u32()); 20 | thread::sleep(Duration::from_secs(1)); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /biome.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", 3 | "vcs": { 4 | "enabled": false, 5 | "clientKind": "git", 6 | "useIgnoreFile": false 7 | }, 8 | "files": { 9 | "ignoreUnknown": false, 10 | "ignore": ["node_modules", ".vercel", ".next"] 11 | }, 12 | "formatter": { 13 | "enabled": true, 14 | "indentStyle": "space", 15 | "indentWidth": 2, 16 | "lineWidth": 80 17 | }, 18 | "organizeImports": { 19 | "enabled": true 20 | }, 21 | "linter": { 22 | "enabled": true, 23 | "rules": { 24 | "recommended": true 25 | } 26 | }, 27 | "javascript": { 28 | "formatter": { 29 | "quoteStyle": "double" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/ui/primitives/label.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as LabelPrimitive from "@radix-ui/react-label"; 4 | import type * as React from "react"; 5 | 6 | import { cn } from "~/lib/utils"; 7 | 8 | function Label({ 9 | className, 10 | ...props 11 | }: React.ComponentProps) { 12 | return ( 13 | 21 | ); 22 | } 23 | 24 | export { Label }; 25 | -------------------------------------------------------------------------------- /middleware.ts: -------------------------------------------------------------------------------- 1 | 2 | // Middleware để xác thực người dùng 3 | // middleware.ts 4 | import { NextResponse } from 'next/server'; 5 | import type { NextRequest } from 'next/server'; 6 | 7 | export function middleware(request: NextRequest) { 8 | // Kiểm tra nếu user đã đăng nhập, nếu chưa thì tạo một user ID ngẫu nhiên 9 | const userId = request.cookies.get('userId')?.value; 10 | const response = NextResponse.next(); 11 | 12 | if (!userId) { 13 | const newUserId = Math.random().toString(36).substring(2, 15); 14 | response.cookies.set('userId', newUserId, { 15 | httpOnly: true, 16 | maxAge: 60 * 60 * 24 * 7, // 1 tuần 17 | }); 18 | } 19 | 20 | return response; 21 | } 22 | 23 | export const config = { 24 | matcher: ['/chat/:path*'], 25 | }; -------------------------------------------------------------------------------- /src-tauri/src/commands/bootstrap.rs: -------------------------------------------------------------------------------- 1 | use futures_util::join; 2 | use tauri::AppHandle; 3 | 4 | use crate::{ 5 | bin::{FFMPEG_PATH, YTDLP_PATH}, 6 | bootstrap::{ffmpeg::bootstrap_ffmpeg, ytdlp::bootstrap_ytdlp}, 7 | logger::logger::IPCLogger, 8 | utils::file::file_exists, 9 | }; 10 | 11 | #[tauri::command(async)] 12 | pub async fn bootstrap_install(app: AppHandle) { 13 | let ytdlp_logger: IPCLogger = IPCLogger::new(app.clone()); 14 | let ffmpeg_logger: IPCLogger = IPCLogger::new(app.clone()); 15 | 16 | join!( 17 | bootstrap_ytdlp(&ytdlp_logger), 18 | bootstrap_ffmpeg(&ffmpeg_logger) 19 | ); 20 | } 21 | 22 | #[tauri::command] 23 | pub fn bootstrap_check() -> bool { 24 | file_exists(YTDLP_PATH) && file_exists(FFMPEG_PATH) 25 | } 26 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import eslintReact from "@eslint-react/eslint-plugin"; 2 | import eslintJs from "@eslint/js"; 3 | import tseslint from "typescript-eslint"; 4 | 5 | export default tseslint.config( 6 | eslintJs.configs.recommended, 7 | tseslint.configs.recommendedTypeChecked, 8 | tseslint.configs.stylisticTypeChecked, 9 | { ignores: [".vercel", ".next", "dist", "build"] }, 10 | { 11 | files: ["**/*.{ts,tsx}"], 12 | ...eslintReact.configs["recommended-type-checked"], 13 | languageOptions: { parserOptions: { projectService: true } }, 14 | }, 15 | { 16 | rules: { 17 | "@typescript-eslint/consistent-type-definitions": ["warn", "type"], 18 | }, 19 | }, 20 | { 21 | files: ["**/*.js"], 22 | ...tseslint.configs.disableTypeChecked, 23 | }, 24 | ); 25 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "~/*": ["./src/*"] 23 | } 24 | }, 25 | "include": [ 26 | "next-env.d.ts", 27 | "**/*.ts", 28 | "**/*.tsx", 29 | ".next/types/**/*.ts", 30 | "eslint.config.js" 31 | ], 32 | "exclude": ["node_modules"] 33 | } 34 | -------------------------------------------------------------------------------- /next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig = { 4 | output: 'export', 5 | images: { 6 | unoptimized: true, 7 | formats: ["image/avif", "image/webp"], 8 | remotePatterns: [ 9 | { protocol: "https", hostname: "**.githubassets.com" }, 10 | { protocol: "https", hostname: "**.githubusercontent.com" }, 11 | { protocol: "https", hostname: "**.googleusercontent.com" }, 12 | { protocol: "https", hostname: "**.unsplash.com" }, 13 | { protocol: "https", hostname: "**.digitaloceanspaces.com" }, 14 | { protocol: "https", hostname: "api.github.com" }, 15 | { protocol: "https", hostname: "**.vieclone.com" }, 16 | ], 17 | }, 18 | eslint: { ignoreDuringBuilds: true }, 19 | } satisfies NextConfig; 20 | 21 | export default nextConfig; 22 | -------------------------------------------------------------------------------- /src-tauri/src/utils/compress.rs: -------------------------------------------------------------------------------- 1 | use std::fs::File; 2 | use std::io::{Read, Write}; 3 | 4 | use flate2::read::GzDecoder; 5 | use flate2::write::GzEncoder; 6 | use flate2::Compression; 7 | 8 | pub fn write_file_compressed(file_path: &str, data: &str) -> std::io::Result<()> { 9 | let file: File = File::create(file_path)?; 10 | let mut encoder: GzEncoder = GzEncoder::new(file, Compression::default()); 11 | encoder.write_all(data.as_bytes())?; 12 | encoder.finish()?; 13 | Ok(()) 14 | } 15 | 16 | pub fn read_file_compressed(file_path: &str) -> std::io::Result { 17 | let file: File = File::open(file_path)?; 18 | let mut decoder: GzDecoder = GzDecoder::new(file); 19 | let mut output: String = String::new(); 20 | decoder.read_to_string(&mut output)?; 21 | Ok(output) 22 | } 23 | -------------------------------------------------------------------------------- /src/ui/primitives/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "~/lib/utils" 4 | 5 | function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { 6 | return ( 7 |