ronknight / firemon

🌐 Real-time wildfire tracking system with Leaflet.js maps

Home Page:https://pinoyitsolution.com

Repository from Github https://github.comronknight/firemonRepository from Github https://github.comronknight/firemon

🌐 Real-time wildfire tracking system with Leaflet.js maps

Features β€’ Installation β€’ Usage β€’ API Integration β€’ Visualization β€’ Security β€’ Disclaimer


🌟 Features

  • Real-time NWS alert monitoring for California
  • Automatic IP-based location detection
  • Interactive map visualization with Leaflet.js
  • Manual location override capabilities
  • Background data refresh (1-hour intervals)
  • Responsive web interface
  • Alert filtering for:
    • Wildfires
    • Evacuation orders
    • Red flag warnings

πŸ› οΈ Installation

git clone https://github.com/ronknight/firemon.git
cd firemon
pip install -r requirements.txt

πŸ–₯️ Usage

  1. Start the Flask server:
python3 app.py
  1. Access the web interface at http://localhost:8000

Manual Location Configuration:

  • Submit county/city/ZIP via web form
  • Map automatically centers on specified location

πŸ”Œ API Integration

import requests

# Get active alerts
response = requests.get("http://localhost:8000/alerts")
alerts = response.json()

# Update map center
requests.post("http://localhost:8000/update_map_center", json={
    "map_center": [34.0522, -118.2437]  # LA coordinates
})

πŸ—ΊοΈ Visualization Architecture

graph TD
    A[User Browser] -->|HTTP Request| B[Flask Server]
    B --> C[Background Thread]
    C -->|Every 1 Hour| D[NWS API]
    D --> E[Filter Alerts]
    E --> F[Update Cache]
    B --> G[Leaflet.js Map]
    F --> G
    G --> H[Display Alert Markers]
    B --> I[Location Services]
    I -->|IP-API.com| J[Geolocation]
Loading

πŸ”’ Security Features

Important

  • Custom User-Agent header for API compliance
  • Rate-limited API retries (3 attempts with exponential backoff)
  • Input validation for location data
  • No persistent user data storage
  • Built-in request timeout handling

⚠️ Critical Disclaimer

This system provides informational alerts ONLY. Always:
- Verify with official emergency services
- Follow evacuation orders immediately
- Maintain multiple alert notification methods

NWS data may contain delays - do not rely solely on this system
for life-saving decisions. Use at your own risk.

πŸ“‚ Repository Structure

firemon/
β”œβ”€β”€ app.py            # Main application logic
β”œβ”€β”€ requirements.txt  # Python dependencies
β”œβ”€β”€ templates/
β”‚   └── index.html    # Web interface template
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   └── map.js    # Javascript
β”‚   └── style.css     # Stylesheets
β”œβ”€β”€ LICENSE
└── README.md

Open in Visual Studio Code

About

🌐 Real-time wildfire tracking system with Leaflet.js maps

https://pinoyitsolution.com

License:MIT License


Languages

Language:Python 48.2%Language:HTML 37.6%Language:CSS 7.2%Language:JavaScript 6.9%