# nasa-challenge-t7/app architecture

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

- Interactive diagram: https://gitdiagram.com/nasa-challenge-t7/app
- Repository: https://github.com/nasa-challenge-t7/app

## Overview

AirCheck is a location-aware air-quality and health dashboard. Users provide a location to view pollen and weather information, explore CO/CH4/pollen heat maps, and browse health-related recommendations. The sampled code shows the Angular controllers making requests to Express endpoints; the server proxies pollen forecasts and Amazon product searches. Other visible client areas suggest profile, medical, remedies, sickness, history, and alert capabilities, but their behavior and routing are not shown in the excerpts, so their connections are omitted.

Main entry points: [`server/routes/pollen-loader.js`](https://github.com/nasa-challenge-t7/app/blob/master/server/routes/pollen-loader.js) (Pollen loader), [`index.controller.js`](https://github.com/nasa-challenge-t7/app/blob/master/index.controller.js) (Location lookup), [`client/forecast/forecast.controller.js`](https://github.com/nasa-challenge-t7/app/blob/master/client/forecast/forecast.controller.js) (Forecast view), [`server/routes/amazon-products.js`](https://github.com/nasa-challenge-t7/app/blob/master/server/routes/amazon-products.js) (Product search API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Dashboard client"]
  node_location["Location lookup"]
  node_forecast["Forecast view"]
  node_recommend["Product recommendations"]
  node_history["History view"]
  node_profile["Profile view"]
  node_medical["Medical view"]
  node_remedies["Remedies view"]
  node_sick["Sickness view<br/>[sick.controller.js]"]
  node_alert["Alert view"]
end

subgraph group_maps["Environmental maps"]
  node_co_map["CO heat map"]
  node_ch4_map["CH4 heat map"]
  node_pollen_map["Pollen heat map"]
  node_co_data["CO dataset"]
  node_ch4_data["CH4 dataset"]
end

subgraph group_server["API services"]
  node_express["Express server<br/>[server.js]"]
  node_pollen_api["Pollen loader<br/>[pollen-loader.js]"]
  node_products_api["Product search API<br/>[amazon-products.js]"]
end

subgraph group_integrations["External data"]
  node_pollen_service["Pollen forecast service"]
  node_amazon["Amazon Product Advertising"]
end

node_user(("Dashboard user"))

node_user -->|"enters location"| node_location
node_location -->|"requests forecast"| node_pollen_api
node_location -.->|"opens forecast"| node_forecast
node_forecast -->|"delegates to"| node_location
node_forecast -->|"requests forecast"| node_pollen_api
node_pollen_map -->|"requests pollen"| node_pollen_api
node_co_map -->|"reads dataset"| node_co_data
node_ch4_map -->|"reads dataset"| node_ch4_data
node_recommend -->|"requests products"| node_products_api
node_express -->|"mounts route"| node_pollen_api
node_express -->|"mounts route"| node_products_api
node_pollen_api -->|"fetches forecast"| node_pollen_service
node_products_api -->|"searches products"| node_amazon

click node_location "https://github.com/nasa-challenge-t7/app/blob/master/index.controller.js"
click node_forecast "https://github.com/nasa-challenge-t7/app/blob/master/client/forecast/forecast.controller.js"
click node_recommend "https://github.com/nasa-challenge-t7/app/blob/master/client/recommend/recommend.controller.js"
click node_history "https://github.com/nasa-challenge-t7/app/blob/master/client/history/history.controller.js"
click node_profile "https://github.com/nasa-challenge-t7/app/blob/master/client/profile/profile.controller.js"
click node_medical "https://github.com/nasa-challenge-t7/app/blob/master/client/medical/medical.controller.js"
click node_remedies "https://github.com/nasa-challenge-t7/app/blob/master/client/remedies/remedies.controller.js"
click node_sick "https://github.com/nasa-challenge-t7/app/blob/master/client/sick/sick.controller.js"
click node_alert "https://github.com/nasa-challenge-t7/app/blob/master/client/alert/alert.controller.js"
click node_co_map "https://github.com/nasa-challenge-t7/app/blob/master/client/map/mapForCO.controller.js"
click node_ch4_map "https://github.com/nasa-challenge-t7/app/blob/master/client/map/mapForCH4.controller.js"
click node_pollen_map "https://github.com/nasa-challenge-t7/app/blob/master/client/map/mapForPollen.controller.js"
click node_co_data "https://github.com/nasa-challenge-t7/app/blob/master/resources/TotCO_daily_20150101.json"
click node_ch4_data "https://github.com/nasa-challenge-t7/app/blob/master/resources/TotCH4_daily_20150101.json"
click node_express "https://github.com/nasa-challenge-t7/app/blob/master/server.js"
click node_pollen_api "https://github.com/nasa-challenge-t7/app/blob/master/server/routes/pollen-loader.js"
click node_products_api "https://github.com/nasa-challenge-t7/app/blob/master/server/routes/amazon-products.js"

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_location,node_forecast,node_recommend,node_history,node_profile,node_medical,node_remedies,node_sick,node_alert,node_user toneBlue
class node_co_map,node_ch4_map,node_pollen_map,node_co_data,node_ch4_data toneAmber
class node_express,node_pollen_api,node_products_api toneMint
class node_pollen_service,node_amazon toneRose
```

## Components

### Dashboard client

- [Location lookup](https://github.com/nasa-challenge-t7/app/blob/master/index.controller.js): `index.controller.js`
- [Forecast view](https://github.com/nasa-challenge-t7/app/blob/master/client/forecast/forecast.controller.js): `client/forecast/forecast.controller.js`
- [Product recommendations](https://github.com/nasa-challenge-t7/app/blob/master/client/recommend/recommend.controller.js): `client/recommend/recommend.controller.js`
- [History view](https://github.com/nasa-challenge-t7/app/blob/master/client/history/history.controller.js): `client/history/history.controller.js`
- [Profile view](https://github.com/nasa-challenge-t7/app/blob/master/client/profile/profile.controller.js): `client/profile/profile.controller.js`
- [Medical view](https://github.com/nasa-challenge-t7/app/blob/master/client/medical/medical.controller.js): `client/medical/medical.controller.js`
- [Remedies view](https://github.com/nasa-challenge-t7/app/blob/master/client/remedies/remedies.controller.js): `client/remedies/remedies.controller.js`
- [Sickness view](https://github.com/nasa-challenge-t7/app/blob/master/client/sick/sick.controller.js): `client/sick/sick.controller.js`
- [Alert view](https://github.com/nasa-challenge-t7/app/blob/master/client/alert/alert.controller.js): `client/alert/alert.controller.js`

### Environmental maps

- [CO heat map](https://github.com/nasa-challenge-t7/app/blob/master/client/map/mapForCO.controller.js): `client/map/mapForCO.controller.js`
- [CH4 heat map](https://github.com/nasa-challenge-t7/app/blob/master/client/map/mapForCH4.controller.js): `client/map/mapForCH4.controller.js`
- [Pollen heat map](https://github.com/nasa-challenge-t7/app/blob/master/client/map/mapForPollen.controller.js): `client/map/mapForPollen.controller.js`
- [CO dataset](https://github.com/nasa-challenge-t7/app/blob/master/resources/TotCO_daily_20150101.json): `resources/TotCO_daily_20150101.json`
- [CH4 dataset](https://github.com/nasa-challenge-t7/app/blob/master/resources/TotCH4_daily_20150101.json): `resources/TotCH4_daily_20150101.json`

### API services

- [Express server](https://github.com/nasa-challenge-t7/app/blob/master/server.js): `server.js`
- [Pollen loader](https://github.com/nasa-challenge-t7/app/blob/master/server/routes/pollen-loader.js): `server/routes/pollen-loader.js`
- [Product search API](https://github.com/nasa-challenge-t7/app/blob/master/server/routes/amazon-products.js): `server/routes/amazon-products.js`

### External data

- **Pollen forecast service**
- **Amazon Product Advertising**

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Location lookup: enters location
- Location lookup → Pollen loader: requests forecast (evidence: `index.controller.js`)
- Location lookup → Forecast view: opens forecast
- Forecast view → Location lookup: delegates to (evidence: `client/forecast/forecast.controller.js`)
- Forecast view → Pollen loader: requests forecast (evidence: `client/forecast/forecast.controller.js`)
- Pollen heat map → Pollen loader: requests pollen (evidence: `client/map/mapForPollen.controller.js`)
- CO heat map → CO dataset: reads dataset (evidence: `client/map/mapForCO.controller.js`)
- CH4 heat map → CH4 dataset: reads dataset (evidence: `client/map/mapForCH4.controller.js`)
- Product recommendations → Product search API: requests products (evidence: `client/recommend/recommend.controller.js`)
- Express server → Pollen loader: mounts route (evidence: `server.js`)
- Express server → Product search API: mounts route (evidence: `server.js`)
- Pollen loader → Pollen forecast service: fetches forecast (evidence: `server/routes/pollen-loader.js`)
- Product search API → Amazon Product Advertising: searches products (evidence: `server/routes/amazon-products.js`)
