refactor: convert to bun-workspaces monorepo (desktop/ + www/)

- Move the Tauri app (React frontend + Rust backend) into desktop/ via
  git mv — configs unchanged (relative paths: tauri.conf.json, vite.config.ts)
- Root package.json becomes a private bun workspace container with
  orchestration scripts; desktop package renamed gridline-desktop
- Scaffold www/ with Astro 7 + Tailwind v4 (hand-wired vite plugin,
  static output, ready for Dokploy)
- Update release.yml for the new layout: projectPath: desktop,
  desktop/src-tauri resource paths, rust-cache workspace path
- Update README + AGENTS.md structure trees and dev commands
- Verified: vitest (1074), cargo test (354), desktop build, tauri dev
  (window launches), tauri build (dmg + app bundles), Astro build
This commit is contained in:
2026-08-16 19:31:53 +08:00
parent d752642b4d
commit 6854d889c5
400 changed files with 857 additions and 149 deletions
+34 -27
View File
@@ -351,7 +351,7 @@ git push origin v0.7.10
GitHub Actions (`.github/workflows/release.yml`) builds installers for **Apple Silicon, Intel Macs, Windows, and Linux**, then opens a **draft release** on the [Releases](https://github.com/adrianbonpin/gridline/releases) page — review it and hit **Publish release**.
Before tagging, make sure the version number is in sync across `package.json`, `src-tauri/Cargo.toml`, and `src-tauri/tauri.conf.json`, and update the **README download tables** (Download + Which file should I download?) to the new version's asset names.
Before tagging, make sure the version number is in sync across `desktop/package.json`, `desktop/src-tauri/Cargo.toml`, and `desktop/src-tauri/tauri.conf.json`, and update the **README download tables** (Download + Which file should I download?) to the new version's asset names.
### Build from source
@@ -360,10 +360,11 @@ Before tagging, make sure the version number is in sync across `package.json`, `
git clone https://github.com/adrianbonpin/gridline.git
cd gridline
# 2. Install frontend dependencies
# 2. Install all workspace dependencies
bun install
# 3. Run in development mode with hot-reload
# 3. Run in development mode with hot-reload (from desktop/)
cd desktop
bun run tauri dev
# 4. Build for production
@@ -383,17 +384,21 @@ bun run tauri build
## Development
```bash
# Frontend only (Vite dev server)
bun run dev
# Install all workspace dependencies (from the repo root)
bun install
# Full Tauri app with hot-reload
# Full Tauri app with hot-reload (from desktop/)
cd desktop
bun run tauri dev
# Production build
bun run tauri build
# Frontend only (Vite dev server)
bun run dev
# Rust backend only
cd src-tauri
cd desktop/src-tauri
cargo build
# Run tests
@@ -404,26 +409,28 @@ cargo test
```
gridline/
├── src/ # React frontend
│ ├── components/ # Reusable UI components
│ ├── stores/ # Zustand/Jotai state stores
├── hooks/ # Custom React hooks
├── lib/ # Utilities, types, Tauri bindings
├── App.tsx # Root component
└── main.tsx # Entry point
├── src-tauri/ # Rust backend
├── src/
│ ├── main.rs # Entry point
│ │ ├── lib.rs # Tauri command registration
│ │ ├── db/ # Database connection & pooling
│ │ ├── commands/ # Tauri IPC command handlers
│ │ └── models/ # Data structures & serde types
├── Cargo.toml
└── tauri.conf.json
├── public/ # Static assets
├── package.json
├── tsconfig.json
└── vite.config.ts
├── package.json # Bun workspace root (desktop + www)
├── desktop/ # Tauri desktop app (React + Rust)
│ ├── src/ # React frontend
│ ├── components/ # Reusable UI components
│ ├── stores/ # Zustand/Jotai state stores
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utilities, types, Tauri bindings
├── App.tsx # Root component
│ └── main.tsx # Entry point
├── src-tauri/ # Rust backend
│ │ ├── src/
│ │ │ ├── main.rs # Entry point
│ │ │ ├── lib.rs # Tauri command registration
│ │ │ ├── db/ # Database connection & pooling
│ │ ├── commands/ # Tauri IPC command handlers
│ │ └── models/ # Data structures & serde types
│ │ ├── Cargo.toml
│ │ └── tauri.conf.json
│ ├── package.json
│ ├── tsconfig.json
│ └── vite.config.ts
└── www/ # Website (Astro + Tailwind)
```
---