zudo-text

検索したい単語を入力

いつでも検索バーを開ける

Project Structure

Repository Layout

zudo-text/
├── tauri-app/           # Tauri v2 desktop app (Rust + React)
│   ├── src/             # Rust backend
│   │   ├── main.rs      # Binary entry — thin-launcher stub (release) or in-process core (dev)
│   │   ├── lib.rs       # Core library: app lifecycle, invoke_handler, generate_handler
│   │   ├── state.rs     # Native application state and local-file watchers
│   │   ├── commands/    # Tauri command handlers
│   │   ├── helpers/     # Thin re-export shims (implementation lives in core/)
│   │   └── native/      # Native features (menu, window, dialog)
│   ├── core/            # zudotext-core crate: business logic without Tauri deps
│   ├── renderer/        # React frontend (Vite + React + TypeScript)
│   ├── frontend/        # Static frontend (splash screen)
│   └── capabilities/    # Tauri security capabilities
├── packages/            # Shared workspace packages
├── doc/                 # Documentation site (zudo-doc / Astro 6)
├── scripts/             # Build utilities
├── e2e/                 # Playwright end-to-end tests
├── workers/             # Cloudflare Workers (sync + publish)
└── preview-viewer/      # Render-package preview harness

Tauri App

The app uses a pure Rust native backend — no Node.js in the main process. Cloud workspace data is accessed through the TypeScript bridge; Rust provides native OS integration and the explicitly local file surfaces.

Backend (tauri-app/src/)

  • commands/ — Tauri command handlers invoked from the frontend:

    • files.rs — Local file, asset, download, and skills-directory operations

    • settings.rs — Settings read/write

    • watchers.rs — File system watchers

    • active_note.rs, app_binding.rs, app_mode.rs, device.rs, file_search.rs, fonts.rs, generator.rs, themes.rs, window.rs, window_title.rs

  • helpers/ — Thin re-export shims pointing to the zudotext-core crate; no #[cfg(test)] code lives here

    • filename.rs, path_utils.rs, pin_path.rs, pin_tree.rs

  • core/ (zudotext-core crate) — Business logic without Tauri dependencies; all #[cfg(test)] unit tests live here:

    • helpers/filename.rs, helpers/frontmatter.rs, helpers/path_utils.rs, helpers/path_containment.rs, helpers/pin_path.rs, helpers/pin_tree.rs, helpers/watcher_dedup.rs

  • native/ — macOS native features

    • menu.rs — Application menu

    • window.rs — Window creation (splash, main)

    • dialog.rs — Native directory picker

Frontend (tauri-app/renderer/)

React application with:

  • CodeMirror — Text editor with vim mode support

  • react-markdown — Markdown preview with syntax highlighting

  • Tailwind CSS v4 — Styling

  • React Router — Page navigation

Shared Packages

All packages live under packages/ and are linked via pnpm workspace:

PackageDescription
@takazudo/app-defaultsConfig schema, defaults, and validation
@takazudo/app-scaffoldApp environment scaffold utility
@takazudo/backend-bridgeBackend abstraction layer with 3 adapters (Tauri IPC, mock, REST/HTTP)
@takazudo/code-blockMarkdown code block rendering with copy button
@takazudo/color-themesColor theme definitions and CSS variable generation
@takazudo/command-paletteCommand palette UI component
@takazudo/css-playgroundCSS playground dev tool
@takazudo/file-utilsFile system utilities (frontmatter, safe paths, filenames)
@takazudo/find-in-pageDOM-based text search for markdown preview
@takazudo/cloud-cryptoEnd-to-end encryption primitives for cloud sync
@takazudo/cloud-syncCloud sync client (WebSocket manager, change tracker, offline queue)
@takazudo/kanban-boardReact kanban board with drag-and-drop (dnd-kit)
@takazudo/kanban-parserMarkdown parser/serializer for kanban card format
@takazudo/mindmap-boardMind map board UI component with outline view
@takazudo/mindmap-parserMarkdown-based mind map data parser and serializer
@takazudo/shortcut-engineKeyboard shortcut engine with chord support
@takazudo/sync-loggerStructured logging for sync operations
@takazudo/todo-boardTODO board UI component with checkbox toggling and inline editing
@takazudo/todo-parserMarkdown-based TODO data parser and serializer
@takazudo/ui-componentsShared UI components with Storybook stories and tests

Workspace Configuration

The monorepo uses pnpm workspaces defined in pnpm-workspace.yaml:

packages:
  - "doc"
  - "tauri-app"
  - "preview-viewer"
  - "packages/*"
  - "workers/*"

Workspace packages reference each other with workspace:* in package.json:

{
  "dependencies": {
    "@takazudo/backend-bridge": "workspace:*",
    "@takazudo/ui-components": "workspace:*"
  }
}