# forcedwings5/j.a.r.v.i.s. architecture

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

- Interactive diagram: https://gitdiagram.com/forcedwings5/j.a.r.v.i.s.
- Repository: https://github.com/forcedwings5/j.a.r.v.i.s.

## Overview

JARVIS is a local personal-assistant dashboard. The primary workflow is browser input to the FastAPI server, then the assistant and registered domain tools, with results returned to dashboard panels or spoken replies. Calendar, tasks, notes, work summaries, weather, and football are distinct capabilities; encrypted backups and speech are supporting branches. Edges use README relationships or source-index references; unsampled implementation details are left out.

Main entry points: [`server.py`](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/server.py) (FastAPI Server), [`static/js/app.js`](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/static/js/app.js) (Dashboard), [`tools.py`](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/tools.py) (Tool Registry), [`outside.py`](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/outside.py) (HTTPS Fetch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Dashboard and API"]
  node_browser["Dashboard<br/>[app.js]"]
  node_server["FastAPI Server<br/>[server.py]"]
end

subgraph group_assistant["Assistant Runtime"]
  node_brain["Assistant<br/>[brain.py]"]
  node_tools["Tool Registry<br/>[tools.py]"]
end

subgraph group_personal["Personal Data"]
  node_calendar["Calendar<br/>[jcal.py]"]
  node_tasks["To-do List<br/>[tasks.py]"]
  node_notes["Notes<br/>[notes.py]"]
  node_db[("SQLite Store<br/>[database.py]")]
end

subgraph group_spaces["Information Spaces"]
  node_workday["Work Summary<br/>[workday.py]"]
  node_weather["Weather<br/>[weather.py]"]
  node_weather_ui["Weather View<br/>[space-weather.js]"]
  node_football["Football Data<br/>[football.py]"]
  node_sports_ui["Sports View<br/>[space-sports.js]"]
  node_outside["HTTPS Fetch<br/>[outside.py]"]
end

subgraph group_privacy["Privacy and Speech"]
  node_backup["Backup Manager<br/>[backup_db.py]"]
  node_crypto["Backup Crypto<br/>[backup_crypto.py]"]
  node_speech["Speech Output<br/>[speech.py]"]
  node_speech_text["Speech Text<br/>[speech_text.py]"]
end

node_person(("User"))
node_ollama["Ollama Model"]
node_openmeteo["Open-Meteo"]
node_footballdata["football-data.org"]

node_person -->|"uses"| node_browser
node_browser -->|"HTTP requests"| node_server
node_server -->|"streams chat"| node_brain
node_brain -->|"queries model"| node_ollama
node_brain -->|"dispatches tools"| node_tools
node_tools -->|"registers"| node_calendar
node_tools -->|"registers"| node_tasks
node_tools -->|"registers"| node_notes
node_calendar -->|"reads and writes"| node_db
node_tasks -->|"reads and writes"| node_db
node_notes -->|"uses store"| node_db
node_server -->|"serves summary"| node_workday
node_workday -->|"reads events"| node_calendar
node_workday -->|"reads tasks"| node_tasks
node_server -->|"serves weather"| node_weather
node_weather -->|"fetches data"| node_outside
node_outside -->|"HTTPS requests"| node_openmeteo
node_server -->|"serves sports"| node_football
node_football -->|"fetches data"| node_outside
node_outside -->|"HTTPS requests"| node_footballdata
node_browser -.->|"shows weather"| node_weather_ui
node_browser -.->|"shows sports"| node_sports_ui
node_server -->|"manages backups"| node_backup
node_backup -->|"encrypts copies"| node_crypto
node_server -->|"synthesizes replies"| node_speech
node_speech -->|"formats text"| node_speech_text

click node_browser "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/static/js/app.js"
click node_server "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/server.py"
click node_brain "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/brain.py"
click node_tools "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/tools.py"
click node_calendar "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/jcal.py"
click node_tasks "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/tasks.py"
click node_notes "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/notes.py"
click node_db "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/database.py"
click node_workday "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/workday.py"
click node_weather "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/weather.py"
click node_weather_ui "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/static/js/space-weather.js"
click node_football "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/football.py"
click node_sports_ui "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/static/js/space-sports.js"
click node_outside "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/outside.py"
click node_backup "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/backup_db.py"
click node_crypto "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/backup_crypto.py"
click node_speech "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/speech.py"
click node_speech_text "https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/speech_text.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_browser,node_server,node_person toneBlue
class node_brain,node_tools toneAmber
class node_calendar,node_tasks,node_notes,node_db toneMint
class node_workday,node_weather,node_weather_ui,node_football,node_sports_ui,node_outside toneRose
class node_backup,node_crypto,node_speech,node_speech_text,node_ollama,node_openmeteo,node_footballdata toneIndigo
```

## Components

### Dashboard and API

- [Dashboard](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/static/js/app.js): `static/js/app.js`
- [FastAPI Server](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/server.py): `server.py`

### Assistant Runtime

- [Assistant](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/brain.py): `brain.py`
- [Tool Registry](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/tools.py): `tools.py`

### Personal Data

- [Calendar](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/jcal.py): `jcal.py`
- [To-do List](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/tasks.py): `tasks.py`
- [Notes](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/notes.py): `notes.py`
- [SQLite Store](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/database.py): `database.py`

### Information Spaces

- [Work Summary](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/workday.py): `workday.py`
- [Weather](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/weather.py): `weather.py`
- [Weather View](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/static/js/space-weather.js): `static/js/space-weather.js`
- [Football Data](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/football.py): `football.py`
- [Sports View](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/static/js/space-sports.js): `static/js/space-sports.js`
- [HTTPS Fetch](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/outside.py): `outside.py`

### Privacy and Speech

- [Backup Manager](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/backup_db.py): `backup_db.py`
- [Backup Crypto](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/backup_crypto.py): `backup_crypto.py`
- [Speech Output](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/speech.py): `speech.py`
- [Speech Text](https://github.com/forcedwings5/j.a.r.v.i.s./blob/main/speech_text.py): `speech_text.py`

### Other components

- **User**
- **Ollama Model**
- **Open-Meteo**
- **football-data.org**

## Connections

- User → Dashboard: uses (evidence: `README.md`)
- Dashboard → FastAPI Server: HTTP requests (evidence: `README.md`)
- FastAPI Server → Assistant: streams chat (evidence: `server.py`)
- Assistant → Ollama Model: queries model (evidence: `README.md`)
- Assistant → Tool Registry: dispatches tools (evidence: `brain.py`)
- Tool Registry → Calendar: registers (evidence: `brain.py`)
- Tool Registry → To-do List: registers (evidence: `brain.py`)
- Tool Registry → Notes: registers (evidence: `brain.py`)
- Calendar → SQLite Store: reads and writes (evidence: `jcal.py`)
- To-do List → SQLite Store: reads and writes (evidence: `tasks.py`)
- Notes → SQLite Store: uses store (evidence: `notes.py`)
- FastAPI Server → Work Summary: serves summary (evidence: `server.py`)
- Work Summary → Calendar: reads events (evidence: `workday.py`)
- Work Summary → To-do List: reads tasks (evidence: `workday.py`)
- FastAPI Server → Weather: serves weather (evidence: `server.py`)
- Weather → HTTPS Fetch: fetches data (evidence: `weather.py`)
- HTTPS Fetch → Open-Meteo: HTTPS requests (evidence: `README.md`)
- FastAPI Server → Football Data: serves sports (evidence: `server.py`)
- Football Data → HTTPS Fetch: fetches data (evidence: `football.py`)
- HTTPS Fetch → football-data.org: HTTPS requests (evidence: `README.md`)
- Dashboard → Weather View: shows weather
- Dashboard → Sports View: shows sports
- FastAPI Server → Backup Manager: manages backups (evidence: `server.py`)
- Backup Manager → Backup Crypto: encrypts copies (evidence: `backup_db.py`)
- FastAPI Server → Speech Output: synthesizes replies (evidence: `server.py`)
- Speech Output → Speech Text: formats text (evidence: `speech.py`)
