AstrBot-Desktop/docs/decisions/ADR-0001-p00-root-workspace-layout.md
YokiiroBW 353a439b41
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
docs(p00): record spike results and unresolved boundaries
2026-07-18 21:00:49 +08:00

36 行
1.7 KiB
Markdown

# ADR-0001: Use a Root-Level Desktop Application for P00
- Status: Accepted
- Date: 2026-07-18
- Scope: Repository layout and build orchestration
## Context
The architecture document illustrates a future monorepo with the desktop application under apps/desktop. The predevelopment workflow separately recommends root-level src and src-tauri directories. P00 has one product application plus supporting protocol and Mock Gateway packages, so an additional application directory would add path and command complexity without isolating a second deployable application.
## Options considered
1. Put the desktop application under apps/desktop immediately.
2. Keep the desktop application at the repository root and place reusable development packages under packages.
3. Create separate repositories for the desktop application, protocol, and Mock Gateway.
## Decision
P00 uses a root-level React/Vite application and root-level src-tauri directory. Reusable protocol types, fixtures, and the Mock Gateway may live under packages and are managed by the root pnpm workspace.
Moving the desktop application under apps/desktop is deferred until a second independently deployable application creates a concrete need.
## Rationale
- Matches the explicit P00 workflow.
- Keeps Tauri and Vite generated conventions simple.
- Avoids premature monorepo nesting.
- Still permits package-level isolation for protocol and test tooling.
- Does not change the React/Rust security boundary.
## Consequences
- Root scripts are the canonical entry points for frontend, Rust, and Tauri checks.
- CI paths refer to src-tauri/Cargo.toml.
- A future layout move will require path updates in scripts, CI, and documentation.
- No package may introduce a second product UI without a separate decision.