# virak33/uptime-kuma architecture

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

- Interactive diagram: https://gitdiagram.com/virak33/uptime-kuma
- Repository: https://github.com/virak33/uptime-kuma

## Overview

##### Main Components Identification

The system consists of these primary components:
- Frontend (Vue.js application)
- Backend (Node.js server)
- Database (SQLite)
- Monitor Services
- Notification System
- Status Pages
- Authentication System

##### Connection Flows

**→ Real-time Updates (WebSocket)**
**→ Database Operations**
**→ Monitor Checks**
**→ Notification Dispatches**
**→ Status Page Requests**

##### Specific Implementation Details

Technical aspects:
- WebSocket-based real-time communication
- Monitor Types (HTTP, TCP, Ping, etc.)
- Multiple notification providers
- Status page generation
- Database migrations
- Docker support

##### Component Relationships

Key relationships:
**Client ←→ WebSocket Server**
**Monitor Manager → External Services**
**Notification Manager → Notification Providers**
**Status Pages → Public Access**
**Database ←→ All Server Components**

##### Additional Elements

Supporting features:
- Security Layer (2FA, API Keys)
- Proxy Support
- Docker Container
- Language Support
- Maintenance Mode

##### Notes

Important details:
- 20-second monitoring intervals
- Real-time updates
- Multi-language support
- Proxy configuration
- Security features

##### The scalable architecture

This system design should reflect Uptime Kuma's modern, reactive architecture while clearly showing how it handles its core monitoring and notification responsibilities.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph CL["Client Layer"]
        WB[Web Browser]
        SP[Status Page Viewers]
        PC[Push API Clients]
    end

    subgraph AL["Application Layer"]
        direction TB
        VUE["Vue.js UI"]:::frontend
        WSC["WebSocket Client"]
        I18["i18n System"]:::frontend
        RT["Router"]:::frontend
        COMP["UI Components"]:::frontend
    end

    subgraph SL["Server Layer"]
        direction TB
        WSS["WebSocket Server"]:::backend
        API["API Router"]:::backend
        MM["Monitor Manager"]:::monitor
        NM["Notification Manager"]:::notification
        AH["Authentication Handler"]:::auth
        SPH["Status Page Handler"]:::backend
    end

    subgraph DL["Storage Layer"]
        DB[(SQLite Database)]:::database
        subgraph DBTables["Database Tables"]
            MD[Monitor Data]
            UD[User Data]
            ST[Settings]
            HB[Heartbeats]
        end
    end

    subgraph EX["External Services"]
        MT[Monitoring Targets]
        NS[Notification Services]
        DNS[DNS Services]
        DC[Docker Containers]
    end

    %% Connections
    CL --> AL
    AL <--> SL
    SL <--> DL
    MM --> EX
    NM --> NS
    
    %% Component Relationships
    WSC <--> WSS
    API --> DB
    MM --> MT
    NM --> NS
    SPH --> SP

    %% Styling
    classDef frontend fill:#3498db
    classDef backend fill:#2ecc71
    classDef monitor fill:#e74c3c
    classDef notification fill:#f39c12
    classDef auth fill:#9b59b6
    classDef database fill:#95a5a6

    %% Click Events
    click VUE "https://github.com/VIRAK33/uptime-kuma/tree/master/src"
    click COMP "https://github.com/VIRAK33/uptime-kuma/tree/master/src/components"
    click I18 "https://github.com/VIRAK33/uptime-kuma/blob/master/src/i18n.js"
    click RT "https://github.com/VIRAK33/uptime-kuma/blob/master/src/router.js"
    click WSS "https://github.com/VIRAK33/uptime-kuma/blob/master/server/server.js"
    click API "https://github.com/VIRAK33/uptime-kuma/blob/master/server/routers/api-router.js"
    click MM "https://github.com/VIRAK33/uptime-kuma/tree/master/server/monitor-types"
    click NM "https://github.com/VIRAK33/uptime-kuma/tree/master/server/notification-providers"
    click AH "https://github.com/VIRAK33/uptime-kuma/blob/master/server/auth.js"
    click SPH "https://github.com/VIRAK33/uptime-kuma/blob/master/server/routers/status-page-router.js"
    click DB "https://github.com/VIRAK33/uptime-kuma/blob/master/server/database.js"

    %% Legend
    subgraph Legend
        L1[Frontend Components]:::frontend
        L2[Backend Services]:::backend
        L3[Monitor Services]:::monitor
        L4[Notification Systems]:::notification
        L5[Authentication]:::auth
        L6[(Database)]:::database
    end
```
