# ayane0857/ayane-utau-site architecture

> Architecture diagram of the GitHub repository ayane0857/ayane-utau-site, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ayane0857/ayane-utau-site
- Repository: https://github.com/ayane0857/ayane-utau-site

## Overview

##### Project type and purpose
- This is a full-stack, server-side rendered React application built with Next.js 13 (the `app/` directory).
- It serves dynamic and static pages (news, license, sitemap, etc.) and is styled with Tailwind CSS.
- It is containerized with Docker and deployed to a Kubernetes cluster via ArgoCD (see `argoCD/` manifests).

##### File structure
Top-level areas:
- app/           → Next.js “App Router” pages and layouts
- components/    → UI components (buttons, cards, header, footer, newslist)
- lib/           → shared utilities (`utils.ts`) and a custom API client (`client.js`)
- argoCD/        → Kubernetes YAMLs: Deployment, Service, Ingress, Secrets, SealedSecret
- Dockerfile     → container build definition
- GitHub Actions workflow (in `.github/workflows/image.yaml`)
- Config files: next.config.ts, tailwind.config.js, postcss.config.mjs, tsconfig.json

##### README for additional insights
- It confirms a standard Create-Next-App setup.
- References Next.js font optimization, development (`npm run dev`), and Vercel deployment suggestions (though this setup uses Docker/K8s).

##### Architectural patterns & design principles
- Component-based UI (React + Next.js App Router)
- Separation of concerns:
Frontend (pages, components) ↔ Server (SSR, data fetching) ↔ Infrastructure (Docker + K8s)
- GitOps deployment (ArgoCD)
- Declarative manifests for infra (Ingress, Service, Deployment, Secrets)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% User-facing components
    Browser["Browser (Client)"]:::user

    %% Kubernetes Cluster
    subgraph "Kubernetes Cluster"
        direction TB
        Ingress["Ingress Controller"]:::user
        Service["Service (ClusterIP)"]:::app
        Pod["Next.js Pod"]:::app
        Sealed["SealedSecret"]:::infra
        Secret["Secret"]:::infra
    end

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

    %% CI/CD Pipeline
    subgraph "CI/CD Pipeline"
        direction TB
        GitRepo["Git Repository"]:::infra
        GitHub["GitHub Actions"]:::infra
        Registry["Container Registry"]:::infra
        ArgoCD["ArgoCD"]:::infra
        K8sAPI["Kubernetes API"]:::infra
    end

    %% Source code structure
    subgraph "Source Code Repository"
        direction TB
        NextAppRouter["Next.js App Router"]:::code
        GlobalStyles["Global Styles"]:::code
        RootLayout["Root Layout"]:::code
        HomePage["Home Page"]:::code
        NewsListPage["News List Page"]:::code
        NewsDetailPage["News Detail Page"]:::code
        LicensePage["License Page"]:::code
        RobotsTXT["Robots TXT"]:::code
        SitemapGen["Sitemap Generation"]:::code
        SourcePage["Source Page"]:::code
        NotFound["Not-Found Fallback"]:::code
        UIComponentsDir["UI Components Dir"]:::code
        ProgressBarCtx["Progress Bar Context"]:::code
        ButtonComp["Button Component"]:::code
        CardComp["Card Component"]:::code
        HeaderComp["Header Component"]:::code
        FooterComp["Footer Component"]:::code
        NewsListComp["NewsList Component"]:::code
        Utils["Shared Utilities"]:::code
        APIClient["API Client"]:::code
        DockerfileNode["Docker Build Definition"]:::code
        WorkflowNode["GitHub Actions CI Workflow"]:::code
        ArgoCDDeployment["ArgoCD Deployment Manifest"]:::code
        ArgoCDService["ArgoCD Service Manifest"]:::code
        ArgoCDIngress["ArgoCD Ingress Manifest"]:::code
        ArgoCDSecret["ArgoCD Secret Manifest"]:::code
        ArgoCDSealed["ArgoCD SealedSecret Manifest"]:::code
        NextConfig["Next.js Configuration"]:::code
        TailwindConfig["Tailwind CSS Configuration"]:::code
        PostCSSConfig["PostCSS Configuration"]:::code
        TSConfig["TypeScript Configuration"]:::code
    end

    %% Connections: Browser to App
    Browser -->|"HTTPS request"| Ingress
    Ingress -->|"routes to"| Service
    Service -->|"forwards to"| Pod
    Pod -->|"fetches data"| ExternalAPI

    %% Secrets flow
    GitRepo -->|"contains sealed secret manifest"| Sealed
    Sealed -->|"unsealed to"| Secret
    Secret -->|"injected into"| Pod

    %% CI/CD flow
    GitRepo -->|"source code"| GitHub
    GitHub -->|"builds Docker image"| Registry
    Registry -->|"image updates"| ArgoCD
    ArgoCD -->|"applies manifests via"| K8sAPI
    K8sAPI -->|"deploys to"| Ingress

    %% Repo to CI
    GitRepo --> GitHub

    %% Legend
    subgraph Legend
        direction TB
        U["User-facing"]:::user
        A["Application"]:::app
        I["Infrastructure/CI-CD"]:::infra
        E["External"]:::external
        C["Code"]:::code
    end

    %% Click Events
    click NextAppRouter "https://github.com/ayane0857/ayane-utau-site/tree/main/app/"
    click GlobalStyles "https://github.com/ayane0857/ayane-utau-site/blob/main/app/globals.css"
    click RootLayout "https://github.com/ayane0857/ayane-utau-site/blob/main/app/layout.tsx"
    click HomePage "https://github.com/ayane0857/ayane-utau-site/blob/main/app/page.tsx"
    click NewsListPage "https://github.com/ayane0857/ayane-utau-site/blob/main/app/news/page.tsx"
    click NewsDetailPage "https://github.com/ayane0857/ayane-utau-site/blob/main/app/news/[id]/page.tsx"
    click LicensePage "https://github.com/ayane0857/ayane-utau-site/blob/main/app/license/page.tsx"
    click RobotsTXT "https://github.com/ayane0857/ayane-utau-site/blob/main/app/rebots.ts"
    click SitemapGen "https://github.com/ayane0857/ayane-utau-site/blob/main/app/sitemap.ts"
    click SourcePage "https://github.com/ayane0857/ayane-utau-site/blob/main/app/source/page.tsx"
    click NotFound "https://github.com/ayane0857/ayane-utau-site/blob/main/app/not-found.tsx"
    click UIComponentsDir "https://github.com/ayane0857/ayane-utau-site/tree/main/components/ui/"
    click ProgressBarCtx "https://github.com/ayane0857/ayane-utau-site/blob/main/components/ui/ProgressBarProvider.tsx"
    click ButtonComp "https://github.com/ayane0857/ayane-utau-site/blob/main/components/ui/button.tsx"
    click CardComp "https://github.com/ayane0857/ayane-utau-site/blob/main/components/ui/card.tsx"
    click HeaderComp "https://github.com/ayane0857/ayane-utau-site/blob/main/components/ui/header.tsx"
    click FooterComp "https://github.com/ayane0857/ayane-utau-site/blob/main/components/ui/footer.tsx"
    click NewsListComp "https://github.com/ayane0857/ayane-utau-site/blob/main/components/newslist.tsx"
    click Utils "https://github.com/ayane0857/ayane-utau-site/blob/main/lib/utils.ts"
    click APIClient "https://github.com/ayane0857/ayane-utau-site/blob/main/lib/client.js"
    click DockerfileNode "https://github.com/ayane0857/ayane-utau-site/tree/main/Dockerfile"
    click WorkflowNode "https://github.com/ayane0857/ayane-utau-site/blob/main/.github/workflows/image.yaml"
    click ArgoCDDeployment "https://github.com/ayane0857/ayane-utau-site/blob/main/argoCD/deployment.yaml"
    click ArgoCDService "https://github.com/ayane0857/ayane-utau-site/blob/main/argoCD/service.yaml"
    click ArgoCDIngress "https://github.com/ayane0857/ayane-utau-site/blob/main/argoCD/ingress.yaml"
    click ArgoCDSecret "https://github.com/ayane0857/ayane-utau-site/blob/main/argoCD/secret.yaml"
    click ArgoCDSealed "https://github.com/ayane0857/ayane-utau-site/blob/main/argoCD/sealedsecret.yaml"
    click NextConfig "https://github.com/ayane0857/ayane-utau-site/blob/main/next.config.ts"
    click TailwindConfig "https://github.com/ayane0857/ayane-utau-site/blob/main/tailwind.config.js"
    click PostCSSConfig "https://github.com/ayane0857/ayane-utau-site/blob/main/postcss.config.mjs"
    click TSConfig "https://github.com/ayane0857/ayane-utau-site/blob/main/tsconfig.json"

    %% Styles
    classDef user fill:#a2fca2,stroke:#333,stroke-width:1px
    classDef app fill:#a2d1f9,stroke:#333,stroke-width:1px
    classDef infra fill:#f9d76e,stroke:#333,stroke-width:1px
    classDef external fill:#d3d3d3,stroke:#333,stroke-width:1px
    classDef code fill:#e8e8e8,stroke:#333,stroke-width:1px
```
