Skip to main content
Yasumu is built on a modern, layered architecture that combines the power of Rust, TypeScript, and an embedded JavaScript runtime. This design enables a fast, secure, and flexible API development environment that runs entirely on your machine.

High-level design

Yasumu’s architecture consists of three primary layers:

Frontend layer

The user interface is built with Next.js 16 and React 19, providing a modern, responsive experience. The frontend communicates with the backend exclusively through a type-safe RPC layer, ensuring consistency and developer productivity. Key characteristics:
  • Server-side rendering disabled (static export)
  • Monaco Editor for code editing
  • TanStack Query for state management
  • Zustand for local UI state

Desktop shell layer

Tauri 2 provides the native desktop wrapper, handling OS integration, window management, and filesystem access. Written in Rust, it offers exceptional performance and security while maintaining a small binary size. Key responsibilities:
  • Native window creation and management
  • Filesystem operations
  • IPC (Inter-Process Communication) bridge
  • Auto-updates and system integration

Runtime layer

Tanxium is Yasumu’s custom JavaScript runtime built on deno_runtime. It executes all backend logic, request processing, and user scripts in a secure, sandboxed environment. Key features:
  • TypeScript support without transpilation setup
  • Pre-request and post-request scripting
  • Database management (SQLite via Drizzle ORM)
  • REST API execution engine
  • SMTP catch-all email server

Data flow

Here’s how a typical API request flows through the system:

Monorepo structure

Yasumu uses a pnpm workspace with Turborepo for efficient builds and development:
yasumu/
├── apps/
│   ├── yasumu/          # Main Tauri desktop app
│   ├── docs/            # Documentation site
│   └── www/             # Marketing website
├── packages/
│   ├── tanxium/         # JavaScript runtime bundle
│   ├── rpc/             # RPC type definitions
│   ├── core/            # Core business logic
│   ├── schema/          # Yasumu Schema Language parser
│   ├── common/          # Shared utilities
│   ├── ui/              # Shared UI components
│   └── tsconfig/        # Shared TypeScript configs
└── turbo.json           # Turborepo configuration

Apps directory

  • yasumu: The main desktop application combining Tauri + Next.js
  • docs: Documentation site (you’re reading it now)
  • www: Public-facing marketing website

Packages directory

  • tanxium: Contains the JavaScript/TypeScript code that gets bundled and embedded into the Tauri app
  • rpc: Type-safe RPC definitions shared between frontend and runtime
  • core: Core business logic for workspace management, entities, and more
  • schema: Parser for .ysl (Yasumu Schema Language) files
  • common: Shared utilities and types
  • ui: Reusable React components (built with shadcn/ui)
  • tsconfig: Shared TypeScript configuration presets

Key architectural decisions

Why Tauri?

Tauri was chosen over Electron for several reasons:
  • Smaller bundle size: Tauri apps are 10-20x smaller than equivalent Electron apps
  • Better performance: Native Rust backend with lower memory footprint
  • Enhanced security: Stricter security model with capability-based access
  • System integration: Better OS-level integration using native APIs

Why a custom runtime?

Instead of using Node.js or plain Deno, Yasumu embeds a custom runtime:
  • Complete control: Custom permissions and capabilities tailored for API testing
  • Better sandboxing: Isolate user scripts from the system
  • Single binary: No external runtime dependencies
  • Future-proof: Ability to add protocol-specific features as needed

Why the RPC pattern?

The RPC (Remote Procedure Call) layer provides:
  • Type safety: Full TypeScript support from frontend to backend
  • Decoupling: Clear separation between UI and business logic
  • Flexibility: Easy to add new commands without breaking existing code
  • Testing: Business logic can be tested independently of the UI

Performance considerations

Yasumu is designed for speed:
  • Lazy loading: UI components and features load on demand
  • Incremental builds: Turborepo caches build artifacts
  • Parallel execution: Tanxium can handle multiple requests concurrently
  • Native performance: Critical paths run in Rust

Security model

Security is built into every layer:
  • Sandboxed runtime: User scripts run in an isolated environment
  • Permission prompts: Sensitive operations require explicit user approval
  • No network access by default: Frontend can’t make arbitrary HTTP requests
  • Local-first: All data stays on your machine unless you explicitly sync it

Next steps

Explore the individual architecture components in detail:

Build docs developers (and LLMs) love