How shouryan01/google-tasks-desktop works
Project type and purpose
• This is a cross-platform desktop application built with Tauri.
• It wraps Google Tasks in a native shell, using a lightweight web UI plus a Rust back-end layer.
• Purpose: provide an optimized, lower-resource desktop client for Google Tasks.
File structure
• Root
• package.json, bun.lockb → JavaScript/Node build dependencies for the front-end.
• src/index.html → single-page web UI entry point.
• src-tauri/ (Tauri back-end)
• Cargo.toml, Cargo.lock → Rust project metadata.
• src/main.rs → application bootstrap: spawns a webview, registers commands.
• src/lib.rs → shared logic, command handlers.
• build.rs → codegen for Tauri capabilities.
• tauri.conf.json → Tauri configuration: window settings, allowed APIs.
• capabilities/, gen/schemas/ → JSON schemas defining OS integration (menus, notifications, permissions).
README for additional insights
• No custom microservices or external back-end.
• Relies on the Google Tasks REST API (via OAuth tokens managed in the front-end or by Tauri).
• Emphasis on performance metrics vs. running in a browser.
Main components
a. Front-end Web UI
• Your HTML/CSS/JS loaded in a Tauri WebView (Chromium or WebKit engine).
• Handles user interactions, renders tasks.
b. Tauri Runtime (Rust Back-end)
• Hosts the WebView; exposes native APIs to the front-end via IPC commands.
• Manages OAuth credential storage (secure filesystem or OS keychain).
• Implements command handlers to call out to the Google Tasks REST API.
c. Google Tasks External Service
• REST endpoints for listing, adding, updating tasks.
d. build.rs + Codegen
• At build time, generates Rust bindings for Tauri capabilities and JSON schemas.
e. Packaging/Deployment
• tauri.conf.json drives bundling into macOS (.app/.icns), Windows, Linux executables.
Relationships and data flows
• API response → Tauri Runtime → IPC → Web UI (two-way flow).
• build.rs/codegen → Rust code (build-time only).
• tauri.conf.json → Packaging toolchain (build settings).
Architectural patterns and principles
• IPC boundary between untrusted UI (web tech) and trusted back-end (Rust).
• Single-page application (SPA) front-end.
• Command pattern for front-end → back-end calls.
• Codegen for capability manifests.
Technologies, frameworks, libraries
• Tauri (Rust + WebView)
• Rust toolchain (Cargo, build.rs)
• Node/Bun for front-end bundling (package.json)
• Google Tasks REST API (OAuth2 authentication)
• JSON schema definitions for capabilities.