🔥 Inspiration
The devastating LA wildfires were more than a tragic event — they were a turning point. While watching homes burn to the ground, I saw a story about one house that miraculously survived. That story stuck with me.
What protected that home? It wasn’t luck. It was planning — fire-resistant materials, defensible space, and design choices made long before disaster struck. This realization — combined with the rising difficulty of securing home insurance — inspired us to build FlameGuard AI™.
We wanted to create a tool that empowers homeowners to take fire risk prevention into their own hands — not just react after it’s too late.
🧠 What it does
FlameGuard AI™ helps homeowners, buyers, and property professionals detect and act on external fire vulnerabilities like wildfires or neighboring structure fires. It’s more than a scan — it’s a personalized research assistant for your home.
Key Features:
- 📸 Upload a home photo
- 👁️ Analyze visible fire risks via OpenAI Vision API
- 📚 Trigger deep research using the Perplexity Sonar API
- 📄 Get a detailed, AI-generated report with:
- Risk summary
- Prevention strategies
- Regional best practices
- 🛠️ Optional contractor referrals for mitigation
- 💬 Claude (MCP) chatbot integration for conversational analysis
- 🧾 GDPR-compliant data controls
Whether you’re protecting your home, buying a new one, or just want peace of mind — FlameGuard AI™ turns a photo into a plan.
⚙️ How we built it
FlameGuard AI™ is powered by a modern GenAI stack and built to scale.
- Frontend: Lightweight HTML dashboard with user account control, photo upload, and report access
- Backend: Python (Flask) with RESTful APIs
- Database: PostgreSQL (local) with Azure SQL-ready schema
- Containerization: Dockerized for flexible local or cloud deployment
- Cloud-ready: Built for Azure App Service with dedicated database support
🔍 Deep Research with Perplexity Sonar API
The real innovation is how we use the Perplexity Sonar API:
- After analyzing the uploaded image, we identify specific vulnerabilities (e.g., flammable roof, dry brush nearby).
- For each risk, we generate a custom research plan — covering severity, mitigation strategies, and localized insights.
- We run iterative agentic-style calls to Perplexity Sonar — treating it like a research assistant gathering the best available information.
- The research is aggregated, organized, and formatted into an actionable HTML report — complete with citations, links, and visual guidance.
This kind of structured, trustworthy, AI-powered research would not be possible without Perplexity.
🚧 Challenges we ran into
- 🔁 Designing multi-step research prompts for Perplexity Sonar that maintain context across multiple fire vulnerabilities
- 🏠 Building robust image analysis prompts that generalize across diverse home types, lighting, and angles
- ⏳ Coordinating asynchronous flows between user input, vision analysis, deep research, and report generation
- ❌ One major challenge: we attempted to automatically retrieve contractor email addresses via Perplexity API to pre-fill outreach requests — with user consent, we wanted to connect homeowners directly to local professionals and even submit quote requests on their behalf.
- While the idea worked conceptually, the email results from Perplexity were not reliably accurate or complete.
- For now, we've disabled this feature in the UI, but it's a high-priority enhancement for our roadmap.
- Future plan: we'll integrate a dedicated MCP server for contractors, allowing us to directly submit quote requests from homeowners in a structured, secure workflow.
- ⚖️ Balancing speed and depth: AI-generated insights must feel fast, but research quality takes time — designing a UX that handles that tension gracefully was not easy.
🏆 Accomplishments that we're proud of
- Successfully used OpenAI Vision + Perplexity Sonar API together in a meaningful, real-world workflow
- Built a functioning MCP server that integrates seamlessly with Claude for desktop users
- Created a product that is genuinely useful for homeowners today — not just a demo
- Kept the experience simple, affordable, and scalable from the ground up
- Made structured deep research feel accessible and trustworthy
📚 What we learned
- The Perplexity Sonar API is incredibly powerful when used agentically — not just for answers, but for reasoning.
- Combining multimodal AI (image + research) opens up powerful decision-support tools.
- Users want actionable insights, not just data — pairing research with guidance makes all the difference.
- Trust and clarity are key: our design had to communicate complex information simply and helpfully.
💳 Admin Credit System
To help manage resource usage and scale responsibly, we built a credit-based system for users. This allows us to give out free trial credits, support premium usage tiers, and track consumption transparently.
What the Credit System Does:
- 🧾 Tracks credits per user (free and purchased)
- ➕ Admins can grant credits
- ➖ Admins can revoke credits safely (no negative balances)
- 🔄 Usage is logged with full transaction history
- 👁️ Credits update in real-time within the admin panel
Admin Panel Features:
- View current user balances
- Grant or subtract credits via secure modals
- Automatically updates the user interface after each action
- View recent credit transaction history
Credit Transaction Types:
admin_grant: credits added by adminusage: credits used by the user for assessmentsadmin_revoke: manual deduction by adminsinitial_free: signup bonus for new users
Backend Highlights:
- 🔐 Safe SQL logic with balance checks
- 📦 Modular logic in
credit_utils.py - 🧠 Clean REST APIs for credit updates
- 📝 Full logging of every transaction
We designed this credit system to be simple for admins, transparent for users, and ready for future billing integration.
📊 Market Opportunity (U.S.)
🏠 Home Services & Improvement Market: ~$740B TAM
Covers home maintenance, upgrades, and safety systems
Sources: Verified Market Research, GlobeNewswire🔥 Wildfire & Fire Risk Mitigation: $8.6B → $19.9B
Rising demand due to climate change & insurance premiums
Source: Verified Market Research🧾 Home Inspection Market: ~$4B annually
Home inspections are required for ~90% of real estate sales
Source: IBISWorld💸 Estimated SAM: $100–$150B
Focused on wildfire-prone homeowners, real estate firms, insurers, and contractors
(California, Colorado, Oregon, etc.)🚀 Huge gap in end-to-end solutions that go beyond assessment to action
FlameGuard AI fills this gap by identifying risks and connecting to local pros
🚀 What's next for FlameGuard AI™ - Prevention is Better Than Cure
We're just getting started.
Next Steps:
- 🌐 Deploy to Azure App Services with production-ready database
- 📱 Launch mobile version with location-based scanning
- 🏡 Partner with home inspection services and homeowners associations
- 💬 Enhance Claude/MCP integration with voice-activated AI reporting
- 💸 Introduce B2B plans for real estate firms and home safety consultants
- 🛡️ Expand database of local contractor networks and regional fire codes
🙏 Thank You
Big thanks to DevPost and Perplexity for making this hackathon possible. Without the Perplexity Sonar API, this level of structured, trusted, AI-driven research would simply not be possible.
We’re proud to stand with homeowners — not just to raise awareness, but to enable action.
FlameGuard AI™ – Because some homes survive when others don’t.
Built With
- claude-desktop-mcp-client
- docker
- flask
- github
- mcp-server
- model-context-protocol
- openai
- passowrd-less-auth
- perplexity
- postgresql
- python
- sonar

Log in or sign up for Devpost to join the conversation.