# zipkamron/zipnationthemes architecture

> Architecture diagram of the GitHub repository zipkamron/zipnationthemes, 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/zipkamron/zipnationthemes
- Repository: https://github.com/zipkamron/zipnationthemes

## Overview

ZIPNATION VIP Themes is a VS Code theme-store extension: users browse and apply free or VIP themes, preview VIP themes for ten minutes, and unlock paid access with a license. The extension owns store interaction and trial/license gating; theme JSON files provide the palettes. The server excerpt documents license lookup, telemetry intake, checkout-related activation, and administration, but omitted code limits confidence about several server-side call paths. Major store features such as translations and feedback are documented, though their full handlers are not sampled.

Main entry points: [`extension.js`](https://github.com/zipkamron/zipnationthemes/blob/main/extension.js) (Theme Store), [`lib/license.js`](https://github.com/zipkamron/zipnationthemes/blob/main/lib/license.js) (License Verification), [`server/lemonsqueezy-webhook-server.js`](https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js) (License Records), [`lib/telemetry.js`](https://github.com/zipkamron/zipnationthemes/blob/main/lib/telemetry.js) (Telemetry Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_extension["Editor Extension"]
  node_extension["Extension Runtime<br/>[extension.js]"]
  node_store["Theme Store<br/>[extension.js]"]
  node_trials["Trial Manager<br/>[extension.js]"]
  node_themeguard["Theme Guard<br/>[extension.js]"]
  node_feedback["Store Feedback<br/>[extension.js]"]
end

subgraph group_licensing["VIP Access"]
  node_license["License Verification<br/>[license.js]"]
  node_pubkey["Public Signing Key<br/>[public-key.js]"]
end

subgraph group_themes["Theme Catalog"]
  node_themejson["Theme Definitions"]
end

subgraph group_server["License Service"]
  node_licenseapi["License API"]
  node_licensefiles[("License Records")]
  node_webhook["Checkout Webhook"]
  node_telemetryapi["Telemetry Intake"]
  node_telemetrydata[("Telemetry Data")]
  node_admin["Admin Dashboard"]
end

subgraph group_analytics["Telemetry"]
  node_telemetryclient["Telemetry Client<br/>[telemetry.js]"]
end

node_user(("Theme User"))
node_lemonsqueezy["Lemon Squeezy"]
node_editor["VS Code API"]

node_user -->|"opens and browses"| node_store
node_store -->|"offers palettes"| node_themejson
node_store -->|"starts preview"| node_trials
node_store -->|"submits license"| node_license
node_store -->|"submits feedback"| node_feedback
node_extension -->|"opens"| node_store
node_extension -->|"tracks events"| node_telemetryclient
node_extension -->|"guards VIP themes"| node_themeguard
node_themeguard -->|"checks active trial"| node_trials
node_themeguard -->|"checks entitlement"| node_license
node_themeguard -->|"applies fallback theme"| node_editor
node_trials -->|"applies preview theme"| node_editor
node_license -->|"verifies signature with"| node_pubkey
node_license -->|"looks up or verifies"| node_licenseapi
node_licenseapi -->|"reads and updates"| node_licensefiles
node_webhook -->|"issues license records"| node_licensefiles
node_lemonsqueezy -.->|"sends purchase events"| node_webhook
node_telemetryclient -->|"posts consented events"| node_telemetryapi
node_telemetryapi -->|"records events"| node_telemetrydata
node_admin -->|"manages licenses"| node_licensefiles
node_admin -->|"reads analytics"| node_telemetrydata
node_user -->|"uses themes in"| node_editor

click node_extension "https://github.com/zipkamron/zipnationthemes/blob/main/extension.js"
click node_store "https://github.com/zipkamron/zipnationthemes/blob/main/extension.js"
click node_trials "https://github.com/zipkamron/zipnationthemes/blob/main/extension.js"
click node_themeguard "https://github.com/zipkamron/zipnationthemes/blob/main/extension.js"
click node_themejson "https://github.com/zipkamron/zipnationthemes/tree/main/themes"
click node_license "https://github.com/zipkamron/zipnationthemes/blob/main/lib/license.js"
click node_pubkey "https://github.com/zipkamron/zipnationthemes/blob/main/lib/public-key.js"
click node_licenseapi "https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js"
click node_licensefiles "https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js"
click node_webhook "https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js"
click node_telemetryclient "https://github.com/zipkamron/zipnationthemes/blob/main/lib/telemetry.js"
click node_telemetryapi "https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js"
click node_telemetrydata "https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js"
click node_feedback "https://github.com/zipkamron/zipnationthemes/blob/main/extension.js"
click node_admin "https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.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_extension,node_store,node_trials,node_themeguard,node_feedback,node_user toneBlue
class node_license,node_pubkey toneAmber
class node_themejson,node_editor toneMint
class node_licenseapi,node_licensefiles,node_webhook,node_telemetryapi,node_telemetrydata,node_admin toneRose
class node_telemetryclient,node_lemonsqueezy toneIndigo
```

## Components

### Editor Extension

- [Extension Runtime](https://github.com/zipkamron/zipnationthemes/blob/main/extension.js): `extension.js`
- [Theme Store](https://github.com/zipkamron/zipnationthemes/blob/main/extension.js): `extension.js`
- [Trial Manager](https://github.com/zipkamron/zipnationthemes/blob/main/extension.js): `extension.js`
- [Theme Guard](https://github.com/zipkamron/zipnationthemes/blob/main/extension.js): `extension.js`
- [Store Feedback](https://github.com/zipkamron/zipnationthemes/blob/main/extension.js): `extension.js`

### VIP Access

- [License Verification](https://github.com/zipkamron/zipnationthemes/blob/main/lib/license.js): `lib/license.js`
- [Public Signing Key](https://github.com/zipkamron/zipnationthemes/blob/main/lib/public-key.js): `lib/public-key.js`

### Theme Catalog

- [Theme Definitions](https://github.com/zipkamron/zipnationthemes/tree/main/themes): `themes`

### License Service

- [License API](https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js): `server/lemonsqueezy-webhook-server.js`
- [License Records](https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js): `server/lemonsqueezy-webhook-server.js`
- [Checkout Webhook](https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js): `server/lemonsqueezy-webhook-server.js`
- [Telemetry Intake](https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js): `server/lemonsqueezy-webhook-server.js`
- [Telemetry Data](https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js): `server/lemonsqueezy-webhook-server.js`
- [Admin Dashboard](https://github.com/zipkamron/zipnationthemes/blob/main/server/lemonsqueezy-webhook-server.js): `server/lemonsqueezy-webhook-server.js`

### Telemetry

- [Telemetry Client](https://github.com/zipkamron/zipnationthemes/blob/main/lib/telemetry.js): `lib/telemetry.js`

### Other components

- **Theme User**
- **Lemon Squeezy**
- **VS Code API**

## Connections

- Theme User → Theme Store: opens and browses
- Theme Store → Theme Definitions: offers palettes
- Theme Store → Trial Manager: starts preview
- Theme Store → License Verification: submits license
- Theme Store → Store Feedback: submits feedback
- Extension Runtime → Theme Store: opens
- Extension Runtime → Telemetry Client: tracks events
- Extension Runtime → Theme Guard: guards VIP themes
- Theme Guard → Trial Manager: checks active trial
- Theme Guard → License Verification: checks entitlement
- Theme Guard → VS Code API: applies fallback theme
- Trial Manager → VS Code API: applies preview theme
- License Verification → Public Signing Key: verifies signature with
- License Verification → License API: looks up or verifies
- License API → License Records: reads and updates
- Checkout Webhook → License Records: issues license records
- Lemon Squeezy → Checkout Webhook: sends purchase events
- Telemetry Client → Telemetry Intake: posts consented events
- Telemetry Intake → Telemetry Data: records events
- Admin Dashboard → License Records: manages licenses
- Admin Dashboard → Telemetry Data: reads analytics
- Theme User → VS Code API: uses themes in
