DEV Community

Cover image for Aegis-OS: Industrial Intelligence HUD by Gemini 2.5-Flash
Tahir yamin
Tahir yamin

Posted on

Aegis-OS: Industrial Intelligence HUD by Gemini 2.5-Flash

New Year, New You Portfolio Challenge Submission

This is a submission for the New Year, New You Portfolio Challenge Presented by Google AI

About Me

I'm Tahir Yamin, an industrial Mechanical Engineer from Pakistan passionate about bringing AI to high-stakes operational environments. My background spans manufacturing automation, power plant operations, and industrial safety systems—domains where a single engineering decision can mean the difference between smooth operations and catastrophic failure.

With this portfolio, I wanted to demonstrate how Google's Gemini AI can revolutionize industrial engineering by transforming static documentation (P&ID diagrams, equipment manuals, safety protocols) into interactive, intelligent assistants available 24/7 on the factory floor.

Portfolio

🛡️ Aegis-OS: Industrial Intelligence HUD

GitHub: https://github.com/Tahir-yamin/agent-command-center

Live Interactive Demo - Set your Screen at 75% for complete view

👆 Click and interact with the Industrial HUD above - try uploading a P&ID diagram, querying the manual database, or chatting with the AI assistant!

Cloud Run Deployment (Required)

✅ Successfully Deployed to Google Cloud Run

$ gcloud run deploy aegis-os \
  --image gcr.io/qwiklabs-gcp-04-1def6ef2b7e7/aegis-os \
  --platform managed \
  --region us-east1 \
  --allow-unauthenticated \
  --port 8080 \
  --set-secrets="NEXT_PUBLIC_GEMINI_API_KEY=GEMINI_API_KEY:latest,NEXT_PUBLIC_RAG_API_KEY=RAG_API_KEY:latest" \
  --labels dev-tutorial=devnewyear2026

Deploying container to Cloud Run service [aegis-os] in project [qwiklabs-gcp-04-1def6ef2b7e7] region [us-east1]
✓ OK Deploying... Done.
  ✓ OK Creating Revision...
  ✓ OK Routing traffic...
  ✓ OK Setting IAM Policy...
Done.
Service [aegis-os] revision [aegis-os-00002-dft] has been deployed and is serving 100 percent of traffic.
Service URL: https://aegis-os-765925296978.us-east1.run.app
Enter fullscreen mode Exit fullscreen mode

Deployment Components:

  • Multi-stage Dockerfile with Next.js standalone builds
  • Google Secret Manager for dual-key API management
  • IAM Secret Accessor role configured
  • Container: gcr.io/qwiklabs-gcp-04-1def6ef2b7e7/aegis-os

Note: Cloud Run deployment completed on Qwiklabs sandbox. Due to regional payment restrictions (Pakistani bank cards not accepted by Google Cloud billing), permanent hosting faces verification challenges. The Vercel embed above provides full functionality for demonstration.

What It Does

Aegis-OS leverages Gemini 2.5-Flash's multimodal capabilities to provide:

  1. P&ID Analysis - Upload engineering blueprints for instant component identification and risk assessment
  2. Manual RAG Search - Query thousands of pages of technical documentation in seconds
  3. 24/7 Industrial AI - Safety-trained assistant for operational support

How I Built It

Tech Stack

Frontend: Next.js 15 + TypeScript

Styling: Tailwind CSS + Custom HUD Animations

AI: Google Gemini 2.5-Flash (Vision + RAG + Chat)

Deployment: Docker + Cloud Run + Secret Manager

Architecture: Dual-key API with 5-tier retry logic

Gemini Integration

Three Multimodal Capabilities:

  1. Vision Analysis:
const visionModel = genAI.getGenerativeModel({ model: "gemini-2.5-flash" });
const result = await visionModel.generateContent([
  { inlineData: { data: base64Image, mimeType: "image/png" } },
  { text: "Analyze this P&ID diagram..." }
]);
Enter fullscreen mode Exit fullscreen mode
  1. RAG Implementation:
const ragModel = getGenAI('rag').getGenerativeModel({ model: "gemini-2.5-flash" });
const chunks = await vectorSearch(query);
const context = chunks.join('\n');
const response = await ragModel.generateContent([
  `Context: ${context}`,
  `Query: ${query}`
]);
Enter fullscreen mode Exit fullscreen mode
  1. Industrial Persona: Fine-tuned safety-critical responses

Design Decisions

API Resilience: Built for 24/7 industrial uptime with:

  • Dual-key isolation (chat vs. RAG/Vision)
  • Smart retry with exponential backoff
  • Daily vs. minute-limit detection

Industrial HUD Aesthetic:

  • Tactical polygon borders
  • Biometric scanline animations
  • SVG noise grain overlay
  • RGB glitch effects

What I'm Most Proud Of

1. Production-Grade Resilience

Most demos ignore quota limits. I built a 5-tier retry system:

const isDailyLimit = errorMessage.includes("PerDay");
if (isDailyLimit) {
  throw new Error("GEMINI_DAILY_LIMIT: Quota exhausted for 24h.");
}
const delay = extractWaitTime(error) || (5000 * Math.pow(2, attempt));
Enter fullscreen mode Exit fullscreen mode

2. Real-World Impact

Designed for actual plant operators:

  • Diagnostic time: Hours → Seconds
  • Safety: Instant instrumentation clarity
  • Expertise scaling: Junior operators get senior-level insights

3. Technical Documentation

Consolidated learnings into reusable patterns:


GoogleAIChallenge #GeminiAI #BuildWithAI #Industry40 #NextJS #CloudRun

Top comments (0)