# indaco/teseo architecture

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

- Interactive diagram: https://gitdiagram.com/indaco/teseo
- Repository: https://github.com/indaco/teseo

## Overview

##### Main Components Structure

a) Core SEO Components Layer:
- Schema.org Components (schemaorg/)
- OpenGraph Components (opengraph/)
- Twitter Cards Components (twittercard/)

b) Rendering Layer:
- Templ Component Renderer
- HTML Template Renderer

c) Utilities Layer:
- URL Helpers
- Common Types
- Conversion Utilities

##### Component Relationships

a) Use a top-down approach with three distinct sections:
**[Consumer Applications]**
- ↓
**[Teseo Library Core]**
- ↓
**[Output Formats]**

- Blue: Core SEO component types
- Green: Rendering components
- Orange: Utility functions
- Gray: External dependencies
- Purple: Output formats

##### Detailed Component Breakdown

**┌─ Schema.org Components ─────┐    ┌─ OpenGraph Components ────┐    ┌─ Twitter Card Components ─┐**
- Article                   │    │ - Article                 │    │ - Summary Card            │
- BreadcrumbList           │    │ - Audio                   │    │ - Summary Large Image     │
- Event                    │    │ - Book                    │    │ - App Card                │
- FAQPage                  │    │ - Business                │    │ - Player Card             │
- LocalBusiness            │    │ - Event                   │    └─────────────────────────┘
- Organization             │    │ - Music*                  │
- Person                   │    │ - Place                   │
- Product                  │    │ - Product                 │
- SiteNavigationElement    │    │ - Video*                  │
- WebPage                  │    └─────────────────────────┘
- Website                  │
- ┘

##### Integration Flow

**[Input Data] → [Component Creation] → [Rendering Methods] → [Output Formats]**
- ↓                      ↓                    ↓
- (Struct/Factory)         (ToJsonLd)            (JSON-LD)
- (ToMetaTags)           (Meta Tags)
- (Sitemap XML)

##### Implementation Details

Technical notes:
- Go version compatibility
- templ dependency
- File structure organization
- Configuration options

**[Web Application] → [Teseo Component] → [Generated SEO Output]**
- (templ)           (Article)         (JSON-LD + Meta Tags)

##### The extensibility of the system

Remember to include notes about the demo application structure as a reference implementation, showing how all components can be used together in a real-world scenario.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Consumer["Consumer Applications"]
        WebApp["Web Application"]:::consumer
    end

    subgraph Core["Teseo Library Core"]
        subgraph Schema["Schema.org Components"]
            Article["Article"]:::schema
            BreadcrumbList["BreadcrumbList"]:::schema
            Event["Event"]:::schema
            FAQPage["FAQPage"]:::schema
            LocalBusiness["LocalBusiness"]:::schema
            Organization["Organization"]:::schema
            Person["Person"]:::schema
            Product["Product"]:::schema
            SiteNavigation["SiteNavigationElement"]:::schema
            WebPage["WebPage"]:::schema
            Website["Website"]:::schema
            SchemaTypes["Common Types"]:::types
        end

        subgraph OpenGraph["OpenGraph Components"]
            OGArticle["Article"]:::opengraph
            OGAudio["Audio"]:::opengraph
            OGBook["Book"]:::opengraph
            OGBusiness["Business"]:::opengraph
            OGEvent["Event"]:::opengraph
            OGMusic["Music"]:::opengraph
            OGPlace["Place"]:::opengraph
            OGProduct["Product"]:::opengraph
            OGVideo["Video"]:::opengraph
            OGTypes["Common Types"]:::types
        end

        subgraph Twitter["Twitter Card Components"]
            TWCard["Twitter Cards"]:::twitter
        end

        subgraph Rendering["Rendering Layer"]
            TemplRenderer["Templ Renderer"]:::renderer
            HTMLRenderer["HTML Template Renderer"]:::renderer
        end

        subgraph Utils["Utilities Layer"]
            URLHelpers["URL Helpers"]:::utils
            ConvUtils["Conversion Utilities"]:::utils
        end
    end

    subgraph Output["Output Formats"]
        JsonLD["JSON-LD"]:::output
        MetaTags["Meta Tags"]:::output
        SitemapXML["Sitemap XML"]:::output
    end

    %% Relationships
    WebApp --> Core
    Schema --> TemplRenderer
    Schema --> HTMLRenderer
    OpenGraph --> TemplRenderer
    OpenGraph --> HTMLRenderer
    Twitter --> TemplRenderer
    Twitter --> HTMLRenderer
    TemplRenderer --> JsonLD
    TemplRenderer --> MetaTags
    HTMLRenderer --> JsonLD
    HTMLRenderer --> MetaTags
    SiteNavigation --> SitemapXML
    
    %% Click Events
    click Article "https://github.com/indaco/teseo/blob/main/schemaorg/article.go"
    click BreadcrumbList "https://github.com/indaco/teseo/blob/main/schemaorg/breadcrumblist.go"
    click Event "https://github.com/indaco/teseo/blob/main/schemaorg/event.go"
    click FAQPage "https://github.com/indaco/teseo/blob/main/schemaorg/faq_page.go"
    click LocalBusiness "https://github.com/indaco/teseo/blob/main/schemaorg/local_business.go"
    click Organization "https://github.com/indaco/teseo/blob/main/schemaorg/organization.go"
    click Person "https://github.com/indaco/teseo/blob/main/schemaorg/person.go"
    click Product "https://github.com/indaco/teseo/blob/main/schemaorg/product.go"
    click SiteNavigation "https://github.com/indaco/teseo/blob/main/schemaorg/sitenavigationelement.go"
    click WebPage "https://github.com/indaco/teseo/blob/main/schemaorg/webpage.go"
    click Website "https://github.com/indaco/teseo/blob/main/schemaorg/website.go"
    click SchemaTypes "https://github.com/indaco/teseo/blob/main/schemaorg/types.go"
    
    click OGArticle "https://github.com/indaco/teseo/blob/main/opengraph/article.go"
    click OGAudio "https://github.com/indaco/teseo/blob/main/opengraph/audio.go"
    click OGBook "https://github.com/indaco/teseo/blob/main/opengraph/book.go"
    click OGBusiness "https://github.com/indaco/teseo/blob/main/opengraph/business.go"
    click OGEvent "https://github.com/indaco/teseo/blob/main/opengraph/event.go"
    click OGMusic "https://github.com/indaco/teseo/blob/main/opengraph/music_song.go"
    click OGPlace "https://github.com/indaco/teseo/blob/main/opengraph/place.go"
    click OGProduct "https://github.com/indaco/teseo/blob/main/opengraph/product.go"
    click OGVideo "https://github.com/indaco/teseo/blob/main/opengraph/video.go"
    click OGTypes "https://github.com/indaco/teseo/blob/main/opengraph/types.go"
    
    click TWCard "https://github.com/indaco/teseo/blob/main/twittercard/twittercard.go"
    click TemplRenderer "https://github.com/indaco/teseo/blob/main/renderer.go"
    click URLHelpers "https://github.com/indaco/teseo/blob/main/utils.go"
    
    %% Styles
    classDef consumer fill:#f9f,stroke:#333,stroke-width:2px
    classDef schema fill:#9cf,stroke:#333,stroke-width:1px
    classDef opengraph fill:#fcf,stroke:#333,stroke-width:1px
    classDef twitter fill:#cff,stroke:#333,stroke-width:1px
    classDef renderer fill:#9f9,stroke:#333,stroke-width:1px
    classDef utils fill:#ff9,stroke:#333,stroke-width:1px
    classDef types fill:#ddd,stroke:#333,stroke-width:1px
    classDef output fill:#f99,stroke:#333,stroke-width:1px
```
