# ottofeller/templates architecture

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

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

## Overview

##### Main Components Identification

The system should be represented as a template engine architecture with the following main components:

a) Core Template Engine
- Located in src/common
- Handles shared functionality across all templates
- Includes common features like Git hooks, linting, GitHub workflows

b) Template Modules (Individual Project Types)
- Apollo Server Template (src/apollo-server)
- Backend Test Template (src/backend-test)
- CDK Template (src/cdk)
- NextJS Template (src/nextjs)
- Playwright Template (src/playwright)
- SST Template (src/sst)

##### Component Relationships

**[Core Template Engine]**

- [Common Services]
- Git Integration
- Docker Support
- Linting System
- GitHub Workflows
- Telemetry
- GraphQL Support

- [Template Modules]
- Apollo Server Template
- Backend Test Template
- CDK Template
- NextJS Template
- Playwright Template
- SST Template

##### Specific Implementation Details

For each template module, show:
- Input: Configuration options (from README)
- Output: Generated project structure
- Dependencies: Required packages and tools
- Integration points with common services

##### Architectural Patterns to Highlight

- Component-based architecture
- Inheritance and composition patterns
- Plugin system for features like Docker and GraphQL
- Configuration management system

##### Key Relationships

- How templates inherit from common components
- How configuration options affect template generation
- Integration points with external tools (Projen, JSII)
- Build and deployment workflows

Remember to include:
- Version control integration points
- Build and synthesis workflows
- Template customization mechanisms
- Integration with external tools and services

This will provide a clear understanding of how the template system works while maintaining the necessary level of detail for implementation and maintenance.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core
        CE[Core Template Engine]
        click CE "https://github.com/ottofeller/templates/tree/main/src/common"
    end

    subgraph Common
        CS[Common Services]
        GI[Git Integration]
        click GI "https://github.com/ottofeller/templates/tree/main/src/common/git"
        DS[Docker Support]
        click DS "https://github.com/ottofeller/templates/tree/main/src/common/docker"
        LS[Linting System]
        click LS "https://github.com/ottofeller/templates/tree/main/src/common/lint"
        GH[GitHub Workflows]
        click GH "https://github.com/ottofeller/templates/tree/main/src/common/github"
        TS[Telemetry]
        click TS "https://github.com/ottofeller/templates/tree/main/src/common/telemetry"
        GS[GraphQL Support]
        click GS "https://github.com/ottofeller/templates/tree/main/src/common/graphql"
        FM[File Management]
        click FM "https://github.com/ottofeller/templates/tree/main/src/common/files"
        VS[VS Code Integration]
        click VS "https://github.com/ottofeller/templates/tree/main/src/common/vscode-settings"
        TM[Task Management]
        click TM "https://github.com/ottofeller/templates/tree/main/src/common/tasks"
        DS2[Documentation System]
        click DS2 "https://github.com/ottofeller/templates/tree/main/src/common/readme"
    end

    subgraph Templates
        AT[Apollo Server Template]
        click AT "https://github.com/ottofeller/templates/tree/main/src/apollo-server"
        BT[Backend Test Template]
        click BT "https://github.com/ottofeller/templates/tree/main/src/backend-test"
        CT[CDK Template]
        click CT "https://github.com/ottofeller/templates/tree/main/src/cdk"
        NT[NextJS Template]
        click NT "https://github.com/ottofeller/templates/tree/main/src/nextjs"
        PT[Playwright Template]
        click PT "https://github.com/ottofeller/templates/tree/main/src/playwright"
        ST[SST Template]
        click ST "https://github.com/ottofeller/templates/tree/main/src/sst"
    end

    CE --> CS
    CS --> GI
    CS --> DS
    CS --> LS
    CS --> GH
    CS --> TS
    CS --> GS
    CS --> FM
    CS --> VS
    CS --> TM
    CS --> DS2

    CE --> Templates
    Templates --> AT
    Templates --> BT
    Templates --> CT
    Templates --> NT
    Templates --> PT
    Templates --> ST

    %% Styling
    classDef core fill:#2374ab
    classDef common fill:#48a9a6
    classDef template fill:#e4572e
    classDef service fill:#17bebb

    class CE core
    class CS,GI,DS,LS,GH,TS,GS,FM,VS,TM,DS2 common
    class AT,BT,CT,NT,PT,ST template

    %% Legend
    subgraph Legend
        L1[Core Components]:::core
        L2[Common Services]:::common
        L3[Template Modules]:::template
    end
```
