|
| 1 | +## 🔥 Inspiration |
| 2 | + |
| 3 | +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. |
| 4 | + |
| 5 | +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™**. |
| 6 | + |
| 7 | +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. |
| 8 | + |
| 9 | +## 🧠 What it does |
| 10 | + |
| 11 | +**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. |
| 12 | + |
| 13 | +### Demo |
| 14 | + |
| 15 | +[](https://www.youtube.com/watch?v=EI5yT7_aD6U) |
| 16 | + |
| 17 | +### Try it out |
| 18 | + |
| 19 | +- [https://flameguardai.dlyog.com](https://flameguardai.dlyog.com) |
| 20 | +- [https://flameguardai-mcp.dlyog.com](https://flameguardai-mcp.dlyog.com) |
| 21 | + |
| 22 | + |
| 23 | +### Key Features: |
| 24 | +- 📸 Upload a home photo |
| 25 | +- 👁️ Analyze visible fire risks via **OpenAI Vision API** |
| 26 | +- 📚 Trigger deep research using the **Perplexity Sonar API** |
| 27 | +- 📄 Get a detailed, AI-generated report with: |
| 28 | + - Risk summary |
| 29 | + - Prevention strategies |
| 30 | + - Regional best practices |
| 31 | +- 🛠️ Optional contractor referrals for mitigation |
| 32 | +- 💬 Claude (MCP) chatbot integration for conversational analysis |
| 33 | +- 🧾 GDPR-compliant data controls |
| 34 | + |
| 35 | +Whether you’re protecting your home, buying a new one, or just want peace of mind — **FlameGuard AI™ turns a photo into a plan**. |
| 36 | + |
| 37 | + |
| 38 | +## ⚙️ How we built it |
| 39 | + |
| 40 | +FlameGuard AI™ is powered by a modern GenAI stack and built to scale. |
| 41 | + |
| 42 | +- **Frontend**: Lightweight HTML dashboard with user account control, photo upload, and report access |
| 43 | +- **Backend**: Python (Flask) with RESTful APIs |
| 44 | +- **Database**: PostgreSQL (local) with **Azure SQL-ready** schema |
| 45 | +- **Containerization**: Dockerized for flexible local or cloud deployment |
| 46 | +- **Cloud-ready**: Built for **Azure App Service** with dedicated database support |
| 47 | + |
| 48 | +### 🔍 Deep Research with Perplexity Sonar API |
| 49 | + |
| 50 | +The real innovation is how we use the **Perplexity Sonar API**: |
| 51 | + |
| 52 | +1. After analyzing the uploaded image, we identify specific vulnerabilities (e.g., flammable roof, dry brush nearby). |
| 53 | +2. For each risk, we generate a **custom research plan** — covering severity, mitigation strategies, and localized insights. |
| 54 | +3. We run **iterative agentic-style calls** to Perplexity Sonar — treating it like a research assistant gathering the best available information. |
| 55 | +4. The research is **aggregated, organized, and formatted** into an actionable HTML report — complete with citations, links, and visual guidance. |
| 56 | + |
| 57 | +This kind of **structured, trustworthy, AI-powered research would not be possible without Perplexity**. |
| 58 | + |
| 59 | + |
| 60 | +## 🚧 Challenges we ran into |
| 61 | + |
| 62 | +- 🔁 Designing **multi-step research prompts** for Perplexity Sonar that maintain context across multiple fire vulnerabilities |
| 63 | +- 🏠 Building **robust image analysis prompts** that generalize across diverse home types, lighting, and angles |
| 64 | +- ⏳ Coordinating **asynchronous flows** between user input, vision analysis, deep research, and report generation |
| 65 | +- ❌ 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. |
| 66 | + - While the idea worked conceptually, the email results from Perplexity were not reliably accurate or complete. |
| 67 | + - For now, we've **disabled this feature** in the UI, but it's a high-priority enhancement for our roadmap. |
| 68 | + - 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. |
| 69 | +- ⚖️ 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. |
| 70 | + |
| 71 | + |
| 72 | +## 🏆 Accomplishments that we're proud of |
| 73 | + |
| 74 | +- Successfully used **OpenAI Vision + Perplexity Sonar API** together in a meaningful, real-world workflow |
| 75 | +- Built a functioning **MCP server** that integrates seamlessly with Claude for desktop users |
| 76 | +- Created a product that is **genuinely useful for homeowners today** — not just a demo |
| 77 | +- Kept the experience simple, affordable, and scalable from the ground up |
| 78 | +- Made structured deep research feel accessible and trustworthy |
| 79 | + |
| 80 | + |
| 81 | +## 📚 What we learned |
| 82 | + |
| 83 | +- The **Perplexity Sonar API** is incredibly powerful when used agentically — not just for answers, but for reasoning. |
| 84 | +- Combining **multimodal AI (image + research)** opens up powerful decision-support tools. |
| 85 | +- Users want **actionable insights**, not just data — pairing research with guidance makes all the difference. |
| 86 | +- Trust and clarity are key: our design had to communicate complex information simply and helpfully. |
| 87 | + |
| 88 | + |
| 89 | +## 💳 Admin Credit System |
| 90 | + |
| 91 | +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. |
| 92 | + |
| 93 | +### What the Credit System Does: |
| 94 | +- 🧾 **Tracks credits** per user (free and purchased) |
| 95 | +- ➕ Admins can **grant credits** |
| 96 | +- ➖ Admins can **revoke credits** safely (no negative balances) |
| 97 | +- 🔄 **Usage is logged** with full transaction history |
| 98 | +- 👁️ Credits update in real-time within the admin panel |
| 99 | + |
| 100 | +### Admin Panel Features: |
| 101 | +- View current user balances |
| 102 | +- Grant or subtract credits via secure modals |
| 103 | +- Automatically updates the user interface after each action |
| 104 | +- View recent credit transaction history |
| 105 | + |
| 106 | +### Credit Transaction Types: |
| 107 | +- `admin_grant`: credits added by admin |
| 108 | +- `usage`: credits used by the user for assessments |
| 109 | +- `admin_revoke`: manual deduction by admins |
| 110 | +- `initial_free`: signup bonus for new users |
| 111 | + |
| 112 | +### Backend Highlights: |
| 113 | +- 🔐 Safe SQL logic with balance checks |
| 114 | +- 📦 Modular logic in `credit_utils.py` |
| 115 | +- 🧠 Clean REST APIs for credit updates |
| 116 | +- 📝 Full logging of every transaction |
| 117 | + |
| 118 | +We designed this credit system to be **simple for admins**, **transparent for users**, and **ready for future billing integration**. |
| 119 | + |
| 120 | +--- |
| 121 | +### 📊 Market Opportunity (U.S.) |
| 122 | + |
| 123 | +- 🏠 **Home Services & Improvement Market**: ~$740B TAM |
| 124 | + Covers home maintenance, upgrades, and safety systems |
| 125 | + Sources: Verified Market Research, GlobeNewswire |
| 126 | + |
| 127 | +- 🔥 **Wildfire & Fire Risk Mitigation**: $8.6B → $19.9B |
| 128 | + Rising demand due to climate change & insurance premiums |
| 129 | + Source: Verified Market Research |
| 130 | + |
| 131 | +- 🧾 **Home Inspection Market**: ~$4B annually |
| 132 | + Home inspections are required for ~90% of real estate sales |
| 133 | + Source: IBISWorld |
| 134 | + |
| 135 | +- 💸 **Estimated SAM**: $100–$150B |
| 136 | + Focused on wildfire-prone homeowners, real estate firms, insurers, and contractors |
| 137 | + (California, Colorado, Oregon, etc.) |
| 138 | + |
| 139 | +- 🚀 Huge gap in end-to-end solutions that go beyond assessment to action |
| 140 | + FlameGuard AI fills this gap by identifying risks **and** connecting to local pros |
| 141 | + |
| 142 | + |
| 143 | +## 🚀 What's next for FlameGuard AI™ - Prevention is Better Than Cure |
| 144 | + |
| 145 | +We're just getting started. |
| 146 | + |
| 147 | +### Next Steps: |
| 148 | +- 🌐 Deploy to **Azure App Services** with production-ready database |
| 149 | +- 📱 Launch mobile version with location-based scanning |
| 150 | +- 🏡 Partner with **home inspection services** and **homeowners associations** |
| 151 | +- 💬 Enhance Claude/MCP integration with voice-activated AI reporting |
| 152 | +- 💸 Introduce B2B plans for real estate firms and home safety consultants |
| 153 | +- 🛡️ Expand database of **local contractor networks** and regional fire codes |
| 154 | + |
| 155 | + |
| 156 | +We’re proud to stand with homeowners — not just to raise awareness, but to enable action. |
| 157 | + |
| 158 | +**FlameGuard AI™ – Because some homes survive when others don’t.** |
| 159 | + |
| 160 | +### 🙏 Thank You |
| 161 | + |
| 162 | +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. |
| 163 | + |
0 commit comments