This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
pnpm install # Install dependencies
pnpm dev # Start development server (custom Node.js server with WebSocket)
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Run ESLintAll commands run from root and target the frontend workspace via pnpm --filter.
Create .env.local in the project root:
GOOGLE_APPLICATION_CREDENTIALS=.gcp/your-service-account.json # Google Cloud credentials
GOOGLE_API_KEY=your-google-ai-api-key # Gemini API key
PORT=3000 # OptionalMonorepo structure with pnpm workspaces. The frontend/ package contains the entire application.
The app uses a custom Node.js server (frontend/server.js) instead of the standard Next.js server. This server:
- Handles HTTP requests via Next.js
- Runs a WebSocket server at
/api/transcribefor real-time audio streaming - Manages Google Cloud Speech-to-Text streaming sessions (with auto-restart at ~5 min limit)
- Processes AI requests to Gemini via LangChain with streaming responses
Browser (MediaRecorder) → WebSocket → server.js → Google Speech-to-Text
↓
Browser (UI updates) ← WebSocket ← Transcription results
Browser (AI request) → WebSocket → server.js → Gemini (LangChain)
↓
Browser (streaming UI) ← WebSocket ← AI response chunks
Custom Hooks (frontend/src/hooks/):
useAudioRecorder- Browser audio capture using MediaRecorder API, sends WebM/Opus chunks every 250msuseTranscription- WebSocket client managing connection, transcript state, and AI requests
Server Classes:
TranscriptionSession- Wraps Google Cloud streaming recognition with automatic stream restart before the 305-second limit
Component Organization (frontend/src/components/):
- Components are exported via barrel file (
index.ts) - All components are client components (
'use client')
- Next.js 16 App Router with React 19
- Tailwind CSS 4 (configured via
@tailwindcss/postcss) - TypeScript with strict mode
- ESLint flat config (
eslint.config.mjs) - Google Cloud Speech-to-Text (streaming API, WEBM_OPUS encoding)
- Google Gemini via
@langchain/google-genai(model:gemini-3-flash-preview- do not change)
| Name | Hex | CSS Variable | Usage |
|---|---|---|---|
| Night Navy | #040932 |
--color-night-navy |
Background |
| Cloud Lilac | #F3F1FA |
--color-cloud-lilac |
Primary text over dark backgrounds |
| Pulse Cyan | #0BB2F2 |
--color-pulse-cyan |
Realtime indicators, highlights, badges, waveform accents |
- Logo text: "Live" and "Helper" in Cloud Lilac, "Meeting" in Pulse Cyan
- Assets located in
assets/:lmh-logo.png- High quality PNGlmh-logo.webp- Web optimizedlmh-open-graph.png- Social media/Open Graph image