# tanghoong/templates architecture

> Architecture diagram of the GitHub repository tanghoong/templates, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tanghoong/templates
- Repository: https://github.com/tanghoong/templates

## Overview

##### Project type and purpose
- This is an open-source collection of “single-file” web templates.
- Each template is a standalone HTML file bundling a JS framework (or none) and a CSS framework.
- The goal is to let developers clone or download one file, open it in a browser, and have a working UI scaffold.

##### File structure
- Top-level:
- LICENSE, README.md – project metadata
- *.html files – each is a template.
- No “src”, “build” or “backend” directories – it’s purely static.
- Naming convention groups by framework:
- nojs-*.html (plain HTML + CSS only)
- react-tailwind-todo.html (React + Tailwind)
- vue-tailwind-calendar.html (Vue + Tailwind)
- alpine-pico-weather.html (Alpine + PicoCSS)

##### Relevant README insights
- Confirms single-file, zero-setup approach.
- Lists each template, its JS & CSS frameworks, and key features (responsive, components, cross-browser).
- Encourages customization, extension, and integration with backends or APIs.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Browser and Hosting
    Browser["User's Browser"]:::browser
    Host["Static File Host/CDN"]:::static

    Browser -->|HTTP GET| Host
    Host -->|Serves .html| Templates

    %% Template Files Group
    subgraph "Template Files"
        direction TB
        subgraph "No-JS Templates"
            direction TB
            NJ1["nojs-bootstrap-album.html"]:::static
            NJ2["nojs-bulma-landing.html"]:::static
            NJ3["nojs-foundation-blog.html"]:::static
            NJ4["nojs-tailwind-dashboard.html"]:::static
        end
        subgraph "JS-Powered Templates"
            direction TB
            JP1["react-tailwind-todo.html"]:::static
            JP2["fnbpos/react-tailwind-counterpos.html"]:::static
            JP3["vue-tailwind-calendar.html"]:::static
            JP4["alpine-pico-weather.html"]:::static
        end
    end

    Templates --> NJ1
    Templates --> NJ2
    Templates --> NJ3
    Templates --> NJ4
    Templates --> JP1
    Templates --> JP2
    Templates --> JP3
    Templates --> JP4

    %% CSS Frameworks
    subgraph "CSS Frameworks"
        direction TB
        Bootstrap["Bootstrap"]:::css
        Bulma["Bulma"]:::css
        Foundation["Foundation"]:::css
        Tailwind["Tailwind"]:::css
        PicoCSS["PicoCSS"]:::css
    end

    %% JS Frameworks
    subgraph "JS Frameworks"
        direction TB
        React["React"]:::js
        Vue["Vue.js"]:::js
        Alpine["Alpine.js"]:::js
    end

    %% External API
    API["External REST API"]:::external

    %% Template to Framework relationships
    NJ1 -->|CSS| Bootstrap
    NJ2 -->|CSS| Bulma
    NJ3 -->|CSS| Foundation
    NJ4 -->|CSS| Tailwind

    JP1 -->|CSS| Tailwind
    JP1 -->|JS| React
    JP2 -->|CSS| Tailwind
    JP2 -->|JS| React
    JP3 -->|CSS| Tailwind
    JP3 -->|JS| Vue
    JP4 -->|CSS| PicoCSS
    JP4 -->|JS| Alpine

    %% JS to API
    React -->|fetch/API calls| API
    Vue -->|fetch/API calls| API
    Alpine -->|fetch/API calls| API

    %% Click Events for component mapping
    click README.md "https://github.com/tanghoong/templates/blob/main/README.md"
    click LICENSE "https://github.com/tanghoong/templates/tree/main/LICENSE"
    click alpine-pico-weather.html "https://github.com/tanghoong/templates/blob/main/alpine-pico-weather.html"
    click react-tailwind-todo.html "https://github.com/tanghoong/templates/blob/main/react-tailwind-todo.html"
    click fnbpos/react-tailwind-counterpos.html "https://github.com/tanghoong/templates/blob/main/fnbpos/react-tailwind-counterpos.html"
    click vue-tailwind-calendar.html "https://github.com/tanghoong/templates/blob/main/vue-tailwind-calendar.html"
    click nojs-bootstrap-album.html "https://github.com/tanghoong/templates/blob/main/nojs-bootstrap-album.html"
    click nojs-bulma-landing.html "https://github.com/tanghoong/templates/blob/main/nojs-bulma-landing.html"
    click nojs-foundation-blog.html "https://github.com/tanghoong/templates/blob/main/nojs-foundation-blog.html"
    click nojs-tailwind-dashboard.html "https://github.com/tanghoong/templates/blob/main/nojs-tailwind-dashboard.html"

    %% Styles
    classDef static fill:#dddddd,stroke:#888888
    classDef css fill:#bbdefb,stroke:#1e88e5
    classDef js fill:#c8e6c9,stroke:#388e3c
    classDef browser fill:#ffcc80,stroke:#f57c00
    classDef external fill:#e1bee7,stroke:#8e24aa
```
