How arpitteli/quali works
1. Overall shape
- This repo is an Electron desktop app with a three-process/UI split: the Electron main process, a primary React renderer window, and a separate floating mini-player window.
- The app is built and bundled with Vite on the frontend side, and packaged with electron-builder.
2. Main process boundary
- src/main/index.js is the central orchestration point for desktop concerns: creating windows, wiring IPC, managing app lifecycle, and integrating auto-update behavior.
- This is the boundary where browser-like UI is turned into native desktop behavior, including frameless/always-on-top window management implied by the README.
3. Preload bridge
- src/preload.js is the security and communication layer between Electron internals and React UI.
- It exposes a controlled IPC API via contextBridge, so the renderer can request native actions without direct Node/Electron access.
4. Primary renderer app
- src/renderer/ contains the main React application for the lead-review workflow.
- src/renderer/src/App.jsx is the top-level UI state container, while src/renderer/src/components/ holds feature-specific screens such as login, setup/import, modal dialogs, tab navigation, toasts, and right-side panels.
5. Workflow-oriented UI composition
- The renderer is organized around the lead-review lifecycle:
- LoginView for authentication/session entry
- SetupView and FilePicker for importing Excel leads
- AddLeadModal for manual lead entry
- TabStrip for switching app sections
- Toast for transient feedback
- The right-panel/ widgets (ActivitiesCard, CompetitionWidget, MasterCard, TodoList) suggest a dashboard-like secondary area for stats, progress, and tasks rather than a single flat form.
6. Mini-player subsystem
- src/mini-player/ is a separate React app/window dedicated to fast triage actions.
- The README describes it as a floating, always-on-top, frameless window used during batch review to tag leads as Good / Maybe / Bad.
- Architecturally, this is a distinct UI surface optimized for quick decisions while the browser stays open to Google Search tabs.
7. Data ingestion and local persistence
- The app’s core input is an Excel file loaded by the user.
- SheetJS (xlsx) is the key data layer technology for reading/writing spreadsheets, enabling:
- column detection
- importing lead rows
- generating a local master Excel file
- exporting tagged leads
- The local master lives outside the app bundle at Documents/quali_master.xlsx, making it a user-scoped working database rather than an embedded app resource.
8. Cloud-backed lead state
- The README describes several external Google Apps Script web apps: Auth, Cloud Master, Push, and Per-User Master.
- These are the remote service boundary for login, per-user state, deduplication across users, and shared-sheet pushes.
- The app therefore combines local spreadsheet state with remote spreadsheet-backed services, rather than a traditional database server.
9. Lead review data flow
- The main path is: Excel import → setup/import UI → batch review → tag action → master synchronization.
- Batch Google Search tabs are opened from the imported leads, and the mini-player is used to assign status.
- Tagged results then flow to:
- the cloud master for cross-user dedup
- the per-user master sheet for personal tracking
- the local Excel master for offline persistence and color-coded status
10. Master management and outbound sharing
- The “Master Viewer” mentioned in the README is a secondary management surface for reviewing accumulated leads.
- Actions like Discard, Push, Comments, and Export indicate the app supports both curation and publishing workflows.
- “Push” is a distinct outbound integration to a shared Google Sheet via Apps Script, separate from personal master storage.
11. Operational concerns
- Configuration and recovery are stored in the user profile: %APPDATA%/Quali/config.json and %APPDATA%/Quali/recovery.json.
- This suggests the app is designed for long-running desktop usage with session recovery and local preferences, not stateless browsing.
12. Packaging and release pipeline
- electron-builder produces platform installers, with explicit Windows and Mac build targets.
- GitHub Actions in .github/workflows/release.yml automates Mac release builds on version tags.
- electron-updater connects the runtime app to GitHub Releases for update delivery.
13. Repository boundary note
- The README references a separate quali-web/ source tree for the Apps Script code, but that code is not present in this repo tree.
- So the architecture here is the desktop client plus build/release automation, while the spreadsheet-backed cloud endpoints live outside this repository.
14. How to draw the architecture
- A good diagram would show:
- Electron main process at the center of native/window/update control
- Renderer UI as the primary user-facing app
- Mini-player UI as a separate always-on-top companion window
- Preload/IPC bridge between renderer and main
- Local Excel/config files as persistent storage on disk
- Google Apps Script / Google Sheets as the remote service layer
- GitHub Releases / Actions as the distribution and auto-update path
Main entry points: src/App.jsx Review app · index.js Main process · src/App.jsx Mini-player app · SetupView.jsx Setup
Components 24
Desktop runtime
Electron main process and native window orchestration
- Main process · Creates windows, wires IPC, manages lifecycle, and coordinates updates
src/main/index.js - Preload bridge · Context-isolated API surface between renderer and Electron internals
src/preload.js
Primary renderer
Main React application for lead review
- Review app · Top-level state container for the lead-review workflow
src/renderer/src/App.jsx - Login · Authentication and session entry UI
src/renderer/src/components/LoginView.jsx - Setup · Import and onboarding flow for lead files
src/renderer/src/components/SetupView.jsx - File picker · Spreadsheet selection and file import control
src/renderer/src/components/FilePicker.jsx - Add lead · Manual lead entry dialog
src/renderer/src/components/AddLeadModal.jsx - Tabs · Section switching within the main renderer
src/renderer/src/components/TabStrip.jsx - Toast · Transient status and error messages
src/renderer/src/components/Toast.jsx - Right panel · Secondary workspace for stats, tasks, and progress
- Activities · Activity and progress summary
src/renderer/src/components/right-panel/ActivitiesCard.jsx - Competition · Comparative or scoring panel
src/renderer/src/components/right-panel/CompetitionWidget.jsx - Master card · Master lead status and management entrypoint
src/renderer/src/components/right-panel/MasterCard.jsx - Todo list · Task list and follow-up actions
src/renderer/src/components/right-panel/TodoList.jsx
Mini-player
Floating companion window for fast triage
- Mini-player app · Floating always-on-top companion window for rapid lead tagging
src/mini-player/src/App.jsx - Mini entry · Mini-player bootstrap and mounting code
src/mini-player/src/main.jsx
Build & release
Frontend bundling and packaged distribution
- Auto-updater · Update delivery from release channel
- Vite build · Frontend development and production bundling setup
vite.config.js - Release workflow · GitHub Actions release automation for tagged builds
.github/workflows/release.yml - Packager · Electron packaging and installer generation
Other components
- Local master · User-scoped Excel persistence for imported and tagged leads
- Apps Script APIs · Auth, cloud master, push, and per-user master endpoints
- Google Sheets · External spreadsheet-backed system of record
- SheetJS · Excel import/export and sheet manipulation support
Connections 30
- Main process → Preload bridge: loads bridge · Main process attaches preload script to renderer windows
- Main process → Review app: opens main UI · Main process creates the primary renderer window
- Main process → Mini-player app: opens mini window · Main process creates the floating mini-player window
- Review app → Login: shows · Primary app includes authentication surface
- Review app → Setup: shows · Primary app includes import/setup flow
- Review app → Tabs: navigates · Top-level sections are switched through tabs
- Review app → Toast: notifies · App surfaces transient feedback to the user
- Review app → Right panel: contains · Secondary dashboard area within the main renderer
- Right panel → Activities: includes · Dashboard content area
- Right panel → Competition: includes · Dashboard content area
- Right panel → Master card: includes · Dashboard content area
- Right panel → Todo list: includes · Dashboard content area
- Setup → File picker: uses · Import flow relies on spreadsheet selection
- Review app → Add lead: opens · Manual lead creation dialog is launched from the app
- Review app → Preload bridge: calls IPC · Renderer uses controlled native actions through the preload API
- Mini entry → Mini-player app: mounts · Mini-player entry bootstraps the floating UI
- Mini-player app → Preload bridge: calls IPC · Mini-player communicates through the same controlled bridge
- Setup → Local master: imports to · Imported leads are stored in the local master workbook
- Master card → Local master: updates · Master management actions persist to local spreadsheet state
- Review app → Apps Script APIs: syncs · Login, push, and per-user state go through remote endpoints
- Mini-player app → Apps Script APIs: tags · Rapid triage actions sync lead status to remote services
- Apps Script APIs → Google Sheets: backed by · Remote services store and coordinate data in spreadsheets
- Setup → SheetJS: parses · Spreadsheet import and column detection use SheetJS
- Master card → SheetJS: exports · Master and tagged lead exports are spreadsheet-based
- Main process → Auto-updater: checks updates · Main process integrates runtime update behavior
- Auto-updater → Release workflow: delivers · GitHub release pipeline publishes update artifacts
- Vite build → Review app: builds · Vite bundles the primary renderer application
- Vite build → Mini-player app: builds · Vite bundles the mini-player window
- Release workflow → Packager: invokes · CI automates packaged desktop releases
- Packager → Main process: packages · Electron packaging turns the app into native installers