⌜ J.A.R.V.I.S. // ONLINE ⌝
Case Study • Real-Time Systems

Enterprise Collaboration, Unified.

Nexus is a comprehensive workspace built on Next.js 14. What started as an exploration into real-time systems evolved into an enterprise-grade platform featuring HD video meetings, context-aware AI assistants, universal semantic search, and zero-trust security using Stream, Clerk, and Google Gemini.

Next.js 14StreamClerkFirebaseGoogle GeminiPineconeLiveblocks
Nexus screenshot preview 1
01.Overview
1 / 4

The Vision

In an era of remote work, seamless collaboration is non-negotiable. Yet, many conferencing platforms feel bloated, resource-heavy, and disconnected from the asynchronous tools we use daily. I built Nexus to challenge this standard.

Nexus is a unified communication layer. The vision was to tightly couple real-time, low-latency HD video with persistent, threaded text chat—all within a lightning-fast web interface built on the Next.js 14 App Router that feels native and responsive.

Engineering the Engine

Building a synchronous real-time app forces you to confront the realities of network latency, browser resource limits, and state synchronization.

Global Edge Infrastructure

Instead of managing low-level WebRTC SFUs from scratch, I leveraged the Stream Video and Chat SDKs. This offloaded the heavy lifting of global media routing, allowing the platform to deliver crystal-clear 1080p video and spatial audio with sub-50ms latency across regions.

Zero-Trust Architecture

Enterprise tools demand strict access control. By integrating Clerk and a server-brokered approach for Firebase Storage using the Admin SDK, all files are requested via temporary signed URLs with 5-minute TTLs. Tests demonstrate that updating or deleting memberships cuts off storage access with an propagation latency of ~1.1s.

Multiplayer CRDT Canvas

We integrated Yjs CRDTs and Liveblocks to drive real-time multiplayer states. Whether typing rich text or drawing whiteboard components, user actions merge conflict-free locally before syncing, guaranteeing high performance even offline.

Universal Semantic Search

We built a dual-engine workspace-isolated search. Document embeddings are generated via gemini-embedding-001. If our external Pinecone index is disabled, the server executes an in-memory cosine similarity fallback across all documents in just 0.36 ms (mean), synthesized by gemini-2.5-flash.

Context-Aware AI

Powered by the Vercel AI SDK and gpt-4o-mini, Nexus includes a floating context assistant that reads your active canvas to summarize or analyze data. It also aggregates the past 24 hours of workspace activity into a daily cached brief to keep the whole team aligned.

Phase 5 Parity Features

Designed for scale, the architecture outlines one-to-many Webinars with registration workflows, dynamic Breakout Rooms for splitting calls, and persistent Voice Channels for drop-in drop-out audio cooperation.

Telemetry Observability Registry

Latency distribution suite logs evaluated locally over concurrent loads.

AI & SearchSamples: 20
LLM Synthesis (Gemini 2.5 Flash)

Streams natural language response synthesis using matched document context.

Mean
3.48s
Median
3.13s
P95 Max
6.45s
AI & SearchSamples: 20
Firestore Read (Search Retrieval)

Reads raw matched documents dynamically from isolated workspace collections.

Mean
1.35s
Median
1.37s
P95 Max
1.40s
SecuritySamples: 100
End-to-End Permission API RTT

Total round-trip time for permission query requests, including Clerk token validation.

Mean
1.17s
Median
833.5ms
P95 Max
1.64s
SecuritySamples: 10
Revocation Propagation Delay

Time delay before Firestore/Clerk token updates block signed URL access.

Mean
1.12s
Median
1.14s
P95 Max
1.20s
SystemSamples: 99
Daily Activity Brief Caching

Aggregates past 24-hour log actions, updates briefs cache in Firestore.

Mean
1.03s
Median
722.5ms
P95 Max
1.55s
SystemSamples: 25
Workspace Creation Latency

Initializes brand new workspace parameters, database structures, and default channels.

Mean
869.5ms
Median
953.2ms
P95 Max
1.88s
AI & SearchSamples: 33
Gemini Embedding Generation

API call to gemini-embedding-001 mapping canvas texts to 768-dimensional vectors.

Mean
496.3ms
Median
469.3ms
P95 Max
808.2ms
SecuritySamples: 184
RBAC Security Checks (PermissionService.can)

Evaluates role permission mappings for active workspace users dynamically from Firestore.

Mean
401.1ms
Median
308.3ms
P95 Max
771.1ms
SecuritySamples: 50
End-to-End Signed URL Fetch RTT

Total client round-trip time fetching temporary signed storage read credentials.

Mean
377.4ms
Median
347.8ms
P95 Max
378.3ms
SecuritySamples: 61
Signed Upload URL Generation (API)

Generates Admin-SDK signed storage URLs for zero-trust upload isolation.

Mean
347.6ms
Median
312.9ms
P95 Max
414.5ms
AI & SearchSamples: 20
In-Memory Cosine Similarity Match

Calculates similarity matching indices in-memory on Next.js Edge worker instances.

Mean
0.4ms
Median
0.1ms
P95 Max
2.6ms

View the source.

GitHub Repository