Skip to content

Commit 0b216ab

Browse files
feat(app): migrate to tauri + react architecture
- Rebuild project structure around tauri and react stack - Introduce cross-platform desktop runtime via tauri - Add CI and release workflows for multi-platform builds - Establish unified tooling with bun, biome, and typescript - Standardize project configs for formatting, linting, and env - Prepare foundation for desktop-first application lifecycle
1 parent 54ac552 commit 0b216ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+8486
-81
lines changed

.claude/settings.local.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@
1010
"Bash(openspec:*)",
1111
"Bash(openspec new:*)",
1212
"Bash(openspec status:*)",
13-
"Bash(openspec instructions:*)"
13+
"Bash(openspec instructions:*)",
14+
"Bash(bun add:*)",
15+
"Bash(bunx tsc:*)",
16+
"Bash(bunx biome:*)",
17+
"Bash(. \"$HOME/.cargo/env\")",
18+
"Bash(bunx tauri:*)",
19+
"Bash(cargo check:*)",
20+
"Bash(cargo fmt:*)",
21+
"Bash(bun run:*)"
1422
]
1523
}
1624
}

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.rs]
12+
indent_size = 4
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [dev, master]
6+
push:
7+
branches: [dev, master]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
check:
15+
runs-on: ubuntu-22.04
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: oven-sh/setup-bun@v2
20+
21+
- uses: dtolnay/rust-toolchain@stable
22+
with:
23+
components: rustfmt, clippy
24+
25+
- uses: Swatinem/rust-cache@v2
26+
with:
27+
workspaces: "./src-tauri -> target"
28+
29+
- name: Install system dependencies
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev build-essential libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
33+
34+
- name: Install frontend dependencies
35+
run: bun install --frozen-lockfile
36+
37+
- name: Biome check
38+
run: bunx biome ci .
39+
40+
- name: TypeScript check
41+
run: bunx tsc --noEmit
42+
43+
- name: Rust format check
44+
run: cargo fmt --manifest-path src-tauri/Cargo.toml --check
45+
46+
- name: Rust clippy
47+
run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- platform: windows-latest
17+
args: ""
18+
- platform: macos-latest
19+
args: "--target aarch64-apple-darwin"
20+
- platform: macos-latest
21+
args: "--target x86_64-apple-darwin"
22+
- platform: ubuntu-22.04
23+
args: ""
24+
25+
runs-on: ${{ matrix.platform }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: oven-sh/setup-bun@v2
30+
31+
- uses: dtolnay/rust-toolchain@stable
32+
with:
33+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
34+
35+
- uses: Swatinem/rust-cache@v2
36+
with:
37+
workspaces: "./src-tauri -> target"
38+
39+
- name: Install system dependencies (Ubuntu)
40+
if: matrix.platform == 'ubuntu-22.04'
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev build-essential libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
44+
45+
- name: Install frontend dependencies
46+
run: bun install --frozen-lockfile
47+
48+
- uses: tauri-apps/tauri-action@v0
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
52+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
53+
with:
54+
tagName: ${{ github.ref_name }}
55+
releaseName: "WViewer ${{ github.ref_name }}"
56+
releaseBody: "See the assets to download and install this version."
57+
releaseDraft: true
58+
prerelease: false
59+
args: ${{ matrix.args }}

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# dependencies (bun install)
2+
node_modules
3+
git-staged.txt
4+
5+
# output
6+
out
7+
dist
8+
*.tgz
9+
10+
# code coverage
11+
coverage
12+
*.lcov
13+
14+
# logs
15+
logs
16+
_.log
17+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
18+
19+
# dotenv environment variable files
20+
.env
21+
.env.development.local
22+
.env.test.local
23+
.env.production.local
24+
.env.local
25+
26+
# caches
27+
.eslintcache
28+
.cache
29+
*.tsbuildinfo
30+
31+
# IntelliJ based IDEs
32+
.idea
33+
34+
# Finder (MacOS) folder config
35+
.DS_Store
36+
37+
# Rust / Tauri
38+
src-tauri/target
39+
src-tauri/gen

.vscode/settings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"cSpell.words": [
3-
"openspec"
3+
"openspec",
4+
"Tauri"
45
]
5-
}
6+
}

biome.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
3+
"linter": {
4+
"enabled": true,
5+
"rules": {
6+
"recommended": true
7+
}
8+
},
9+
"formatter": {
10+
"enabled": true,
11+
"indentStyle": "space",
12+
"indentWidth": 2
13+
},
14+
"javascript": {
15+
"formatter": {
16+
"quoteStyle": "double",
17+
"semicolons": "always"
18+
}
19+
},
20+
"files": {
21+
"includes": ["src/**", "*.ts", "*.json"]
22+
}
23+
}

0 commit comments

Comments
 (0)