# sakerhetspolisen/k architecture

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

- Interactive diagram: https://gitdiagram.com/sakerhetspolisen/k
- Repository: https://github.com/sakerhetspolisen/k

## Overview

This is a small Fastify web server: it listens on port 3000, serves static files from the repository root, and maps `/` to `k.html`. The source shows the server setup and route; the page contents were not sampled.

Main entry points: [`k.js`](https://github.com/sakerhetspolisen/k/blob/k/k.js) (Fastify server), [`k.html`](https://github.com/sakerhetspolisen/k/blob/k/k.html) (Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_browser(("Browser"))
node_server["Fastify server<br/>[k.js]"]
node_static["Static plugin<br/>[k.js]"]
node_page["Page<br/>[k.html]"]

node_browser -->|"requests page"| node_server
node_server -->|"registers"| node_static
node_server -->|"sends on /"| node_page
node_static -->|"serves files"| node_page

click node_server "https://github.com/sakerhetspolisen/k/blob/k/k.js"
click node_static "https://github.com/sakerhetspolisen/k/blob/k/k.js"
click node_page "https://github.com/sakerhetspolisen/k/blob/k/k.html"

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 toneBlue
class node_server toneMint
class node_static,node_page toneTeal
```

## Components

### Other components

- **Browser**
- [Fastify server](https://github.com/sakerhetspolisen/k/blob/k/k.js): `k.js`
- [Static plugin](https://github.com/sakerhetspolisen/k/blob/k/k.js): `k.js`
- [Page](https://github.com/sakerhetspolisen/k/blob/k/k.html): `k.html`

## Connections

- Browser → Fastify server: requests page
- Fastify server → Static plugin: registers
- Fastify server → Page: sends on /
- Static plugin → Page: serves files
