# userstr193/health_monitoring_for_nasa_competition architecture

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

- Interactive diagram: https://gitdiagram.com/userstr193/health_monitoring_for_nasa_competition
- Repository: https://github.com/userstr193/health_monitoring_for_nasa_competition

## Overview

This is a simulated astronaut health-monitoring and explainable expert-system application. The principal workflow is a client submitting crew, environmental-system, and log data to the API; the application persists readings and logs, derives alerts, and exposes status and history. Expert-analysis endpoints use the rule engine to produce explainable findings and retain decision records. The excerpts show API validation, SQLite operations, alert logic, and expert-engine functions; several endpoint details and the knowledge-base loading path are unsampled, so those links are left unverified.

Main entry points: [`main.py`](https://github.com/userstr193/health_monitoring_for_nasa_competition/blob/main/main.py) (API and monitoring), [`expert_system.py`](https://github.com/userstr193/health_monitoring_for_nasa_competition/blob/main/expert_system.py) (Rule evaluation), [`knowledge_base.json`](https://github.com/userstr193/health_monitoring_for_nasa_competition/blob/main/knowledge_base.json) (Rule catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Monitoring API"]
  node_api_service["API and monitoring<br/>[main.py]"]
end

subgraph group_expert["Expert Analysis"]
  node_rule_engine["Rule evaluation<br/>[expert_system.py]"]
  node_knowledge_base["Rule catalog"]
end

subgraph group_storage["Persistent Data"]
  node_sqlite_store[("SQLite records<br/>[main.py]")]
end

node_client(("Monitoring client"))

node_client -->|"submits data"| node_api_service
node_api_service -->|"reads and writes"| node_sqlite_store
node_api_service -->|"requests analysis"| node_rule_engine
node_rule_engine -.->|"loads rules"| node_knowledge_base
node_rule_engine -.->|"returns findings"| node_api_service
node_client -->|"queries status"| node_api_service

click node_api_service "https://github.com/userstr193/health_monitoring_for_nasa_competition/blob/main/main.py"
click node_rule_engine "https://github.com/userstr193/health_monitoring_for_nasa_competition/blob/main/expert_system.py"
click node_knowledge_base "https://github.com/userstr193/health_monitoring_for_nasa_competition/blob/main/knowledge_base.json"
click node_sqlite_store "https://github.com/userstr193/health_monitoring_for_nasa_competition/blob/main/main.py"

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_api_service,node_client toneBlue
class node_rule_engine,node_knowledge_base toneAmber
class node_sqlite_store toneMint
```

## Components

### Monitoring API

- [API and monitoring](https://github.com/userstr193/health_monitoring_for_nasa_competition/blob/main/main.py): `main.py`

### Expert Analysis

- [Rule evaluation](https://github.com/userstr193/health_monitoring_for_nasa_competition/blob/main/expert_system.py): `expert_system.py`
- [Rule catalog](https://github.com/userstr193/health_monitoring_for_nasa_competition/blob/main/knowledge_base.json): `knowledge_base.json`

### Persistent Data

- [SQLite records](https://github.com/userstr193/health_monitoring_for_nasa_competition/blob/main/main.py): `main.py`

### Other components

- **Monitoring client**

## Connections

- Monitoring client → API and monitoring: submits data (evidence: `main.py`)
- API and monitoring → SQLite records: reads and writes (evidence: `main.py`)
- API and monitoring → Rule evaluation: requests analysis (evidence: `main.py`)
- Rule evaluation → Rule catalog: loads rules
- Rule evaluation → API and monitoring: returns findings (evidence: `main.py`)
- Monitoring client → API and monitoring: queries status (evidence: `main.py`)
