# nayan-satapathy/algerian_forest_fire_predictor architecture

> Architecture diagram of the GitHub repository nayan-satapathy/algerian_forest_fire_predictor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nayan-satapathy/algerian_forest_fire_predictor
- Repository: https://github.com/nayan-satapathy/algerian_forest_fire_predictor

## Overview

This is a small Flask forest-fire risk prediction app. A user opens the home page, submits environmental values through the predictor form, and receives an FWI prediction: the application scales the submitted features, runs the regression model, and renders the result. The sampled application code confirms these runtime steps; template contents were not sampled, so the graph does not infer their internal behavior.

Main entry points: [`application.py`](https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/application.py) (Flask application), [`templates/form.html`](https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/templates/form.html) (Prediction form), [`templates/home.html`](https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/templates/home.html) (Home page), [`models/Scaler.pkl`](https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/models/Scaler.pkl) (Feature scaler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_app["Flask application<br/>[application.py]"]
  node_home["Home page<br/>[home.html]"]
  node_form["Prediction form<br/>[form.html]"]
end

subgraph group_prediction["Prediction runtime"]
  node_scaler["Feature scaler<br/>[Scaler.pkl]"]
  node_regression["Regression model<br/>[LinearReg.pkl]"]
end

node_user(("User"))

node_user -->|"requests pages"| node_app
node_app -->|"renders"| node_home
node_app -->|"renders"| node_form
node_user -->|"submits features"| node_app
node_app -->|"transforms features"| node_scaler
node_app -->|"predicts FWI"| node_regression
node_app -->|"renders prediction"| node_form

click node_app "https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/application.py"
click node_home "https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/templates/home.html"
click node_form "https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/templates/form.html"
click node_scaler "https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/models/Scaler.pkl"
click node_regression "https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/models/LinearReg.pkl"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_home,node_form,node_user toneBlue
class node_scaler,node_regression toneAmber
```

## Components

### Web interface

- [Flask application](https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/application.py): `application.py`
- [Home page](https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/templates/home.html): `templates/home.html`
- [Prediction form](https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/templates/form.html): `templates/form.html`

### Prediction runtime

- [Feature scaler](https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/models/Scaler.pkl): `models/Scaler.pkl`
- [Regression model](https://github.com/nayan-satapathy/algerian_forest_fire_predictor/blob/main/models/LinearReg.pkl): `models/LinearReg.pkl`

### Other components

- **User**

## Connections

- User → Flask application: requests pages
- Flask application → Home page: renders
- Flask application → Prediction form: renders
- User → Flask application: submits features
- Flask application → Feature scaler: transforms features
- Flask application → Regression model: predicts FWI
- Flask application → Prediction form: renders prediction
