# xiangjianan/lks architecture

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

- Interactive diagram: https://gitdiagram.com/xiangjianan/lks
- Repository: https://github.com/xiangjianan/lks

## Overview

LKs Website Collection is a static catalog for 303 recommended websites across episodes 1–12. Visitors browse episode and category views, search listings, open website links, and save favorites; the site also provides popularity counts and an optional Bilibili preview. The graph separates catalog data, page behavior, presentation, and remote services. The README documents caching and major capabilities, while excerpts show rendering, filtering, likes, preview controls, and API calls; page-level asset wiring and some data-loading details were not sampled.

Main entry points: [`static/site/js/defer.2.2.6.js`](https://github.com/xiangjianan/lks/blob/master/static/site/js/defer.2.2.6.js) (Search and likes), [`static/site/js/index.2.2.5.js`](https://github.com/xiangjianan/lks/blob/master/static/site/js/index.2.2.5.js) (Catalog rendering), [`index.html`](https://github.com/xiangjianan/lks/blob/master/index.html) (Main page), [`static/bootstrap-4.6.1/js/bootstrap.bundle.js`](https://github.com/xiangjianan/lks/blob/master/static/bootstrap-4.6.1/js/bootstrap.bundle.js) (Bundled Bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Catalog content"]
  node_catalog_data[("Website catalog<br/>[web.v12.2.json]")]
  node_browser_storage[("Browser localStorage")]
end

subgraph group_interaction["Browsing features"]
  node_app_logic["Catalog rendering<br/>[index.2.2.5.js]"]
  node_deferred_logic["Search and likes<br/>[defer.2.2.6.js]"]
  node_isotope["Isotope filtering"]
end

subgraph group_presentation["Page presentation"]
  node_page["Main page<br/>[index.html]"]
  node_site_styles["Site styling<br/>[index.2.0.5.css]"]
  node_bootstrap_css["Bootstrap styling<br/>[bootstrap.css]"]
  node_bootstrap_js["Bootstrap widgets<br/>[bootstrap.js]"]
  node_bootstrap_bundle["Bundled Bootstrap"]
  node_icon_font["Icon font<br/>[iconfont.2.0.1.css]"]
  node_jquery["jQuery"]
  node_deferred_assets["Deferred assets<br/>[defer.2.2.6.js]"]
end

subgraph group_services["Remote services"]
  node_like_service["Likes API"]
  node_catalog_service["Catalog update API"]
  node_bilibili["Bilibili player"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_page
node_page -->|"catalog data"| node_catalog_data
node_app_logic -->|"filters and sorts"| node_isotope
node_app_logic -->|"reads favorites"| node_browser_storage
node_deferred_logic -->|"stores preferences"| node_browser_storage
node_deferred_logic -->|"updates sorting"| node_isotope
node_deferred_logic -->|"fetches and updates counts"| node_like_service
node_deferred_logic -->|"checks and fetches data"| node_catalog_service
node_app_logic -->|"sets preview source"| node_bilibili
node_deferred_logic -->|"configures popovers"| node_bootstrap_bundle
node_bootstrap_js -->|"uses"| node_jquery
node_bootstrap_bundle -->|"uses"| node_jquery
node_app_logic -->|"reads favorite state"| node_browser_storage

click node_page "https://github.com/xiangjianan/lks/blob/master/index.html"
click node_catalog_data "https://github.com/xiangjianan/lks/blob/master/static/site/js/web.v12.2.json"
click node_app_logic "https://github.com/xiangjianan/lks/blob/master/static/site/js/index.2.2.5.js"
click node_deferred_logic "https://github.com/xiangjianan/lks/blob/master/static/site/js/defer.2.2.6.js"
click node_site_styles "https://github.com/xiangjianan/lks/blob/master/static/site/css/index.2.0.5.css"
click node_bootstrap_css "https://github.com/xiangjianan/lks/blob/master/static/bootstrap-4.6.1/css/bootstrap.css"
click node_bootstrap_js "https://github.com/xiangjianan/lks/blob/master/static/bootstrap-4.6.1/js/bootstrap.js"
click node_bootstrap_bundle "https://github.com/xiangjianan/lks/blob/master/static/bootstrap-4.6.1/js/bootstrap.bundle.js"
click node_icon_font "https://github.com/xiangjianan/lks/blob/master/static/iconfont-2.0.1/iconfont.2.0.1.css"
click node_deferred_assets "https://github.com/xiangjianan/lks/blob/master/static/site/js/defer.2.2.6.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_catalog_data,node_browser_storage toneBlue
class node_app_logic,node_deferred_logic,node_isotope toneAmber
class node_page,node_site_styles,node_bootstrap_css,node_bootstrap_js,node_bootstrap_bundle,node_icon_font,node_jquery,node_deferred_assets toneMint
class node_like_service,node_catalog_service,node_bilibili toneRose
class node_visitor toneIndigo
```

## Components

### Catalog content

- [Website catalog](https://github.com/xiangjianan/lks/blob/master/static/site/js/web.v12.2.json): `static/site/js/web.v12.2.json`
- **Browser localStorage**

### Browsing features

- [Catalog rendering](https://github.com/xiangjianan/lks/blob/master/static/site/js/index.2.2.5.js): `static/site/js/index.2.2.5.js`
- [Search and likes](https://github.com/xiangjianan/lks/blob/master/static/site/js/defer.2.2.6.js): `static/site/js/defer.2.2.6.js`
- **Isotope filtering**

### Page presentation

- [Main page](https://github.com/xiangjianan/lks/blob/master/index.html): `index.html`
- [Site styling](https://github.com/xiangjianan/lks/blob/master/static/site/css/index.2.0.5.css): `static/site/css/index.2.0.5.css`
- [Bootstrap styling](https://github.com/xiangjianan/lks/blob/master/static/bootstrap-4.6.1/css/bootstrap.css): `static/bootstrap-4.6.1/css/bootstrap.css`
- [Bootstrap widgets](https://github.com/xiangjianan/lks/blob/master/static/bootstrap-4.6.1/js/bootstrap.js): `static/bootstrap-4.6.1/js/bootstrap.js`
- [Bundled Bootstrap](https://github.com/xiangjianan/lks/blob/master/static/bootstrap-4.6.1/js/bootstrap.bundle.js): `static/bootstrap-4.6.1/js/bootstrap.bundle.js`
- [Icon font](https://github.com/xiangjianan/lks/blob/master/static/iconfont-2.0.1/iconfont.2.0.1.css): `static/iconfont-2.0.1/iconfont.2.0.1.css`
- **jQuery**
- [Deferred assets](https://github.com/xiangjianan/lks/blob/master/static/site/js/defer.2.2.6.js): `static/site/js/defer.2.2.6.js`

### Remote services

- **Likes API**
- **Catalog update API**
- **Bilibili player**

### Other components

- **Visitor**

## Connections

- Visitor → Main page: opens (evidence: `README.md`)
- Main page → Website catalog: catalog data (evidence: `README.md`)
- Catalog rendering → Isotope filtering: filters and sorts (evidence: `static/site/js/index.2.2.5.js`)
- Catalog rendering → Browser localStorage: reads favorites (evidence: `static/site/js/index.2.2.5.js`)
- Search and likes → Browser localStorage: stores preferences (evidence: `static/site/js/defer.2.2.6.js`)
- Search and likes → Isotope filtering: updates sorting (evidence: `static/site/js/defer.2.2.6.js`)
- Search and likes → Likes API: fetches and updates counts (evidence: `static/site/js/defer.2.2.6.js`)
- Search and likes → Catalog update API: checks and fetches data (evidence: `static/site/js/defer.2.2.6.js`)
- Catalog rendering → Bilibili player: sets preview source (evidence: `static/site/js/index.2.2.5.js`)
- Search and likes → Bundled Bootstrap: configures popovers (evidence: `static/site/js/defer.2.2.6.js`)
- Bootstrap widgets → jQuery: uses (evidence: `static/bootstrap-4.6.1/js/bootstrap.js`)
- Bundled Bootstrap → jQuery: uses (evidence: `static/bootstrap-4.6.1/js/bootstrap.bundle.js`)
- Catalog rendering → Browser localStorage: reads favorite state (evidence: `static/site/js/index.2.2.5.js`)
