Open-Source Progressive Web App Static BYOK • Free Attribution License

MindHive Web & PWA

A situational memory, live audio/video transcription, and 360° forensic surveillance Progressive Web App built with React 19, Vite 6, Tailwind CSS 4, TypeScript, IndexedDB, Firebase, and @google/genai. Run the live app right in your browser or self-host the open-source codebase anywhere.

Core Capabilities

Consolidated 2-Screen Field & Vault Architecture

Engineered for zero-friction operation on phones, tablets, dash-mounted devices, and desktop browsers — keeping everyday capture cost at $0 while making deep multimodal AI forensics one tap away.

360° Dual-Camera Capture

UnifiedCapture runs an always-on Front + Back split-screen viewfinder with graceful single-sensor fallback, plus instant Flip, Lite, and Audio-only operating modes.

MediaDevices • Split View

Free Live Speech & Chunked Recording

Streams free browser-native Web Speech-to-Text while saving crash-proof chunked video/audio recordings locally — backed by a 1-tap Emergency SOS trigger and Wake Lock keep-alive.

Web Speech API • Wake Lock

Cost-Controlled AI Vision Feed

Defaults to manual AI Scan ($0 AI spend during normal driving) with an optional Auto 15s toggle for continuous situational observation and live forensic Q&A (clientVisionObserve, clientVisionChat).

gemini-3.1-flash-lite

Unified Local + Cloud Vault

UnifiedVault merges local browser IndexedDB records with optional Firebase Cloud sync — supporting search, filters, inline audio/video playback, media import transcription (clientTranscribe), AI re-analysis, downloads, and Google Docs/Drive export.

IndexedDB • Firebase • Drive

Static BYOK Privacy Model

All AI inference runs directly from your browser to Google AI Studio using your own API key stored exclusively in your browser’s localStorage. Fritbjörn Labs never sees your prompts, media, or API keys.

Zero Backend Proxy

Mobile Telemetry & Resilience

CompactHeader displays live microphone, recording, GPS, and battery indicators alongside a Car Bluetooth Safe toggle, automatic v1 Gemini model fallback, and Network-First PWA caching.

PWA • Service Worker
Architecture & Model Policy

Transparent Client-Side Design

No proprietary cloud lock-in. MindHive is structured so you can inspect every module, verify where requests go, and override Firebase or OAuth endpoints directly from Settings.

Component File / Runtime Responsibility
App Shell src/App.tsx 2-tab interface (capture | vault), Wake Lock, battery telemetry, IndexedDB state, and optional Firebase Auth/Firestore subscriptions.
Status & Controls src/components/CompactHeader.tsx Live mic, recording, GPS & battery indicators, Car Bluetooth Safe toggle, Cloud sign-in pill, and Settings modal access.
Live Capture src/components/UnifiedCapture.tsx Front/back split-screen viewfinder, live Web Speech-to-Text, crash-proof chunked recording, Emergency SOS, manual/Auto-15s AI Vision scans.
Evidence Vault src/components/UnifiedVault.tsx Local IndexedDB + optional Cloud backup browser, media import transcription, AI re-analysis, download, and Google Docs/Drive export.
AI Engine (BYOK) src/utils/clientGemini.ts Direct browser calls to Google AI Studio (gemini-3.1-flash-lite primary with verified v1 fallback chain: gemini-3.5-flash-lite, gemini-3.8-flash) using structured JSON output.
Settings & Overrides src/components/SettingsModal.tsx API key configuration, Test AI Key, Refresh App, custom Firebase/OAuth overrides, Wake Lock, Car Safe, PWA install shortcuts, theme, and local history clear.
Source Code & Self-Hosting

Clone, Build & Deploy Your Own Instance

MindHive builds into a pure static PWA inside dist/ (deployable to any HTTPS static host) and also includes an optional local Node/Express backend (server.ts) for local development.

Runtime & Build Requirements

  • End Users (Browser / PWA): Modern Chromium, Firefox, or Safari over HTTPS (or localhost) with Camera/Mic, IndexedDB, Service Worker & Web Speech API support.
  • AI Key (BYOK): Free or paid Google AI Studio Gemini API key entered locally in Settings (stored only in your browser).
  • Developers / Self-Hosting: Node.js v20+ (v22 LTS recommended) with npm and TypeScript ~5.8.
  • Optional Cloud Sync: Bring your own Firebase Web Config & Google OAuth Client ID directly inside Settings.

Local Build Commands

bash — Clone & Build MindHive
git clone https://fritbjornlabs.com/repos/mindhive.git
cd mindhive
npm install
npm run lint
npm run build

For local dev with the optional Node server, copy .env.example to .env.local, add your key, and run npm run dev. For static PWA hosting, publish dist/ (excluding dist/server.cjs*).

Open-Source Disclosure & Free Attribution License

MindHive is 100% open source and free to use, modify, and redistribute for personal or commercial projects — provided you preserve the license notice and credit Fritbjörn Labs (https://fritbjornlabs.com) as the original source.