# nsfw/sites architecture

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

- Interactive diagram: https://gitdiagram.com/nsfw/sites
- Repository: https://github.com/nsfw/sites

## Overview

Motlify is a small browser-side string obfuscation utility: callers pass a string to `motlify`, which substitutes each mapped character with a randomly selected alternative and returns the joined result. At initialization it filters browser-incompatible alternatives using the user agent. The tree also contains `index.html`, but no contents were provided, so its role is unclear and it is omitted. The graph reflects the single sampled source file.

Main entry points: [`motlify/motlify.js`](https://github.com/nsfw/sites/blob/master/motlify/motlify.js) (Motlify transform)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Caller"))
node_browser(("Browser"))
node_rawmap["Character map<br/>[motlify.js]"]
node_compat["Compatibility filter<br/>[motlify.js]"]
node_mapper["Character mapper<br/>[motlify.js]"]
node_motlify["Motlify transform<br/>[motlify.js]"]
node_result["Transformed string"]

node_browser -->|"supplies user agent"| node_compat
node_rawmap -->|"filters alternatives"| node_compat
node_compat -->|"provides table"| node_mapper
node_caller -->|"passes string"| node_motlify
node_motlify -->|"maps characters"| node_mapper
node_motlify -->|"returns string"| node_result

click node_rawmap "https://github.com/nsfw/sites/blob/master/motlify/motlify.js"
click node_compat "https://github.com/nsfw/sites/blob/master/motlify/motlify.js"
click node_mapper "https://github.com/nsfw/sites/blob/master/motlify/motlify.js"
click node_motlify "https://github.com/nsfw/sites/blob/master/motlify/motlify.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,node_result toneIndigo
class node_browser toneBlue
class node_rawmap,node_compat,node_mapper,node_motlify toneTeal
```

## Components

### Other components

- **Caller**
- **Browser**
- [Character map](https://github.com/nsfw/sites/blob/master/motlify/motlify.js): `motlify/motlify.js`
- [Compatibility filter](https://github.com/nsfw/sites/blob/master/motlify/motlify.js): `motlify/motlify.js`
- [Character mapper](https://github.com/nsfw/sites/blob/master/motlify/motlify.js): `motlify/motlify.js`
- [Motlify transform](https://github.com/nsfw/sites/blob/master/motlify/motlify.js): `motlify/motlify.js`
- **Transformed string**

## Connections

- Browser → Compatibility filter: supplies user agent (evidence: `motlify/motlify.js`)
- Character map → Compatibility filter: filters alternatives (evidence: `motlify/motlify.js`)
- Compatibility filter → Character mapper: provides table (evidence: `motlify/motlify.js`)
- Caller → Motlify transform: passes string (evidence: `motlify/motlify.js`)
- Motlify transform → Character mapper: maps characters (evidence: `motlify/motlify.js`)
- Motlify transform → Transformed string: returns string (evidence: `motlify/motlify.js`)
