# eriksongm/blocks architecture

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

- Interactive diagram: https://gitdiagram.com/eriksongm/blocks
- Repository: https://github.com/eriksongm/blocks

## Overview

Blocks Admin is a Nuxt UI collection of admin-page experiences, with a copyable-block catalog that extracts self-contained Vue fragments from selected pages. Users browse domain-specific pages and copy blocks for reuse; the README describes local interactions and standalone paste validation, but the excerpts do not establish page-to-page or backend data flows. Domain nodes represent page families rather than inspected implementations; the copy workflow is shown only where source or README evidence supports it.

Main entry points: [`app/app.vue`](https://github.com/eriksongm/blocks/blob/main/app/app.vue) (Nuxt app shell), [`scripts/block-catalog.mjs`](https://github.com/eriksongm/blocks/blob/main/scripts/block-catalog.mjs) (Block extractor), [`app/components/BlockCopyTools.vue`](https://github.com/eriksongm/blocks/blob/main/app/components/BlockCopyTools.vue) (Block copy tools), [`scripts/preview-copy-blocks.mjs`](https://github.com/eriksongm/blocks/blob/main/scripts/preview-copy-blocks.mjs) (Standalone paste preview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Admin experiences"]
  node_app_shell["Nuxt app shell<br/>[app.vue]"]
  node_developer_pages["Developer tools"]
  node_general_pages["General admin pages"]
end

subgraph group_ai["AI workspace"]
  node_ai_pages["AI chat workspace"]
end

subgraph group_commerce["Commerce operations"]
  node_ecommerce_pages["Ecommerce"]
  node_payments_pages["Payment processor"]
end

subgraph group_copy["Copyable blocks"]
  node_copy_tools["Block copy tools<br/>[BlockCopyTools.vue]"]
  node_block_registry[("Block records")]
  node_catalog_builder["Block extractor<br/>[block-catalog.mjs]"]
  node_nuxt_catalog["Nuxt catalog module<br/>[block-catalog.mjs]"]
  node_catalog_types["Catalog types<br/>[block-catalog.ts]"]
  node_paste_preview["Standalone paste preview"]
end

subgraph group_projects["Project work"]
  node_todo_pages["Todo tasks"]
  node_project_pages["Project management"]
end

node_admin_user(("Admin user"))

node_admin_user -->|"uses"| node_app_shell
node_app_shell -.->|"routes to"| node_ai_pages
node_app_shell -.->|"routes to"| node_ecommerce_pages
node_app_shell -.->|"routes to"| node_payments_pages
node_app_shell -.->|"routes to"| node_project_pages
node_app_shell -.->|"routes to"| node_todo_pages
node_app_shell -.->|"routes to"| node_developer_pages
node_app_shell -.->|"routes to"| node_general_pages
node_admin_user -->|"copies blocks"| node_copy_tools
node_copy_tools -->|"extracts blocks"| node_catalog_builder
node_catalog_builder -->|"reads records"| node_block_registry
node_nuxt_catalog -->|"builds catalog"| node_catalog_builder
node_catalog_builder -.->|"defines metadata"| node_catalog_types
node_admin_user -->|"checks pasted blocks"| node_paste_preview
node_paste_preview -->|"builds exports"| node_catalog_builder

click node_app_shell "https://github.com/eriksongm/blocks/blob/main/app/app.vue"
click node_developer_pages "https://github.com/eriksongm/blocks/tree/main/app/pages/developers"
click node_general_pages "https://github.com/eriksongm/blocks/tree/main/app/pages/original"
click node_todo_pages "https://github.com/eriksongm/blocks/tree/main/app/pages/todo"
click node_project_pages "https://github.com/eriksongm/blocks/tree/main/app/pages/project-management"
click node_ai_pages "https://github.com/eriksongm/blocks/tree/main/app/pages/ai-chat"
click node_ecommerce_pages "https://github.com/eriksongm/blocks/tree/main/app/pages/ecommerce"
click node_payments_pages "https://github.com/eriksongm/blocks/tree/main/app/pages/payment-processor"
click node_copy_tools "https://github.com/eriksongm/blocks/blob/main/app/components/BlockCopyTools.vue"
click node_block_registry "https://github.com/eriksongm/blocks/tree/main/app/data/copy-blocks"
click node_catalog_builder "https://github.com/eriksongm/blocks/blob/main/scripts/block-catalog.mjs"
click node_nuxt_catalog "https://github.com/eriksongm/blocks/blob/main/modules/block-catalog.mjs"
click node_catalog_types "https://github.com/eriksongm/blocks/blob/main/app/types/block-catalog.ts"
click node_paste_preview "https://github.com/eriksongm/blocks/blob/main/scripts/preview-copy-blocks.mjs"

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_app_shell,node_developer_pages,node_general_pages,node_admin_user toneBlue
class node_ai_pages toneAmber
class node_ecommerce_pages,node_payments_pages toneMint
class node_copy_tools,node_block_registry,node_catalog_builder,node_nuxt_catalog,node_catalog_types,node_paste_preview toneRose
class node_todo_pages,node_project_pages toneIndigo
```

## Components

### Admin experiences

- [Nuxt app shell](https://github.com/eriksongm/blocks/blob/main/app/app.vue): `app/app.vue`
- [Developer tools](https://github.com/eriksongm/blocks/tree/main/app/pages/developers): `app/pages/developers`
- [General admin pages](https://github.com/eriksongm/blocks/tree/main/app/pages/original): `app/pages/original`

### AI workspace

- [AI chat workspace](https://github.com/eriksongm/blocks/tree/main/app/pages/ai-chat): `app/pages/ai-chat`

### Commerce operations

- [Ecommerce](https://github.com/eriksongm/blocks/tree/main/app/pages/ecommerce): `app/pages/ecommerce`
- [Payment processor](https://github.com/eriksongm/blocks/tree/main/app/pages/payment-processor): `app/pages/payment-processor`

### Copyable blocks

- [Block copy tools](https://github.com/eriksongm/blocks/blob/main/app/components/BlockCopyTools.vue): `app/components/BlockCopyTools.vue`
- [Block records](https://github.com/eriksongm/blocks/tree/main/app/data/copy-blocks): `app/data/copy-blocks`
- [Block extractor](https://github.com/eriksongm/blocks/blob/main/scripts/block-catalog.mjs): `scripts/block-catalog.mjs`
- [Nuxt catalog module](https://github.com/eriksongm/blocks/blob/main/modules/block-catalog.mjs): `modules/block-catalog.mjs`
- [Catalog types](https://github.com/eriksongm/blocks/blob/main/app/types/block-catalog.ts): `app/types/block-catalog.ts`
- [Standalone paste preview](https://github.com/eriksongm/blocks/blob/main/scripts/preview-copy-blocks.mjs): `scripts/preview-copy-blocks.mjs`

### Project work

- [Todo tasks](https://github.com/eriksongm/blocks/tree/main/app/pages/todo): `app/pages/todo`
- [Project management](https://github.com/eriksongm/blocks/tree/main/app/pages/project-management): `app/pages/project-management`

### Other components

- **Admin user**

## Connections

- Admin user → Nuxt app shell: uses
- Nuxt app shell → AI chat workspace: routes to
- Nuxt app shell → Ecommerce: routes to
- Nuxt app shell → Payment processor: routes to
- Nuxt app shell → Project management: routes to
- Nuxt app shell → Todo tasks: routes to
- Nuxt app shell → Developer tools: routes to
- Nuxt app shell → General admin pages: routes to
- Admin user → Block copy tools: copies blocks
- Block copy tools → Block extractor: extracts blocks
- Block extractor → Block records: reads records (evidence: `scripts/block-catalog.mjs`)
- Nuxt catalog module → Block extractor: builds catalog (evidence: `modules/block-catalog.mjs`)
- Block extractor → Catalog types: defines metadata
- Admin user → Standalone paste preview: checks pasted blocks
- Standalone paste preview → Block extractor: builds exports (evidence: `scripts/preview-copy-blocks.mjs`)
