How xhoantran/open-interview-coder works
Project Type and Purpose
• This is a desktop, full‑stack Electron application combining:
• An Electron “main” process (Node.js) for OS integration – global shortcuts, stealth window, screenshot capture, AI calls.
• An Electron “renderer” process (React + TypeScript + Tailwind CSS + Radix UI) for the UI.
• External services: OpenAI API and Google Gemini API for AI‑powered problem extraction and solution generation.
File Structure Analysis
• Top‑level config and scripts (.erb/configs, .erb/scripts): build, lint, package, and notarize flows.
• src/main/: Electron main process – window helper, screenshot helper, shortcuts helper, IPC handlers, state manager, AI processors (GeminiHandler, OpenAIHandler).
• src/renderer/: React app – entrypoint (index.tsx), components, feature modules (queue, settings, solution), UI primitives, global CSS, store and utils.
• src/preload.ts + src/renderer/preload.d.ts: secure IPC bridge exposing limited APIs to renderer.
• package.json / build configs: Electron Forge/Webpack configs for packaging per OS.
Key Architectural Insights from README
• Stealth mode: invisible window, OS‑level screen capture evasion.
• Global shortcuts trigger IPC events in main.
• AI model selection and API key stored locally (no backend server).
• Pure local processing except outbound HTTP to AI services.
• Extensible LLM integration via src/main/processor/*.
Detail Guidance
• Preload IPC surface explicitly, since it’s a critical security boundary.