Skip to content

Commit

Permalink
Managing Conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
arnav-ti committed Jan 13, 2025
2 parents efbef28 + e0b0525 commit 9c7ad5a
Show file tree
Hide file tree
Showing 13 changed files with 409 additions and 184 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# PostHog Configuration
REACT_APP_POSTHOG_KEY=your-project-api-key
REACT_APP_POSTHOG_HOST=https://app.posthog.com # Or your self-hosted instance URL
1 change: 0 additions & 1 deletion .env.production

This file was deleted.

2 changes: 0 additions & 2 deletions .env.template

This file was deleted.

43 changes: 28 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,27 +149,14 @@ python3 -m venv .venv && source .venv/bin/activate && python3 -m pip install set
npm run electron-build
```

## TODO

- [x] Allow users to specify their api key in the app
- [ ] Check if .env.production can be safely removed
- [ ] Cannot change mode without pausing first
- [x] When new subtitles are smaller, you can see the previous subtitles
- [x] Developer tools should be hidden when using the installable app
- [x] Detect when no api key is set
- [ ] Audio gets laggy over time
- [ ] Reconnect only on session ending issues, not all issues
- [ ] Set the assistant name from the config itself, not in the app file.
- [ ] Audio should stop playing when the session is disconnected.

## Sign and Notarize

0. You need to have an Apple Developer account.

1. You need to install the following certificates:

a. From Apple's [Certificate Authority](https://www.apple.com/certificateauthority/), download the following - Apple Root CA - G2 - Apple Worldwide Developer Relations CA - G2 - Apple Worldwide Developer Relations Certificate Authority - Developer ID Certification Authority
b. A developer ID Application certificate from [here](https://developer.apple.com/account/resources/certificates/add)
b. A developer ID Application certificate from [here](https://developer.apple.com/account/resources/certificates/add). You need to generate a Certificate Signing Request (CSR) from your mac to generate the certificate.

2. Create an App Specific Password from [here](https://appleid.apple.com/account/manage)

Expand All @@ -181,7 +168,33 @@ export APPLE_APP_SPECIFIC_PASSWORD="YOUR_APP_SPECIFIC_PASSWORD" # Generate this
export APPLE_TEAM_ID="KRY77A2RML" # Your Apple Team ID
```

4. Run the following command to build the app, it will sign and notarize the app as well:
4. Add the following to your package.json:
a. In your mac build

```json
"mac": {
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "electron/entitlements.mac.plist",
"entitlementsInherit": "electron/entitlements.mac.plist",
"identity": "G-DEV FZ-LLC (KRY77A2RML)",
"forceCodeSigning": true
}
```

b. For notarisation,

```json
"afterSign": "electron-builder-notarize"
```

And add this to your dev dependencies:

```bash
npm install electron-builder-notarize --save-dev
```

5. Run the following command to build the app, it will sign and notarize the app as well:

```bash
source .venv/bin/activate && npm run electron-build
Expand Down
7 changes: 7 additions & 0 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ import * as path from 'path';
import * as fs from 'fs';
import { keyboard, Key } from '@nut-tree-fork/nut-js';

// Set environment variables for the packaged app
if (!app.isPackaged) {
require('dotenv-flow').config();
} else {
require('dotenv').config({ path: path.join(process.resourcesPath, '.env') });
}

keyboard.config.autoDelayMs = 0;

let mainWindow: BrowserWindow | null = null;
Expand Down
8 changes: 8 additions & 0 deletions env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Apple Developer Account
APPLE_ID="[email protected]"
APPLE_APP_SPECIFIC_PASSWORD="qgrk-kguc-lvbo-khez"
APPLE_TEAM_ID="KRY77A2RML"

# PostHog
REACT_APP_POSTHOG_KEY="phc_WhxtPoWv3SbDbUB29s5UZXUDKrJEINe1oDwzmYvlU3m"
REACT_APP_POSTHOG_HOST="https://us.i.posthog.com"
Loading

0 comments on commit 9c7ad5a

Please sign in to comment.