Skip to content

Commit 35a6967

Browse files
committed
feat: add windows desktop app with local databases
1 parent b9da039 commit 35a6967

12 files changed

Lines changed: 4663 additions & 50 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build Windows EXE
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
9+
env:
10+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
11+
12+
jobs:
13+
build-windows:
14+
runs-on: windows-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: npm
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build portable EXE
30+
run: npm run build:win
31+
32+
- name: Build standalone HTML package
33+
run: npm run build:html
34+
35+
- name: Upload artifact
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: Breast-Followup-System-win-x64
39+
path: |
40+
dist/*.exe
41+
dist-html/*.html

.github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Breast Followup HTML
1+
name: Release Windows EXE
22

33
on:
44
push:
@@ -14,7 +14,7 @@ permissions:
1414

1515
jobs:
1616
release:
17-
runs-on: ubuntu-latest
17+
runs-on: windows-latest
1818

1919
steps:
2020
- name: Checkout
@@ -24,13 +24,22 @@ jobs:
2424
uses: actions/setup-node@v4
2525
with:
2626
node-version: 20
27+
cache: npm
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Build portable EXE
33+
run: npm run build:win
2734

2835
- name: Build standalone HTML package
2936
run: npm run build:html
3037

3138
- name: Publish GitHub Release
3239
uses: softprops/action-gh-release@v2
3340
with:
34-
files: dist-html/*.html
41+
files: |
42+
dist/*.exe
43+
dist-html/*.html
3544
body_path: docs/RELEASE_TEMPLATE.md
3645
generate_release_notes: true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
dist-html/
2+
dist/
3+
node_modules/
24
.DS_Store
35
*.log
46
*.tmp

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center">
22
<h1>Breast Follow-up System</h1>
3-
<p><strong>Standalone breast cancer follow-up record system + staging helper, with separate PC and mobile web versions.</strong></p>
3+
<p><strong>Web + Windows desktop breast cancer follow-up system with local databases, staging helper, and separate PC/mobile web versions.</strong></p>
44
<p><a href="README.zh-CN.md">简体中文</a> | <strong>English</strong></p>
55

66
<p>
@@ -22,22 +22,25 @@
2222
This repository productizes a single-file HTML breast cancer follow-up system into a deliverable GitHub project:
2323

2424
- GitHub Pages online usage
25-
- Standalone HTML download via Releases
25+
- Windows EXE and standalone HTML download via Releases
2626
- Automated build + release workflows
2727
- Separate PC and mobile entry pages
28+
- Windows desktop local databases with backup and restore
2829

2930
## Access
3031

3132
- GitHub repository: <https://github.com/liqi3333/breast-followup>
3233
- Online PC page: <https://liqi3333.github.io/breast-followup/>
3334
- Online mobile page: <https://liqi3333.github.io/breast-followup/mobile.html>
35+
- Windows desktop download: <https://github.com/liqi3333/breast-followup/releases/latest>
3436
- Latest release: <https://github.com/liqi3333/breast-followup/releases/latest>
3537

3638
## Login / Data storage
3739

38-
- This is a **local-first** web app. Users and records are stored in the browser via `localStorage`.
39-
- Built-in admin account in the HTML demo:
40-
- `admin / admin123`
40+
- The online version remains a **local-first** web app. Users and records are stored in the browser via `localStorage`.
41+
- The Windows desktop build creates two local SQLite databases: one for user accounts and one for follow-up records.
42+
- The desktop app supports one-click backup and restore of those databases.
43+
- Default admin account: `admin / admin123`
4144

4245
## Quick Start
4346

@@ -56,23 +59,28 @@ Then open the HTML file directly in a browser.
5659
### Build locally
5760

5861
```bash
62+
npm install
5963
npm run build:html
64+
npm run build:win
6065
```
6166

6267
Output:
6368

6469
```text
65-
dist-html/Breast-Followup-System-1.0.1.html
66-
dist-html/Breast-Followup-System-mobile-1.0.1.html
70+
dist/Breast-Followup-System-1.1.0.exe
71+
dist-html/Breast-Followup-System-1.1.0.html
72+
dist-html/Breast-Followup-System-mobile-1.1.0.html
6773
```
6874

6975
## Release automation
7076

71-
- Push to `main`: build PC + mobile HTML and upload workflow artifacts
72-
- Push tag `v*`: build and publish both standalone HTML assets to GitHub Releases
77+
- Push to `main`: build Windows EXE + PC/mobile HTML and upload workflow artifacts
78+
- Push tag `v*`: build and publish the Windows EXE plus standalone HTML assets to GitHub Releases
7379

7480
## Notes / Disclaimer
7581

7682
- This project is for informational and workflow reference only.
7783
- Do **not** use it as a substitute for formal clinical decision-making.
7884
- Do **not** store real sensitive patient data in a browser demo app.
85+
- The desktop backup action exports `users.db`, `followups.db`, and `manifest.json`.
86+
- The desktop restore action overwrites the current local desktop data, so back up first.

README.zh-CN.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center">
22
<h1>Breast Follow-up System</h1>
3-
<p><strong>乳腺癌随访系统,支持随访记录管理 + 分期辅助,并提供独立 PC / 手机版网页。</strong></p>
3+
<p><strong>乳腺癌随访系统,支持 Web + Windows 桌面版,包含本地数据库、随访记录管理与分期辅助。</strong></p>
44
<p><strong>简体中文</strong> | <a href="README.md">English</a></p>
55

66
<p>
@@ -22,22 +22,25 @@
2222
这个仓库把单文件 HTML 的「乳腺癌随访系统」整理成可公开交付的 GitHub 项目:
2323

2424
- GitHub Pages 在线使用
25-
- Releases 提供独立 HTML 下载
25+
- Releases 提供 Windows EXE 与独立 HTML 下载
2626
- 自动构建与自动发布工作流
2727
- 提供独立 PC 页面和手机版页面
28+
- Windows 桌面版本地数据库、备份与恢复
2829

2930
## 入口
3031

3132
- GitHub 仓库:<https://github.com/liqi3333/breast-followup>
3233
- 在线 PC 页面:<https://liqi3333.github.io/breast-followup/>
3334
- 在线手机版页面:<https://liqi3333.github.io/breast-followup/mobile.html>
35+
- Windows 桌面版下载:<https://github.com/liqi3333/breast-followup/releases/latest>
3436
- 最新 Release:<https://github.com/liqi3333/breast-followup/releases/latest>
3537

3638
## 登录 / 数据存储说明
3739

38-
- 这是 **本地优先(local-first)** 的网页应用,用户与随访记录保存在浏览器 `localStorage`
39-
- HTML 演示内置管理员账号:
40-
- `admin / admin123`
40+
- 在线版仍是 **本地优先(local-first)** 的网页应用,用户与随访记录保存在浏览器 `localStorage`
41+
- Windows 桌面版会在本机创建两个 SQLite 数据库:一个存用户账号,一个存随访记录。
42+
- 桌面版支持一键备份 / 恢复数据库。
43+
- 默认管理员账号:`admin / admin123`
4144

4245
## 快速开始
4346

@@ -56,22 +59,27 @@
5659
### 本地构建
5760

5861
```bash
62+
npm install
5963
npm run build:html
64+
npm run build:win
6065
```
6166

6267
产物:
6368

6469
```text
65-
dist-html/Breast-Followup-System-1.0.1.html
66-
dist-html/Breast-Followup-System-mobile-1.0.1.html
70+
dist/Breast-Followup-System-1.1.0.exe
71+
dist-html/Breast-Followup-System-1.1.0.html
72+
dist-html/Breast-Followup-System-mobile-1.1.0.html
6773
```
6874

6975
## 自动发布流程
7076

71-
- 推送到 `main`:自动构建 PC + 手机版 HTML,并上传 workflow artifact
72-
- 推送 `v*` 标签:自动生成 PC / 手机版独立 HTML 并发布到 GitHub Releases
77+
- 推送到 `main`:自动构建 Windows EXE + PC / 手机版 HTML,并上传 workflow artifact
78+
- 推送 `v*` 标签:自动生成 Windows EXE、PC / 手机版 HTML 并发布到 GitHub Releases
7379

7480
## 说明 / 免责声明
7581

7682
- 本项目仅供信息参考与流程示例,不替代正式临床决策。
7783
- 不建议在浏览器 demo 应用中存放真实敏感患者数据。
84+
- 桌面版“备份数据库”会导出 `users.db``followups.db``manifest.json`
85+
- 桌面版“恢复数据库”会覆盖当前本机桌面版数据,请先备份。

0 commit comments

Comments
 (0)