Skip to content
Back to work

AI · Environmental Intelligence

EnviroLens

A full-stack platform that pairs live Calgary air-quality data with an OpenAI compliance assistant — built to show how AI can surface the right institutional knowledge at the moment a decision gets made.

Next.js (App Router)TypeScriptOpenAI APIAQICN APIRechartsVercel

The problem

Environmental consulting knowledge tends to live in scattered reports and individual memories. When conditions change or a new compliance question comes up, the relevant past work is hard to recall on demand — so it often goes unused.

The approach

EnviroLens connects three things that are usually separate: the current environmental conditions, the regulatory context that explains what they mean, and the past project experience that shows how a similar situation was handled. The AI assistant sits on top, grounded in all three, so its answers are specific rather than generic.

How it's built

  • Server-side API routes keep the OpenAI and air-quality API keys off the client.
  • A /air-quality route fetches and normalizes live Calgary AQI data with server-side caching.
  • A /ai-assistant route composes the current conditions, the relevant project context, and conversation history into a single grounded prompt.
  • Cached revalidation keeps the dashboard fast while staying reasonably fresh.

Key features

Real-time air-quality dashboard

Live AQI with pollutant breakdowns (PM2.5, PM10, NO₂, O₃, CO), 24-hour trends, and health-risk indicators, visualized with Recharts.

Context-aware AI assistant

A chat assistant that knows the current air-quality conditions and explains the relevant Alberta regulations — grounded, not a generic chatbot.

Contextual knowledge base

Past project records are surfaced automatically when they're relevant to the current conditions, demonstrating a lightweight retrieval pattern.

Outcome

A responsive, deployed product with server-side data caching and graceful fallbacks (mock data when an upstream API is unavailable), scoring 95+ on Lighthouse performance. More importantly, it’s a concrete demonstration of an idea I care about: AI is most useful when it’s wired into the real system and the real context, not bolted on beside it.

Want to talk about building something like this?

Get in touch