Skip to content

Commit 84025d4

Browse files
committed
feat: add Electron desktop app with GitHub Actions build
1 parent 2fe2167 commit 84025d4

Some content is hidden

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

64 files changed

+9504
-61
lines changed

.claude/settings.local.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,17 @@
4545
"Bash(npx playwright:*)",
4646
"Bash(nul)",
4747
"Bash(unzip:*)",
48-
"Bash(copy:*)"
48+
"Bash(copy:*)",
49+
"Bash(mkdir:*)",
50+
"Bash(echo:*)",
51+
"Bash(c:codetranscript-parserdocker-compose.yml)",
52+
"Bash(\"c:\\code\\transcript-parser\\docker-compose.yml\")",
53+
"Bash(.gitkeep)",
54+
"Bash(dir:*)",
55+
"Bash(ls:*)",
56+
"Bash(npm run preview:*)",
57+
"Bash(npx vercel --version)",
58+
"Bash(npx vercel:*)"
4959
],
5060
"deny": [],
5161
"ask": []

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Frontend API URL
2+
VITE_API_URL=http://localhost:3000/api
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build Electron App
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
branches: [master, main]
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
matrix:
18+
os: [windows-latest, macos-latest, ubuntu-latest]
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '20'
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build Electron app
34+
run: npm run electron:build
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Upload Windows artifacts
39+
if: matrix.os == 'windows-latest'
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: windows-installer
43+
path: |
44+
release/*.exe
45+
release/*.zip
46+
retention-days: 30
47+
48+
- name: Upload macOS artifacts
49+
if: matrix.os == 'macos-latest'
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: macos-installer
53+
path: |
54+
release/*.dmg
55+
release/*.zip
56+
retention-days: 30
57+
58+
- name: Upload Linux artifacts
59+
if: matrix.os == 'ubuntu-latest'
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: linux-installer
63+
path: |
64+
release/*.AppImage
65+
release/*.deb
66+
release/*.rpm
67+
retention-days: 30
68+
69+
# Optional: Create GitHub Release on tag push
70+
release:
71+
needs: build
72+
runs-on: ubuntu-latest
73+
if: startsWith(github.ref, 'refs/tags/v')
74+
75+
steps:
76+
- name: Download all artifacts
77+
uses: actions/download-artifact@v4
78+
with:
79+
path: artifacts
80+
81+
- name: Create Release
82+
uses: softprops/action-gh-release@v1
83+
with:
84+
files: |
85+
artifacts/windows-installer/*
86+
artifacts/macos-installer/*
87+
artifacts/linux-installer/*
88+
draft: false
89+
prerelease: false
90+
env:
91+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
26+
.vercel

BACKEND_QUICKSTART.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Backend Quick Start Guide
2+
3+
**Sprint 7: Backend Integration - Get Up and Running in 5 Minutes**
4+
5+
## Prerequisites
6+
7+
- [x] Node.js 20+ installed
8+
- [ ] PostgreSQL installed or Docker Desktop
9+
- [ ] FFmpeg installed
10+
- [ ] Gemini API key
11+
12+
## Quick Setup
13+
14+
### 1. Install FFmpeg (if not installed)
15+
16+
**Windows:** Download from https://ffmpeg.org/download.html and add to PATH
17+
18+
**Mac:** `brew install ffmpeg`
19+
20+
**Linux:** `sudo apt-get install ffmpeg`
21+
22+
**Verify:** `ffmpeg -version`
23+
24+
### 2. Start PostgreSQL
25+
26+
**Using Docker (easiest):**
27+
```bash
28+
docker run --name transcript-postgres -e POSTGRES_DB=transcript_parser -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres:15-alpine
29+
```
30+
31+
**OR use existing PostgreSQL and create database:**
32+
```bash
33+
createdb transcript_parser
34+
```
35+
36+
### 3. Configure Backend
37+
38+
```bash
39+
cd server
40+
copy .env.example .env
41+
```
42+
43+
**Edit `.env` file** - Add your Gemini API key:
44+
```env
45+
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/transcript_parser
46+
JWT_SECRET=change-this-to-random-string-minimum-32-chars
47+
GEMINI_API_KEY=your-actual-gemini-api-key-here
48+
```
49+
50+
**Get Gemini API Key:** https://makersuite.google.com/app/apikey
51+
52+
### 4. Set Up Database
53+
54+
```bash
55+
npm run db:generate
56+
npm run db:push
57+
```
58+
59+
### 5. Start Backend
60+
61+
```bash
62+
npm run dev
63+
```
64+
65+
You should see:
66+
```
67+
🚀 Server running on port 3000
68+
💾 Database: Connected
69+
🤖 Gemini: Configured
70+
```
71+
72+
### 6. Test Backend
73+
74+
Open http://localhost:3000/health
75+
76+
Should return: `{"status":"ok","timestamp":"..."}`
77+
78+
### 7. Configure Frontend
79+
80+
```bash
81+
cd ..
82+
copy .env.example .env
83+
```
84+
85+
File should contain:
86+
```env
87+
VITE_API_URL=http://localhost:3000/api
88+
```
89+
90+
### 8. Start Frontend
91+
92+
```bash
93+
npm run dev
94+
```
95+
96+
### 9. Test the App
97+
98+
1. Open http://localhost:5173
99+
2. Register a new account
100+
3. Upload a video file
101+
4. Watch the magic happen! ✨
102+
103+
## Troubleshooting
104+
105+
**Database won't connect?**
106+
- Check PostgreSQL is running: `docker ps` or check service
107+
- Verify DATABASE_URL in `.env`
108+
109+
**FFmpeg error?**
110+
- Run `ffmpeg -version` to verify installation
111+
- Ensure FFmpeg is in your PATH
112+
113+
**Gemini API error?**
114+
- Verify API key in `.env` is correct
115+
- Check quota at https://makersuite.google.com
116+
117+
**Port 3000 in use?**
118+
- Change `PORT=3001` in server `.env`
119+
- Update frontend `.env`: `VITE_API_URL=http://localhost:3001/api`
120+
121+
## What's Next?
122+
123+
- Review [Sprint-7-Setup-Guide.md](./docs/Sprint-7-Setup-Guide.md) for detailed setup
124+
- Check [Sprint-7-Implementation-Summary.md](./docs/Sprint-7-Implementation-Summary.md) for architecture details
125+
- Read [server/README.md](./server/README.md) for API documentation
126+
127+
## Need Help?
128+
129+
Check the comprehensive setup guide in `docs/Sprint-7-Setup-Guide.md`
130+
131+
---
132+
133+
**You're all set!** The backend is running and ready to process videos. 🚀

BUILD_INSTRUCTIONS.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Building the Electron Desktop App on Windows ARM64
2+
3+
## 🐛 Current Issue
4+
5+
You're running on Windows ARM64, which has compatibility issues with electron-builder. The ARM64 version of app-builder can't properly extract x64 Electron binaries, causing the build to fail with:
6+
7+
```
8+
ENOENT: no such file or directory, rename 'electron.exe' -> 'Transcript Parser.exe'
9+
```
10+
11+
## ✅ Working Solutions
12+
13+
### Option 1: Build on x64 Windows Machine (Recommended)
14+
15+
The easiest solution is to build on a native x64 Windows machine:
16+
17+
1. **On an x64 Windows computer**, clone the repo:
18+
```bash
19+
git clone https://github.com/KevenWMarkham/transcript-parser
20+
cd transcript-parser
21+
npm install
22+
npm run electron:build:win
23+
```
24+
25+
2. The `.exe` files will be in the `release/` folder
26+
27+
3. Copy them back to your ARM64 machine or upload to GitHub Releases
28+
29+
### Option 2: Use GitHub Actions (Free, Automated)
30+
31+
Set up GitHub Actions to build automatically on every push:
32+
33+
1. I can create a `.github/workflows/build-electron.yml` file that builds on GitHub's x64 servers
34+
2. Every time you push code, it automatically builds Windows, macOS, and Linux versions
35+
3. Download the built `.exe` from GitHub Actions artifacts
36+
4. Completely free for public repositories
37+
38+
**Would you like me to set this up for you?**
39+
40+
### Option 3: Use Windows Subsystem for Linux (WSL2)
41+
42+
If you have WSL2 installed:
43+
44+
```bash
45+
# In WSL2 Ubuntu
46+
sudo apt update
47+
sudo apt install wine wine64
48+
npm run electron:build:win
49+
```
50+
51+
This uses Wine to emulate x64 Windows inside Linux.
52+
53+
### Option 4: Manual Packaging (Advanced)
54+
55+
You can manually package the app using the already-built files:
56+
57+
1. The web app is built (`dist/` folder) ✅
58+
2. Electron files are ready (`electron/` folder) ✅
59+
3. Just need to package them together
60+
61+
I can create a script that does this without electron-builder.
62+
63+
## 🧪 Testing Without Building
64+
65+
Good news! You can still test the Electron app in development mode:
66+
67+
```bash
68+
npm run electron:dev
69+
```
70+
71+
This works perfectly on ARM64 Windows and lets you test all desktop features.
72+
73+
## 🚀 Recommended Approach
74+
75+
**For you right now**: Use GitHub Actions (Option 2)
76+
77+
Benefits:
78+
- ✅ Builds on x64 servers (no ARM issues)
79+
- ✅ Completely automated
80+
- ✅ Builds for Windows, macOS, AND Linux
81+
- ✅ Free for public repos
82+
- ✅ Creates GitHub Releases automatically
83+
- ✅ No need for another computer
84+
85+
I can set this up in about 5 minutes if you'd like!
86+
87+
## 📝 Technical Details
88+
89+
**Why this happens:**
90+
- You're on Windows ARM64
91+
- electron-builder uses `app-builder.exe` (ARM64 version on your machine)
92+
- app-builder ARM64 has bugs extracting x64 Electron binaries
93+
- The extraction fails silently, leaving `electron.exe` missing
94+
- Build fails when trying to rename non-existent file
95+
96+
**Your options:**
97+
1. Build on x64 machine
98+
2. Use GitHub Actions (x64 cloud servers)
99+
3. Use WSL2 + Wine
100+
4. Wait for electron-builder to fix ARM64 support
101+
102+
Let me know which option you'd like to pursue!

0 commit comments

Comments
 (0)