# dimassl/seism1 architecture

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

- Interactive diagram: https://gitdiagram.com/dimassl/seism1
- Repository: https://github.com/dimassl/seism1

## Overview

The repository appears to implement an Indonesian earthquake early-warning and seismic-streaming service, but its README provides no product detail. The shown Python entry points receive SeedLink data, detect station triggers, and publish WebSocket updates; main.py also contains event-location and impact calculations. Source excerpts omit substantial sections, so the graph limits connections to relationships visible in the excerpts and identifies the two entry points separately.

Main entry points: [`main.py`](https://github.com/dimassl/seism1/blob/main/main.py) (Main waveform ingest), [`server.py`](https://github.com/dimassl/seism1/blob/main/server.py) (Station buffers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_event_warning["Event warning"]
  node_main_ingest["Main waveform ingest<br/>[main.py]"]
  node_trigger_analysis["Trigger analysis<br/>[main.py]"]
  node_event_location["Event location<br/>[main.py]"]
  node_impact_assessment["Impact assessment<br/>[main.py]"]
end

subgraph group_stream_monitor["Stream monitoring"]
  node_monitor_ingest["Monitor waveform ingest<br/>[server.py]"]
  node_station_state["Station buffers<br/>[server.py]"]
  node_spectrogram["Spectrogram generation<br/>[server.py]"]
end

node_seedlink(("SeedLink network"))
node_warning_clients(("Warning clients"))
node_monitor_clients(("Monitor clients"))

node_seedlink -->|"streams waveforms"| node_main_ingest
node_main_ingest -->|"appends samples"| node_trigger_analysis
node_trigger_analysis -->|"collects triggers"| node_event_location
node_event_location -->|"estimates impact"| node_impact_assessment
node_seedlink -->|"streams waveforms"| node_monitor_ingest
node_monitor_ingest -->|"updates buffers"| node_station_state
node_station_state -->|"reads samples"| node_spectrogram
node_monitor_clients -->|"receives updates"| node_station_state
node_monitor_clients -->|"receives spectra"| node_spectrogram
node_warning_clients -.->|"receives alerts"| node_main_ingest

click node_main_ingest "https://github.com/dimassl/seism1/blob/main/main.py"
click node_trigger_analysis "https://github.com/dimassl/seism1/blob/main/main.py"
click node_event_location "https://github.com/dimassl/seism1/blob/main/main.py"
click node_impact_assessment "https://github.com/dimassl/seism1/blob/main/main.py"
click node_monitor_ingest "https://github.com/dimassl/seism1/blob/main/server.py"
click node_station_state "https://github.com/dimassl/seism1/blob/main/server.py"
click node_spectrogram "https://github.com/dimassl/seism1/blob/main/server.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_main_ingest,node_trigger_analysis,node_event_location,node_impact_assessment,node_warning_clients,node_monitor_clients toneBlue
class node_monitor_ingest,node_station_state,node_spectrogram toneAmber
class node_seedlink toneIndigo
```

## Components

### Event warning

- [Main waveform ingest](https://github.com/dimassl/seism1/blob/main/main.py): `main.py`
- [Trigger analysis](https://github.com/dimassl/seism1/blob/main/main.py): `main.py`
- [Event location](https://github.com/dimassl/seism1/blob/main/main.py): `main.py`
- [Impact assessment](https://github.com/dimassl/seism1/blob/main/main.py): `main.py`

### Stream monitoring

- [Monitor waveform ingest](https://github.com/dimassl/seism1/blob/main/server.py): `server.py`
- [Station buffers](https://github.com/dimassl/seism1/blob/main/server.py): `server.py`
- [Spectrogram generation](https://github.com/dimassl/seism1/blob/main/server.py): `server.py`

### Other components

- **SeedLink network**
- **Warning clients**
- **Monitor clients**

## Connections

- SeedLink network → Main waveform ingest: streams waveforms (evidence: `main.py`)
- Main waveform ingest → Trigger analysis: appends samples (evidence: `main.py`)
- Trigger analysis → Event location: collects triggers (evidence: `main.py`)
- Event location → Impact assessment: estimates impact (evidence: `main.py`)
- SeedLink network → Monitor waveform ingest: streams waveforms (evidence: `server.py`)
- Monitor waveform ingest → Station buffers: updates buffers (evidence: `server.py`)
- Station buffers → Spectrogram generation: reads samples (evidence: `server.py`)
- Monitor clients → Station buffers: receives updates (evidence: `server.py`)
- Monitor clients → Spectrogram generation: receives spectra (evidence: `server.py`)
- Warning clients → Main waveform ingest: receives alerts
