Inspiration
Every day, people receive urgent compliance notices, convoluted promotional financing offers, and suspicious contract clauses engineered to trigger fast decisions under stress. Seeking quick clarity from conventional cloud AI chatbots forces an unfair trade-off: hand over sensitive personal details (bank account numbers, SSNs, addresses, full PDFs) just to understand what a document means. Worse, when someone needs a trusted family member, advisor, or teammate to step in, critical context gets lost in fragmented screenshots. AEGISLIGHT was built for #BuildHybridAI 2026 around a simple premise: AI should protect people on their own device first, ask explicit consent before touching the cloud, and never make you surrender your privacy to stay safe.
What it does
AEGISLIGHT ("Your Digital Bodyguard. Your Privacy. Your Control.") unites three connected protection systems around an eight-layer Decision Capsule across a responsive 3D web platform and a Chrome Manifest V3 extension: GUARD — On-Device Digital Threat Intelligence: Inspects suspicious messages, contracts, or selected webpage text locally (InferenceMode.ONLY_ON_DEVICE paired with deterministic scoring across 6 risk dimensions: Urgency Pressure, Financial Pressure, Unverified Claims, Payment Instructions, Hidden Conditions, and Manipulative Wording). Renders a Risk DNA visualization backed by exact evidence snippets and plain-English rewrites. AIRLOCK — Privacy-First Document Intelligence & Consent Gate: Extracts text from uploaded PDFs directly in the browser via PDF.js, detects sensitive identifiers (emails, phone numbers, SSNs/TINs/PANs/Aadhaar, Luhn-validated card numbers, bank accounts, addresses, and person names), swaps them for reversible tokens ([PERSON_1], [SSN_ID_1]), and stores token maps strictly in memory and local IndexedDB. Only redacted payloads can be sent to cloud reasoning (InferenceMode.ONLY_IN_CLOUD)—and only after toggling an explicit consent switch. Includes a Cost of Signing amortization engine modeling promotional APR transitions and cumulative 5-year repayment horizons. RELAY — Human Responsibility Transfer: Packages findings into an eight-layer Decision Capsule (Risk Intelligence, Supporting Evidence, Plain-English Clarity, Financial Impact, Critical Deadlines, Action Plan, Privacy Ledger, Human Handover) and enables selective field sharing, recipient acceptance, clarification requests, return of responsibility, and an auditable handover timeline. Privacy Ledger & Three Appearance Modes: Tracks local vs. cloud byte telemetry transparently (displaying honest inferenceSource labels without silent cloud fallback) across Light Intelligence, Dark Command, and Custom Studio themes.
How we built it
Frontend & Spatial 3D Interface: Built with React 19, TypeScript, Vite, Tailwind CSS v4, and Framer Motion. Engineered an interactive WebGL experience using Three.js, React Three Fiber, and Drei (GlobalAegisCanvas & AirlockChamber3DCanvas) featuring custom GLSL Fresnel crystal glass shaders, iridescent silk horizon shaders, procedural studio cubemap lighting, a cursor-tracking specular point light, a 10-blade articulated Airlock aperture, and spatial tilt cards. Hybrid AI Architecture: Powered by the Firebase AI Logic Web SDK (firebase/ai) with strict separation between InferenceMode.ONLY_ON_DEVICE (Chrome Prompt API / Gemini Nano) and InferenceMode.ONLY_IN_CLOUD, layered over local deterministic NLP/pattern engines (guardAnalyzer.ts & piiDetector.ts). Deterministic Financial Modeling (costEngine.ts): Calculates multi-period amortization, upfront/monthly fees, promotional APR cliffs, and Month 1 → Year 5 totals directly on-device: M=(1+r)n−1P⋅r(1+r)n Privacy-Enforced Backend: Firebase Authentication (Anonymous sign-in), Cloud Firestore (protected by strict firestore.rules that reject writes containing rawText, originalText, tokenMappings, or piiMappings), Firebase Remote Config, and Firebase App Check. Chrome Manifest V3 Extension: Captures highlighted text directly from any webpage via context menus or the Side Panel (chrome.sidePanel, chrome.contextMenus, chrome.scripting), computes local Risk DNA and PII redaction offline, and hands off sanitized text cleanly to the Airlock workspace. Deployment: Source hosted on GitHub and deployed to Vercel (https://aegislight.vercel.app) with SPA rewrites.
Challenges we ran into
Guaranteeing Strict On-Device vs. Cloud Privacy Boundaries: Preventing unintended fallback to cloud inference when Chrome's on-device Gemini Nano (ONLY_ON_DEVICE) is unavailable required explicit mode isolation, fallback to local deterministic heuristics, and transparent UNAVAILABLE / LOCAL_DETERMINISTIC badges rather than masking failures. Database-Level Privacy Guarantees: Enforcing that raw documents and PII token maps can never leak to the cloud even if client code changes meant writing explicit validation functions (containsForbiddenPrivacyFields) directly into firestore.rules alongside IndexedDB local-only storage. Mixing Frosted Glass UI with Live 3D WebGL: Standard CSS backdrop-filter: blur(...) cards seated over a fixed WebGL canvas washed out underlying 3D models. Solving this required building an inline WebGL viewport (AirlockChamber3DCanvas) for the Airlock chamber, non-blurred transparent showcase framing for the Tri-Nexus architecture, and frame-rate-independent damping (1 - exp(-speed * dt)) so initial WebGL shader compilation frame spikes never caused 3D rotation overshoots. Preventing False-Positive Name Redaction: Naive title-case regexes initially swallowed document headings like "Contact" or "Annual Percentage". Adding structural label heuristics and domain exclusion sets (NON_PERSON_TITLE_CASE / NON_PERSON_WORDS) combined with Luhn verification kept local tokenization accurate without breaking document readability.
Accomplishments that we're proud of
Zero Raw Data Cloud Footprint by Architecture: Raw source text and reversible PII mappings remain strictly in browser memory / IndexedDB and are rejected at the Firestore security-rule layer. End-to-End Working Hybrid AI + Extension Pipeline: Users can highlight text on any website in Chrome, score manipulation tactics locally, redact PII offline, project 5-year financial impacts, optionally consent to sanitized cloud deep analysis, and delegate an 8-layer Decision Capsule to a trusted human. Cinema-Grade 3D Interactive Protection Experience: Custom Fresnel glass shaders, responsive 3D pedestals, articulated 10-blade iris gate mechanics, and synchronized UI-to-WebGL state across Light, Dark, and Custom Studio themes—running smoothly with automated Vitest verification across redaction, cost modeling, hybrid routing, and extension bundles.
What we learned
Designing around explicit consent turns hybrid AI from a background optimization into a trust-building UX primitive—users understand what stayed local, how many identifiers were tokenized, and why the cloud only sees placeholders. Writing custom WebGL shading paired with clean DOM anchor synchronization requires balancing glassmorphism, lighting contrast across light/dark themes, and clamped delta damping (Math.min(delta, 0.05)) across hardware/software WebGL renderers. Combining deterministic financial/Luhn engines with generative AI ensures numbers, amortization schedules, and PII checks never hallucinate.
What's next for Untitled
Encrypted Cross-Device Local Vault Sync: Optional zero-knowledge client-side passphrase encryption (WebCrypto AES-GCM) so users can safely back up their local token vaults across devices without exposing plaintext to any server. Expanded Multimodal Document & Image Inspection: Extending local on-device redaction (blurring sensitive regions in scanned IDs/screenshots via Canvas/OCR) before user-approved cloud inspection. Real-Time Phishing & Calendar Reminder Hooks: Converting Decision Capsule deadlines into native calendar reminders and structured export packs (signed JSON/PDF summaries) for legal, financial, and family caregivers.