Skip to content

Commit 68eb962

Browse files
committed
desktop app
1 parent 235fbea commit 68eb962

File tree

14 files changed

+6142
-94
lines changed

14 files changed

+6142
-94
lines changed
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
name: Desktop App Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- PRODUCTION
8+
paths:
9+
- 'apps/desktop/**'
10+
- '.github/workflows/desktop-build.yml'
11+
pull_request:
12+
paths:
13+
- 'apps/desktop/**'
14+
workflow_dispatch:
15+
inputs:
16+
create_release:
17+
description: 'Create GitHub release'
18+
required: false
19+
type: boolean
20+
default: false
21+
22+
permissions:
23+
contents: write
24+
packages: write
25+
26+
jobs:
27+
build-macos:
28+
runs-on: macos-latest
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: '20'
37+
cache: 'npm'
38+
cache-dependency-path: apps/desktop/package-lock.json
39+
40+
- name: Install dependencies
41+
working-directory: apps/desktop
42+
run: npm ci
43+
44+
- name: Build macOS app
45+
working-directory: apps/desktop
46+
run: npm run build:mac
47+
env:
48+
# Skip notarization in CI (requires Apple Developer credentials)
49+
CSC_IDENTITY_AUTO_DISCOVERY: false
50+
51+
- name: List build outputs
52+
working-directory: apps/desktop
53+
run: ls -lah dist/
54+
55+
- name: Upload macOS artifacts
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: kortix-macos-${{ github.sha }}
59+
path: |
60+
apps/desktop/dist/*.dmg
61+
retention-days: 30
62+
63+
build-windows:
64+
runs-on: windows-latest
65+
steps:
66+
- name: Checkout code
67+
uses: actions/checkout@v4
68+
69+
- name: Setup Node.js
70+
uses: actions/setup-node@v4
71+
with:
72+
node-version: '20'
73+
cache: 'npm'
74+
cache-dependency-path: apps/desktop/package-lock.json
75+
76+
- name: Install dependencies
77+
working-directory: apps/desktop
78+
run: npm ci
79+
80+
- name: Build Windows app
81+
working-directory: apps/desktop
82+
run: npm run build:win
83+
env:
84+
# Skip code signing in CI (requires Windows code signing certificate)
85+
CSC_IDENTITY_AUTO_DISCOVERY: false
86+
87+
- name: List build outputs
88+
working-directory: apps/desktop
89+
run: dir dist\
90+
91+
- name: Upload Windows artifacts
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: kortix-windows-${{ github.sha }}
95+
path: |
96+
apps/desktop/dist/*.exe
97+
retention-days: 30
98+
99+
create-release:
100+
needs: [build-macos, build-windows]
101+
runs-on: ubuntu-latest
102+
if: |
103+
github.event_name == 'workflow_dispatch' &&
104+
github.event.inputs.create_release == 'true' ||
105+
github.ref == 'refs/heads/PRODUCTION'
106+
steps:
107+
- name: Checkout code
108+
uses: actions/checkout@v4
109+
110+
- name: Get version from package.json
111+
id: version
112+
working-directory: apps/desktop
113+
run: |
114+
VERSION=$(node -p "require('./package.json').version")
115+
echo "version=$VERSION" >> $GITHUB_OUTPUT
116+
echo "tag=v$VERSION" >> $GITHUB_OUTPUT
117+
118+
- name: Download macOS artifacts
119+
uses: actions/download-artifact@v4
120+
with:
121+
name: kortix-macos-${{ github.sha }}
122+
path: ./artifacts/macos
123+
124+
- name: Download Windows artifacts
125+
uses: actions/download-artifact@v4
126+
with:
127+
name: kortix-windows-${{ github.sha }}
128+
path: ./artifacts/windows
129+
130+
- name: List all artifacts
131+
run: |
132+
echo "=== macOS artifacts ==="
133+
ls -lah ./artifacts/macos/
134+
echo "=== Windows artifacts ==="
135+
ls -lah ./artifacts/windows/
136+
137+
- name: Create GitHub Release
138+
uses: softprops/action-gh-release@v1
139+
with:
140+
tag_name: desktop-${{ steps.version.outputs.tag }}
141+
name: Desktop App ${{ steps.version.outputs.version }}
142+
draft: false
143+
prerelease: false
144+
files: |
145+
./artifacts/macos/*
146+
./artifacts/windows/*
147+
body: |
148+
## Kortix Desktop App ${{ steps.version.outputs.version }}
149+
150+
### Downloads
151+
152+
- **macOS**: Download the `.dmg` file
153+
- **Windows**: Download the `.exe` file
154+
155+
### Installation
156+
157+
**macOS:**
158+
1. Download and open the `.dmg` file
159+
2. Drag Kortix to your Applications folder
160+
3. Open Kortix from Applications
161+
162+
**Windows:**
163+
1. Download and run the `.exe` installer
164+
2. Follow the installation wizard
165+
3. Launch Kortix from the Start Menu
166+
167+
---
168+
169+
Built from commit: ${{ github.sha }}
170+
env:
171+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172+
173+
notify:
174+
needs: [build-macos, build-windows]
175+
runs-on: ubuntu-latest
176+
if: always()
177+
steps:
178+
- name: Build Status
179+
run: |
180+
if [ "${{ needs.build-macos.result }}" == "success" ] && [ "${{ needs.build-windows.result }}" == "success" ]; then
181+
echo "✅ All desktop builds completed successfully!"
182+
else
183+
echo "❌ Some builds failed:"
184+
echo " macOS: ${{ needs.build-macos.result }}"
185+
echo " Windows: ${{ needs.build-windows.result }}"
186+
exit 1
187+
fi

apps/desktop/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
dist/
3+
*.log
4+
.DS_Store

apps/desktop/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Kortix Desktop
2+
3+
Minimal Electron wrapper for the Kortix web application with deep linking support.
4+
5+
## Features
6+
7+
- Native macOS/Windows/Linux desktop app
8+
- Deep linking for magic link authentication (`kortix://` protocol)
9+
- Integrated navigation controls (back, forward, reload, copy URL)
10+
- Keyboard shortcuts (Cmd+Left/Right, Cmd+R, Cmd+Shift+C)
11+
12+
## Development
13+
14+
```bash
15+
npm install
16+
npm start
17+
```
18+
19+
## Building
20+
21+
Build for your platform:
22+
23+
```bash
24+
npm run build:mac # macOS
25+
npm run build:win # Windows
26+
npm run build:linux # Linux
27+
```
28+
29+
Or build for all platforms:
30+
31+
```bash
32+
npm run build
33+
```
34+
35+
## Configuration
36+
37+
Set `APP_URL` environment variable to load a different URL:
38+
39+
```bash
40+
APP_URL=http://localhost:3000 npm start
41+
```
42+
43+
By default, it loads `https://kortix.com/`.
44+
45+
## Deep Linking
46+
47+
The app registers the `kortix://` protocol for magic link authentication:
48+
49+
1. User enters email in desktop app
50+
2. Magic link email contains `kortix://auth/callback?code=xxx`
51+
3. User clicks link in email
52+
4. Operating system opens Kortix Desktop app
53+
5. App handles auth callback and logs user in
54+
55+
The protocol is automatically registered when the app is installed.

apps/desktop/assets/icon.icns

90.2 KB
Binary file not shown.

apps/desktop/assets/icon.png

21.5 KB
Loading

apps/desktop/assets/logo.png

1.34 MB
Loading

0 commit comments

Comments
 (0)