Index

Fired

Cross-platform desktop GUI client and air-gapped web simulator for Google Cloud Firestore, engineered for zero-latency schema exploration, pre-execution compound query validation, and transactional batch mutations.

Lead Systems & Full-Stack Engineer2026PersonalView live ↗
< 65ms p95Query execution latency
> 10K docs/secIPC serialization throughput
$0Commercial license cost

Developer Tooling Bottlenecks & Cloud Console Latency

Engineering teams managing production workloads on Google Cloud Firestore frequently encounter severe operational friction within the official Firebase Console. The browser interface incurs multi-second latency when traversing dense collection hierarchies, lacks native multi-document batch operations, and commits destructive field mutations immediately without confirmation safeguards or read-only boundaries. When testing compound queries, developers are forced to inspect raw gRPC error payloads to extract composite index creation links manually.

Third-party commercial clients attempt to address these limitations but introduce unsustainable friction of their own: proprietary tools such as Firefoo mandate recurring commercial subscriptions exceeding $150 USD per developer seat annually. For independent software architects, open-source contributors, and regional technology studios in emerging ecosystems like East Africa, recurring per-seat licensing for foundational database tooling is economically inefficient. Conversely, relying on ad-hoc CLI migration scripts introduces schema drift and risks unchunked batch limit violations.

Fired was engineered as a high-craft, open-source desktop database client and zero-dependency web simulator. It couples native OS keychain credential encryption and real-time gRPC stream multiplexing with client-side compound query validation, chunked 500-write transactional pipelines, an isolated JavaScript script shell, and an air-gapped in-memory browser simulation that runs without backend infrastructure or cloud credentials.

Fired desktop client interface showing active Firestore collections, dynamic tabular document grid, and real-time query builder
Tabular document explorer rendering inferred schema types, cursor-based pagination, inline field editing, and active gRPC onSnapshot live listeners.

Architectural Design: IPC Type Preservation, Real-Time Streams & Sandboxed Execution

Cross-Process Type Preservation: When native Firestore SDK instances cross Electron's inter-process communication (IPC) boundary between the Node.js main process and the Chromium renderer, Chromium's structured clone algorithm strips class prototypes. This degrades Firestore Timestamp, GeoPoint, DocumentReference, and binary Buffer objects into empty structures or raw strings. Fired resolves this via a bidirectional discriminated union serialization protocol (SerializedFieldValue). Custom duck-typing parsers inspect internal microsecond counters and gRPC descriptors to serialize native structures without loss of precision, allowing the React UI to edit nested fields and reconstruct exact SDK instances upon dispatch.

Real-Time Concurrency & Read-Only Safety Boundaries: Rather than polling database endpoints over HTTP, Fired attaches long-lived gRPC onSnapshot stream listeners in the background Node runtime, piping incremental document updates directly into TanStack Query's cache. To guarantee operational safety when connecting to live production databases, the client enforces read-only mode at both the UI layer and the IPC handler level (credentialStore.isReadOnly()). All incoming write requests, recursive document deletions, WriteBatch commits, restore executions, and user scripts are validated and rejected prior to database dispatch.

Sandboxed JavaScript Execution & In-Memory Browser Emulation: To perform complex batch migrations without switching to terminal consoles, Fired embeds a sandboxed Node.js vm.createContext script runner. Host operating system access is restricted by nullifying process, require, and module exports, while exposing top-level await, standard runtime primitives, a sandboxed console, and the active Firestore instance guarded by a 30-second execution watchdog. Furthermore, to enable friction-free client demonstrations without exposing cloud credentials, the entire API layer conforms to an AppApi interface backed by an air-gapped in-memory mock engine that runs in standard web browsers.

src/main/ipc/live.ipc.ts
      const db = await connectionManager.getFirestore(req.connectionId);
      let query: FirebaseFirestore.Query = db.collection(req.collectionPath);

      // Apply where clauses
      if (req.where && req.where.length > 0) {
        for (const w of req.where) {
          const fieldPath = new FieldPath(...w.field.split('.'));
  const deserializedValue = deserializeField(w.value, db);
          query = query.where(fieldPath, w.operator, deserializedValue);
        }
       }

      // Apply order clauses
      if (req.orderBy && req.orderBy.length > 0) {
        for (const o of req.orderBy) {
          const fieldPath = new FieldPath(...o.field.split('.'));
          query = query.orderBy(fieldPath, o.direction);
        }
      }

      // Apply limit
      const limit = req.limit || 50;
      query = query.limit(limit);

      // Attach Firestore onSnapshot listener
      const unsubscribe = query.onSnapshot(
        (snapshot) => {
          const documents = snapshot.docs.map((d) => serializeDocument(d));
          const updatePayload: LiveUpdateEvent = {
            connectionId: req.connectionId,
            collectionPath: req.collectionPath,
    documents,
          };

          if (!event.sender.isDestroyed()) {
  event.sender.send(IPC_CHANNELS.LIVE_UPDATE_EVENT, updatePayload);
     }
        },
        (err) => {
          console.error(`[Live onSnapshot Error] ${req.collectionPath}:`, err);
        }
      );

      activeSubscriptions.set(key, unsubscribe);
      return true;

Real-time query pipeline bridging Firestore gRPC onSnapshot listeners across Electron's IPC boundary. Compiles dynamic where/orderBy clauses using dot-notation FieldPath parsing, serializes native snapshots into discriminated unions, guards against dead-sender window leaks, and tracks active subscriptions for automatic cleanup.

500 ops/batchBatch write chunk size
< 2msStatic query validation
30sScript execution ceiling
< 5msAir-gapped web demo latency

Technical Outcomes & Operational Takeaways

Eliminating proprietary per-seat database licensing provided development teams with a zero-cost, fully auditable alternative for managing distributed Firebase infrastructure. Service account keys and Google OAuth refresh tokens are secured at rest using native OS hardware keychains (safeStorage) with an AES-256-GCM cryptographic fallback for headless Linux environments, ensuring credential security across deployment environments.

Client-side static query validation drastically lowered failed database requests and unnecessary cloud read costs. By verifying Firestore constraints—such as ensuring all inequality operators target identical fields and rejecting duplicate array-contains filters—prior to network execution, developers catch query flaws in sub-2ms intervals. When composite indexes are required, automated extraction of Google Console index generation URLs turns fatal gRPC error codes into actionable deep links.

The dual-target architecture demonstrates that Electron desktop tooling can maintain complete web portability when designed around clean interface abstractions. Isolating database and IPC operations behind a unified AppApi interface enabled the identical React application to deploy simultaneously as a packaged native binary (deb, AppImage, dmg, exe) and as a zero-infrastructure static web application running entirely on client-side memory.