π Overview
Navigato Platinum is a premium...
In a venue hosting 132,000 attendees, congestion and emergency response are critical life-safety challenges. Navigato solves this by aggregating real-time occupancy data and delivering strategic insights via an AI-Grounded Spatial Hub.
π§ Approach and Logic
Large venues suffer from "Information Blackouts" during peak events. Navigato creates a Single Source of Truth across defined zones (Gates, Food Courts, Pavilions).
1. Strategic Decision Making
- Status Derivation: Zone health (Clear, Moderate, Crowded, Critical) is dynamically calculated using a weighted threshold algorithm based on live capacity-to-density ratios.
- Pathfinding (Dijkstra's Algorithm): Navigation routes are not just the shortest path; they are the fastest path. The edge weights in our Dijkstra implementation are adjusted in real-time based on the congestion ratio of each zone.
- AI Context Grounding: The Gemini assistant is "Stitched" into the stadium's live telemetry. Every prompt is injected with the current JSON state of the venue, enabling hyper-accurate, real-time advice.
β‘ The Twin-Engineβ’ Architecture
To achieve 100% startup stability on Google Cloud Run, Navigato utilizes a proprietary Twin-Engine boot sequence.
sequenceDiagram
participant GCR as Google Cloud Run
participant E1 as Engine 1 (Safe-Start)
participant E2 as Engine 2 (Platinum Core)
GCR->>E1: SIGINIT Launch
E1->>E1: Bind Port 8080 (Instantly)
Note over E1: Health Check Passed (2ms)
E1->>E2: Modular Dynamic Import
E2->>E2: Warm up AI Clusters & GCS Streams
E2-->>E1: Core Synchronized
Note over E1,E2: Platform 100% Operational
- Engine 1 (The Shield): A lightweight Node.js entrypoint that binds to the assigned PORT immediately to prevent timeout errors.
- Engine 2 (The Intelligence): The modular Express 5.0 application logic, loaded after the port is stable.
π Full Project Structure
βββ server/ # PLATINUM BACKEND ENGINE
β βββ boot.ts # Engine 1: Instant-bind bootstrapper
β βββ index.ts # Engine 2: Modular app logic (Express 5)
β βββ routes/ # API Endpoints
β β βββ ai.ts # Gemini 1.5 Flash Chat & Triage
β β βββ incidents.ts # GCS Visual Telemetry Pipeline
β βββ services/ # External Service Layer
β β βββ gemini.ts # Google Gen AI SDK Integration
β β βββ storage.ts # Cloud Storage Stream Engine
β β βββ analytics.ts # BigQuery & Event Logging
β βββ middleware/ # Security & Auth
β βββ auth.ts # Firebase Admin Token Verification
βββ src/ # ELITE FRONTEND HUB (React 19)
β βββ components/ # Premium Component Library
β β βββ attendee/ # ZoneMap, LiveHub, Dispatch
β β βββ layout/ # Glassmorphism Framework
β βββ context/ # Global State (ZoneContext)
β βββ hooks/ # Custom Logic (useAuth)
β βββ App.tsx # Main System Entrypoint
βββ Dockerfile # Multi-Stage Production Shield
βββ vite.config.js # Advanced Rollup Code-Splitting
βββ deploy.ps1 # One-Click Cloud Run Deployer
π οΈ Google Services Integration
| Service | Integration Detail | Location |
|---|---|---|
| Google Cloud Run | Multi-stage container runtime with Twin-Engine boot. |
Dockerfile, boot.ts
|
| Google Maps JS API | Satellite imagery + Advanced Markers + Directions. | ZoneMap.tsx |
| Gemini 1.5 Flash | AI Chat Assistant & Visual Incident Triage. |
gemini.ts, ai.ts
|
| Cloud Storage | Visual telemetry streams for emergency dispatch. | storage.ts |
| Firebase Admin | Role-based custom claims & Token security. | auth.ts |
| Google Cloud Logging | Structured JSON logging for 100% observability. |
index.ts, boot.ts
|
ποΈ System Visualizations
1. The Intelligence Pipeline (AI Triage)
graph TD
A[Attendee Report] -->|Satellite Telemetry| B(Google Cloud Storage)
A -->|Contextual Description| C(Navigato AI)
B --> C
C -->|Gemini 1.5 Flash| D{Strategic Severity}
D -->|HIGH| E[Emergency Staff Dispatch]
D -->|LOW/MED| F[Operational Logging]
E --> G(Cloud Pub/Sub Alert)
2. The Platinum Cloud Stack
graph LR
User[Attendee] -->|React 19| FE(Frontend Hub)
FE -->|Vite 8 / ESM| BE(Platinum Core)
BE -->|Twin-Engineβ’ Boot| CR(Cloud Run)
CR -->|Security| FA(Firebase Admin)
CR -->|Spatial| GM(Google Maps)
CR -->|Gen AI| AI(Gemini 1.5)
π Setup & Running locally
- Environment Setup: Add your
VITE_GOOGLE_MAPS_API_KEYto the.envfile. -
Install & Build:
npm install npm run build -
Ignite the Platform:
npm start
[!IMPORTANT]
Production Note: Navigato Platinum is optimized for the Narendra Modi Stadium geolocation. For local testing, use the "Force Sync" demo mode to bypass live GPS requirements.
Navigato Platinum β’ Strategic Crowd Intelligence
Built by Abhishek for Promptwars.
Top comments (0)