# corychaplin/kiwiirc-plugin-asl architecture

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

- Interactive diagram: https://gitdiagram.com/corychaplin/kiwiirc-plugin-asl
- Repository: https://github.com/corychaplin/kiwiirc-plugin-asl

## Overview

Kiwi IRC ASL customizes startup to collect age, sex, and location, then exposes parsed user details in user profiles and a searchable user browser. The plugin also colors nicknames by configured sex and supports GECOS parsing and localization. Source excerpts support the startup, event handling, and browser interactions; wiring for some welcome-screen details and persistence behavior is not fully visible, so those links are omitted.

Main entry points: [`src/plugin.js`](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/plugin.js) (Plugin bootstrap), [`src/components/UserBrowser.vue`](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/components/UserBrowser.vue) (User browser), [`src/components/CustomWelcome.vue`](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/components/CustomWelcome.vue) (Custom welcome), [`src/components/UserBrowserButton.vue`](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/components/UserBrowserButton.vue) (Browser button)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup and configuration"]
  node_config["ASL configuration<br/>[config.js]"]
  node_welcome["Custom welcome<br/>[CustomWelcome.vue]"]
  node_locale["Locale messages"]
end

subgraph group_profiles["User data and display"]
  node_gecos["GECOS parser<br/>[utils.js]"]
  node_userstate[("Kiwi user state")]
  node_userbox["Userbox details<br/>[UserBoxInfo.vue]"]
  node_browserbutton["Browser button"]
  node_browser["User browser<br/>[UserBrowser.vue]"]
  node_colours["Colour utilities<br/>[colours.js]"]
end

subgraph group_integration["Kiwi integration"]
  node_plugin["Plugin bootstrap<br/>[plugin.js]"]
  node_nickcolour["Nickname colours<br/>[plugin.js]"]
end

node_visitor(("Chat user"))
node_kiwi["Kiwi IRC"]
node_irc["IRC network"]

node_kiwi -->|"loads plugin"| node_plugin
node_plugin -->|"sets defaults"| node_config
node_plugin -->|"registers startup"| node_welcome
node_plugin -->|"registers UI"| node_userbox
node_plugin -->|"registers UI"| node_browserbutton
node_plugin -->|"loads translations"| node_locale
node_visitor -->|"enters details"| node_welcome
node_welcome -->|"starts connection"| node_kiwi
node_kiwi -->|"connects"| node_irc
node_kiwi -->|"dispatches IRC events"| node_plugin
node_plugin -->|"requests WHO"| node_irc
node_plugin -->|"parses realname"| node_gecos
node_plugin -->|"updates user"| node_userstate
node_kiwi -->|"shows user details"| node_userbox
node_visitor -->|"opens browser"| node_browserbutton
node_browserbutton -->|"opens sidebar"| node_browser
node_browser -->|"reads user data"| node_userstate
node_browser -->|"opens userbox"| node_kiwi
node_plugin -->|"replaces formatter"| node_nickcolour
node_nickcolour -->|"reads user ASL"| node_userstate
node_nickcolour -->|"converts colours"| node_colours

click node_plugin "https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/plugin.js"
click node_config "https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/config.js"
click node_welcome "https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/components/CustomWelcome.vue"
click node_locale "https://github.com/corychaplin/kiwiirc-plugin-asl/tree/master/res/locales"
click node_gecos "https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/libs/utils.js"
click node_userbox "https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/components/UserBoxInfo.vue"
click node_browserbutton "https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/components/UserBrowserButton.vue"
click node_browser "https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/components/UserBrowser.vue"
click node_colours "https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/libs/colours.js"
click node_nickcolour "https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/plugin.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_config,node_welcome,node_locale,node_visitor toneBlue
class node_gecos,node_userstate,node_userbox,node_browserbutton,node_browser,node_colours toneAmber
class node_plugin,node_nickcolour toneMint
class node_kiwi,node_irc toneIndigo
```

## Components

### Startup and configuration

- [ASL configuration](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/config.js): `src/config.js`
- [Custom welcome](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/components/CustomWelcome.vue): `src/components/CustomWelcome.vue`
- [Locale messages](https://github.com/corychaplin/kiwiirc-plugin-asl/tree/master/res/locales): `res/locales`

### User data and display

- [GECOS parser](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/libs/utils.js): `src/libs/utils.js`
- **Kiwi user state**
- [Userbox details](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/components/UserBoxInfo.vue): `src/components/UserBoxInfo.vue`
- [Browser button](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/components/UserBrowserButton.vue): `src/components/UserBrowserButton.vue`
- [User browser](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/components/UserBrowser.vue): `src/components/UserBrowser.vue`
- [Colour utilities](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/libs/colours.js): `src/libs/colours.js`

### Kiwi integration

- [Plugin bootstrap](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/plugin.js): `src/plugin.js`
- [Nickname colours](https://github.com/corychaplin/kiwiirc-plugin-asl/blob/master/src/plugin.js): `src/plugin.js`

### Other components

- **Chat user**
- **Kiwi IRC**
- **IRC network**

## Connections

- Kiwi IRC → Plugin bootstrap: loads plugin
- Plugin bootstrap → ASL configuration: sets defaults
- Plugin bootstrap → Custom welcome: registers startup
- Plugin bootstrap → Userbox details: registers UI
- Plugin bootstrap → Browser button: registers UI
- Plugin bootstrap → Locale messages: loads translations
- Chat user → Custom welcome: enters details
- Custom welcome → Kiwi IRC: starts connection
- Kiwi IRC → IRC network: connects
- Kiwi IRC → Plugin bootstrap: dispatches IRC events
- Plugin bootstrap → IRC network: requests WHO
- Plugin bootstrap → GECOS parser: parses realname
- Plugin bootstrap → Kiwi user state: updates user
- Kiwi IRC → Userbox details: shows user details
- Chat user → Browser button: opens browser
- Browser button → User browser: opens sidebar
- User browser → Kiwi user state: reads user data
- User browser → Kiwi IRC: opens userbox
- Plugin bootstrap → Nickname colours: replaces formatter
- Nickname colours → Kiwi user state: reads user ASL
- Nickname colours → Colour utilities: converts colours
