tauri-desktop-app
v0.1.0curatedFull-stack architecture for data-driven desktop apps — Tauri v2, Hono BFF, SQLite + Drizzle, React 19 + MUI + TanStack, Bun, Moonrepo.
archgate adr import packs/tauri-desktop-appDecisions (38)
To ensure consistency and maintainability across the project, we must standardize on a primary programming language.
The project uses TypeScript as its primary language and relies heavily on external packages from the npm registry.
A Tauri desktop application is inherently composed of multiple discrete components: frontends, backends, data models, shared libraries, and potentially data jobs.
A monorepo containing multiple polyglot projects can become chaotic without a strictly enforced folder structure.
The project's technology stack is composed of multiple, independent tools, each with its own release cycle: `bun` (package manager and runtime), `node` (as a peer runtime for incompatible developme...
Code formatting is a major source of debate and developer friction.
Maintaining code quality and correctness is critical for long-term maintainability, especially in a hybrid workforce of human and AI/LLM developers, where AI-generated code must be held to the same...
In TypeScript projects, developers often configure path aliases in `tsconfig.json` to avoid long relative import paths.
In a monorepo structure with multiple TypeScript packages (backend, frontend, datamodels, desktop, jobs), managing dependency versions consistently across all packages is challenging.
Desktop applications need a native shell to wrap web-based user interfaces.
TypeScript is the primary language for general-purpose application development (backend APIs, frontend UIs, business logic).
Python projects are highly dependent on external packages from registries like PyPI.
Python's dynamic typing benefits from static type checking to catch bugs early, improve code documentation, and enable better IDE support.
Desktop applications built with Tauri benefit from a dedicated backend that serves the frontend's exact data needs.
End-to-end type safety between frontend and backend is critical for building robust, maintainable desktop applications.
To ensure consistency and maintainability for backend services, we must standardize on a clear folder structure.
Desktop applications built with frameworks like Tauri run the frontend inside a webview that loads content from a local origin (e.g., `tauri://localhost` or `https://tauri.localhost`).
Desktop applications require a database for persistent storage.
Applications need a clear, maintainable way to define data models and access the database from TypeScript code.
As applications evolve, database schemas must change to support new features, fix issues, or optimize performance.
Traditional auto-incrementing integer primary keys require the database to generate the next sequential ID, which only works when connected to the database.
Understanding when records were created and last modified is essential for debugging, data analysis, user experience (e.g., "last updated 5 minutes ago"), and synchronization in offline-first appli...
When working with Drizzle ORM and TypeScript, there is a fundamental naming mismatch between language conventions.
SQLite databases are stored as single files on the filesystem.
Desktop applications often need to import data from external services such as APIs, file exports, or third-party platforms.
Desktop applications built with Tauri render their UI in a webview, making web technologies the natural choice for building the interface.
Modern frontend applications require a build tool to transform TypeScript and JSX into browser-compatible JavaScript, bundle modules for production, provide hot module replacement during developmen...
Building a desktop application frontend requires a comprehensive component library that provides pre-built, accessible UI components for common patterns: buttons, forms, tables, dialogs, navigation...
Single Page Applications require client-side routing to manage navigation between different views without full page reloads.
Modern applications require efficient data fetching, caching, and synchronization with backend APIs.
Frontend applications require robust form handling for user input validation, state management, and submission.
Modern React applications need to manage different types of state: server state (data from APIs), UI state (component-local toggles, modals), and global client state (theme preference, sidebar open...
React components can be categorized into two types based on their responsibilities.
TypeScript provides type safety within the frontend codebase, but traditionally there is a gap between frontend and backend.
Developing UI components in isolation provides significant benefits for desktop application frontends:
Desktop applications often need to support multiple languages for their user interface.
Barrel files (also known as index files or re-export files) are `index.ts` or `index.tsx` files that re-export modules from a directory, allowing shorter import paths.
React applications can quickly become difficult to navigate without a standardized folder structure.