# sindresorhus/is-up architecture

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

- Interactive diagram: https://gitdiagram.com/sindresorhus/is-up
- Repository: https://github.com/sindresorhus/is-up

## Overview

is-up is a small Node.js library that checks a website’s status through isitup.org. The caller supplies a URL; the exported function extracts and encodes its hostname, requests the API’s JSON response via got, and returns whether the domain is up (or throws for an invalid domain). The graph reflects the single sampled runtime module; it does not imply additional stages beyond those shown in the source.

Main entry points: [`index.js`](https://github.com/sindresorhus/is-up/blob/main/index.js) (Status check)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Library caller"))
node_is_up["Status check<br/>[index.js]"]
node_got["got client"]
node_isitup["isitup.org API"]

node_caller -->|"calls"| node_is_up
node_is_up -->|"requests JSON"| node_got
node_got -->|"fetches status"| node_isitup
node_isitup -->|"returns JSON"| node_got
node_got -->|"returns JSON"| node_is_up
node_is_up -->|"returns status"| node_caller

click node_is_up "https://github.com/sindresorhus/is-up/blob/main/index.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_caller toneIndigo
class node_is_up toneTeal
class node_got toneBlue
class node_isitup toneMint
```

## Components

### Other components

- **Library caller**
- [Status check](https://github.com/sindresorhus/is-up/blob/main/index.js): `index.js`
- **got client**
- **isitup.org API**

## Connections

- Library caller → Status check: calls (evidence: `readme.md`)
- Status check → got client: requests JSON (evidence: `index.js`)
- got client → isitup.org API: fetches status
- isitup.org API → got client: returns JSON
- got client → Status check: returns JSON (evidence: `index.js`)
- Status check → Library caller: returns status (evidence: `index.js`)
