# frizalouryuken/frizaldomain architecture

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

- Interactive diagram: https://gitdiagram.com/frizalouryuken/frizaldomain
- Repository: https://github.com/frizalouryuken/frizaldomain

## Overview

Frizal Domain is a browser-based archive of game projects and blog information, with search, filters, sorting, media viewing, and a daily visitor counter. Visitors browse the site’s game and blog collections; the counter client requests totals from a Worker backed by D1. A separate Tkinter post manager edits post content. The README is empty, so the site’s capabilities are inferred from the sampled application and data. The post manager’s save targets and the page’s HTML wiring were not shown, so those links are omitted.

Main entry points: [`app.js`](https://github.com/frizalouryuken/frizaldomain/blob/master/app.js) (Browse and render), [`visitor-counter.js`](https://github.com/frizalouryuken/frizaldomain/blob/master/visitor-counter.js) (Counter client), [`worker.mjs`](https://github.com/frizalouryuken/frizaldomain/blob/master/worker.mjs) (API worker), [`migrations/0001_visitors.sql`](https://github.com/frizalouryuken/frizaldomain/blob/master/migrations/0001_visitors.sql) (Counter schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Archive site"]
  node_site_app["Browse and render<br/>[app.js]"]
end

subgraph group_content["Content data"]
  node_game_data["Game projects<br/>[games.js]"]
  node_blog_data["Blog posts<br/>[blog.js]"]
end

subgraph group_counter["Visitor counter"]
  node_counter_client["Counter client<br/>[visitor-counter.js]"]
  node_worker["API worker<br/>[worker.mjs]"]
  node_d1[("Visitor database")]
  node_schema["Counter schema<br/>[0001_visitors.sql]"]
end

subgraph group_authoring["Content authoring"]
  node_post_manager["Post manager<br/>[post_manager.py]"]
end

node_visitor(("Visitor"))
node_author(("Site author"))

node_visitor -->|"browses"| node_site_app
node_site_app -->|"reads projects"| node_game_data
node_site_app -->|"reads posts"| node_blog_data
node_visitor -.->|"views counter"| node_counter_client
node_counter_client -->|"requests count"| node_worker
node_worker -->|"queries and updates"| node_d1
node_schema -.->|"defines tables"| node_d1
node_author -->|"edits posts"| node_post_manager

click node_site_app "https://github.com/frizalouryuken/frizaldomain/blob/master/app.js"
click node_game_data "https://github.com/frizalouryuken/frizaldomain/blob/master/games.js"
click node_blog_data "https://github.com/frizalouryuken/frizaldomain/blob/master/blog.js"
click node_counter_client "https://github.com/frizalouryuken/frizaldomain/blob/master/visitor-counter.js"
click node_worker "https://github.com/frizalouryuken/frizaldomain/blob/master/worker.mjs"
click node_schema "https://github.com/frizalouryuken/frizaldomain/blob/master/migrations/0001_visitors.sql"
click node_post_manager "https://github.com/frizalouryuken/frizaldomain/blob/master/tools/post_manager.py"

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_site_app toneBlue
class node_game_data,node_blog_data toneAmber
class node_counter_client,node_worker,node_d1,node_schema toneMint
class node_post_manager toneRose
class node_visitor,node_author toneIndigo
```

## Components

### Archive site

- [Browse and render](https://github.com/frizalouryuken/frizaldomain/blob/master/app.js): `app.js`

### Content data

- [Game projects](https://github.com/frizalouryuken/frizaldomain/blob/master/games.js): `games.js`
- [Blog posts](https://github.com/frizalouryuken/frizaldomain/blob/master/blog.js): `blog.js`

### Visitor counter

- [Counter client](https://github.com/frizalouryuken/frizaldomain/blob/master/visitor-counter.js): `visitor-counter.js`
- [API worker](https://github.com/frizalouryuken/frizaldomain/blob/master/worker.mjs): `worker.mjs`
- **Visitor database**
- [Counter schema](https://github.com/frizalouryuken/frizaldomain/blob/master/migrations/0001_visitors.sql): `migrations/0001_visitors.sql`

### Content authoring

- [Post manager](https://github.com/frizalouryuken/frizaldomain/blob/master/tools/post_manager.py): `tools/post_manager.py`

### Other components

- **Visitor**
- **Site author**

## Connections

- Visitor → Browse and render: browses (evidence: `app.js`)
- Browse and render → Game projects: reads projects (evidence: `app.js`)
- Browse and render → Blog posts: reads posts (evidence: `app.js`)
- Visitor → Counter client: views counter
- Counter client → API worker: requests count (evidence: `visitor-counter.js`)
- API worker → Visitor database: queries and updates (evidence: `worker.mjs`)
- Counter schema → Visitor database: defines tables
- Site author → Post manager: edits posts (evidence: `tools/post_manager.py`)
