Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e8672ef
feat: remove settings.local.json file to clean up unused configuration
alpha5611331 Jun 1, 2026
a380108
feat: enhance CLAUDE.md with platform-specific details and update tit…
alpha5611331 Jun 1, 2026
49b3289
feat: update references from "Power Interview" to "Power Interview AI…
alpha5611331 Jun 1, 2026
0f760d4
fix: correct hyphenation in project title and update version badge fo…
alpha5611331 Jun 1, 2026
76d9661
feat: add repositionTrafficLights function to adjust traffic light bu…
alpha5611331 Jun 1, 2026
35f38c5
feat: update BACKEND_BASE_URL logic and adjust platform-specific beha…
alpha5611331 Jun 1, 2026
060fe8f
feat: add application icon and update appId in package.json
alpha5611331 Jun 1, 2026
9bfb3ac
fix: update copyright information in package.json
alpha5611331 Jun 1, 2026
5646d4c
feat: implement macOS permission checks for screen recording and micr…
alpha5611331 Jun 1, 2026
f9389b3
feat: add new macOS logo assets in various formats
alpha5611331 Jun 2, 2026
e507c13
feat: update Electron version to 35 and implement macOS screen record…
alpha5611331 Jun 2, 2026
d3073d2
feat: migrate electron into tauri
alpha5611331 Jun 2, 2026
6b1d2d4
refactor: remove unused services and types
alpha5611331 Jun 2, 2026
6887dcf
feat(payment): add unified payment management page with tabs for buyi…
alpha5611331 Jun 2, 2026
3fef615
feat(banner): add SVG banner for Power Interview AI with logo and des…
alpha5611331 Jun 2, 2026
cbc3349
chore: add pnpm-workspace.yaml to exclude minimum release ages for sp…
alpha5611331 Jun 2, 2026
e5abaa8
refactor: clean up imports and improve code formatting across multipl…
alpha5611331 Jun 2, 2026
ea8ce83
lint
alpha5611331 Jun 2, 2026
2c22daf
fix: update tauri dependency features and add Info.plist for permissions
alpha5611331 Jun 2, 2026
6b2b080
feat: add various icons and update window capabilities for improved a…
alpha5611331 Jun 2, 2026
02fab4a
feat: add raw-window-handle dependency and implement cross-platform w…
alpha5611331 Jun 2, 2026
d72eea6
Refactor code structure for improved readability and maintainability
alpha5611331 Jun 2, 2026
8b7a484
refactor: clean up code by removing unused variables and improving re…
alpha5611331 Jun 3, 2026
f056d77
fix: update import function and type casting for audio data in live t…
alpha5611331 Jun 3, 2026
517cd42
fix: correct minify option in Vite config for better build behavior
alpha5611331 Jun 3, 2026
88e0675
feat: refactor API endpoint usage by replacing hardcoded strings with…
alpha5611331 Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .claude/settings.local.json

This file was deleted.

71 changes: 38 additions & 33 deletions .github/workflows/manual-cross-platform-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,53 +18,49 @@ jobs:
include:
- os: windows-latest
platform: win
build_command: npx electron-builder --win --x64 --publish never
- os: macos-latest
platform: mac
build_command: npx electron-builder --mac --publish never
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 11

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache: pnpm

- name: Install dependencies
run: npm ci
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Build Electron main process
run: npm run electron:build-main
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri

- name: Build renderer assets
run: npm run build
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build release packages
env:
CSC_IDENTITY_AUTO_DISCOVERY: "false"
run: ${{ matrix.build_command }}
shell: bash
- name: Build Tauri bundle
run: pnpm tauri:build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.platform }}
path: |
release/*.exe
release/*.dmg
release/*.zip
release/*.yml
release/*.yaml
release/*.blockmap
path: src-tauri/target/release/bundle/**/*
if-no-files-found: error

publish:
if: ${{ inputs.publish }}
if: inputs.publish
name: Publish GitHub Release
needs: build
runs-on: ubuntu-latest
Expand All @@ -74,35 +70,44 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 11

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: release-artifacts

- name: Prepare release metadata
- name: Read version
id: meta
run: |
VERSION=$(node -p "require('./package.json').version")
TAG="v${VERSION}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
echo "tag=v${VERSION}" >> "$GITHUB_OUTPUT"

- name: Create or update release
- name: Create or update GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ steps.meta.outputs.tag }}"
TITLE="Release ${TAG}"
if gh release view "$TAG" >/dev/null 2>&1; then
echo "Release $TAG already exists; uploading artifacts."
else
gh release create "$TAG" --title "$TITLE" --notes "Manual cross-platform build artifacts."
gh release create "$TAG" \
--title "Release $TAG" \
--notes "Manual cross-platform Tauri build."
fi
while IFS= read -r -d '' file; do
echo "Uploading $(basename "$file")"
gh release upload "$TAG" "$file" --clobber
done < <(
find release-artifacts -type f \
\( -name '*.exe' -o -name '*.dmg' -o -name '*.zip' -o -name '*.yml' -o -name '*.yaml' -o -name '*.blockmap' \) \
-print0
)
done < <(find release-artifacts -type f \( \
-name '*.exe' -o -name '*.msi' -o \
-name '*.dmg' -o -name '*.tar.gz' -o -name '*.zip' \
\) -print0)
90 changes: 55 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,55 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Environment variables
.env
.env.local
.env.*.local
.env.production

node_modules
dist
dist-ssr
electron-dist
release
*.local

# Claude Code
.claude

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# ── Logs ──────────────────────────────────────────────────────────────────────
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# ── Environment variables ──────────────────────────────────────────────────────
.env
.env.local
.env.*.local
.env.production

# ── Node.js ───────────────────────────────────────────────────────────────────
node_modules/

# ── Frontend build output ──────────────────────────────────────────────────────
dist/
dist-ssr/

# ── Tauri ─────────────────────────────────────────────────────────────────────
# Rust build artifacts — can be several GiB, always regenerated by cargo
src-tauri/target/

# Tauri-generated mobile/desktop scaffolding (tauri android/ios init)
src-tauri/gen/

# Wix toolchain downloaded by tauri-plugin-bundler for Windows NSIS/MSI
src-tauri/WixTools/

# Tauri CLI local cache
.tauri/


# ── Editor ────────────────────────────────────────────────────────────────────
.vscode/*
!.vscode/extensions.json
.idea/
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# ── OS ────────────────────────────────────────────────────────────────────────
.DS_Store
Thumbs.db

# ── Misc ──────────────────────────────────────────────────────────────────────
*.local

# ── Claude Code ───────────────────────────────────────────────────────────────
.claude/
87 changes: 38 additions & 49 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,64 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This repository is a **Tauri desktop application** for Windows and macOS.

## Commands

```bash
# Development
npm run dev # Vite renderer dev server only
npm run electron:dev-hide # Electron + renderer dev (hidden window)
npm run electron:dev-show # Electron + renderer dev (visible window)
npm start # Alias for electron:dev-hide

# Build
npm run build # tsc + vite build (renderer)
npm run electron:build-main # Build Electron main process
npm run electron:build # Full Electron distribution build

# Code quality
npm run lint # ESLint check
npm run format # Prettier + ESLint auto-fix
pnpm dev
pnpm tauri:dev
pnpm build
pnpm tauri:build
pnpm lint
pnpm format
```

## Architecture

This is an **Electron desktop application** - an AI-powered live interview assistant that provides real-time transcription and AI suggestions during job interviews.
The app is built as a Tauri desktop client with a React frontend.

**Stack:** React 19 + TypeScript + Tailwind CSS + shadcn/ui (renderer), Electron 40 (main), Vite (build).
### Frontend

### Process Split
- `src/` — React, Tailwind, hooks, components, pages.
- `src/lib/tauri-bridge.ts` exposes the IPC compatibility API used by renderer hooks.

```
src/main/ ← Electron main process (Node.js)
src/renderer/ ← React/Vite frontend
```

The path alias `@/*` resolves to `./renderer/*`.

**Main process** handles: audio capture, WebSocket connections to backend, IPC with renderer, Electron Store persistence, global hotkeys, auto-updates.
### Native Backend

**Renderer** handles: UI, routing, state display. It never calls backend APIs directly - all backend communication goes through IPC to main.
- `src-tauri/src/` — Tauri command handlers, services, state, and native utilities.
- `src-tauri/tauri.conf.json` — macOS and Windows bundle settings.
- `src-tauri/Cargo.toml` — Rust dependency manifest.

### IPC Bridge

[src/main/preload.cts](src/main/preload.cts) exposes `window.electronAPI` to the renderer with namespaced APIs: `config`, `auth`, `payment`, `llm`, `appState`, `transcription`, `liveSuggestion`, `actionSuggestion`, `tools`, `window`, `autoUpdater`, `external`.

IPC handlers live in [src/main/ipc/](src/main/ipc/) (one file per domain). Services in [src/main/services/](src/main/services/) contain the business logic called by handlers.

### State Management (Renderer)

Two distinct stores:

1. **AppState** ([src/renderer/hooks/use-app-state.tsx](src/renderer/hooks/use-app-state.tsx)) - React Context, synced from main via IPC. Holds real-time interview state: running status, transcripts, AI suggestions, credits, backend health. Read-only in renderer; mutated by main process pushing updates.
- Tauri `invoke()` is exposed through `tauriApi` and assigned to `window.electronAPI` for compatibility.
- Transcription, permissions, payment, config, and window control are handled through Tauri commands.

2. **ConfigStore** ([src/renderer/hooks/use-config-store.ts](src/renderer/hooks/use-config-store.ts)) - Zustand store backed by Electron Store. Holds user settings, auth tokens, audio/video device selection, interview configuration (CV, job description). Persisted to disk.
## Key Implementation Notes

### API Layer (Main Process)
- Electron has been removed from the repository.
- The build flows are now Tauri-first.
- Native audio loopback is implemented in `src-tauri/src/commands/transcription.rs`.
- macOS screen recording permission is validated natively.
- The GitHub Actions workflow builds Tauri bundles for Windows and macOS.

[src/main/api/client.ts](src/main/api/client.ts) - `ApiClient` class: fetch-based, Bearer token auth, streaming support. Wrapped by domain-specific clients: `AuthApi`, `LLMApi`, `PaymentApi`, `HealthCheckApi` in [src/main/api/](src/main/api/).
## Build and Release Workflow

Backend URL is defined in [src/main/consts.ts](src/main/consts.ts).
The workflow at `.github/workflows/manual-cross-platform-release.yml`:

### Routing (Renderer)
- builds on Windows and macOS in parallel
- installs pnpm dependencies
- runs `pnpm tauri:build` (which builds the frontend via `beforeBuildCommand` automatically)
- uploads bundle artifacts
- publishes a GitHub release when the `publish` input is enabled

Hash-based router (required for Electron): `/` → auth flow → `/main` (interview UI) → `/payment`.
## Platform Support

Router defined in [src/renderer/router.tsx](src/renderer/router.tsx).
- Windows 11+
- macOS 14.4+

### Key Features
## Notes for Developers

- **Transcription:** Dual-channel (speaker + interviewer mic) via WebSocket streaming - [src/main/services/transcript-service.ts](src/main/services/transcript-service.ts)
- **Live Suggestions:** Real-time AI responses based on CV + job description - [src/main/services/live-suggestion-service.ts](src/main/services/live-suggestion-service.ts)
- **Action Suggestions:** Screenshot-based problem solving (up to 3 images) - [src/main/services/action-suggestion-service.ts](src/main/services/action-suggestion-service.ts)
- **Credits:** Purchase and usage tracking via payment API
- **Auto-Updates:** electron-updater publishing to GitHub releases
- There is no `src/main/` Electron host code in this repo anymore.
- Use the Tauri app as the single desktop implementation.
- Update native dependencies in `src-tauri/Cargo.toml` and frontend dependencies in `package.json`.
- Package manager is pnpm — do not use npm or yarn.
Loading