A technical deep-dive into the architecture, data flow, module design, and deployment pipeline of the ClearVoice AI Communication Coach.
ClearVoice is a fully static, zero-backend web application. All AI inference is performed via direct browser-to-API calls. No server, no database, no telemetry.
Clean separation of concerns: HTML for structure, one CSS file for all theming, three focused JS modules, and a GitHub Actions workflow for CI/CD.
:root for light mode. body.dark overrides each variable.window.CV_CONFIG. Safe placeholder in Git; GitHub Actions regenerates it at build time with the real secret.json.dumps() for safe key injection, then deploys via the official GitHub Pages action.From a user clicking "Analyze & Enhance" to rendered results — here is every step in the pipeline.
app.js and read at analysis time.anthropic-dangerous-direct-browser-access: true header to allow CORS. OpenAI natively supports browser calls. Both return a JSON string in the message content.```json), then parses to a JavaScript object. Falls back to a regex extraction if direct parsing fails.<span> elements.
Four vanilla JS files with a strict load order. No bundler, no framework — pure ES5-compatible globals for maximum portability on GitHub Pages.
A single workflow triggers on every push to main. It injects the API key from repository secrets and deploys the site using the official GitHub Pages action.
json.dumps() is used (not shell string interpolation) to ensure the API key is safe regardless of special characters ($, ", \, etc.). The generated js/config.js is never committed to the main branch — it only exists in the deployed GitHub Pages artifact. The source repository always contains an empty placeholder.
Because ClearVoice is a static site with no backend, all API communication is client-side. Here is an honest assessment of each configuration mode.
localStorage and sent only to the AI provider. The key never leaves the browser, is never logged, and is not accessible to any third party.Intentionally zero-dependency. No Node.js, no npm, no bundler. Pure web standards with one Google Fonts import.