# sato-seminor/seminar-website architecture

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

- Interactive diagram: https://gitdiagram.com/sato-seminor/seminar-website
- Repository: https://github.com/sato-seminor/seminar-website

## Overview

##### Project type and purpose
- Project type: A frontend-only, static Next.js website built with TypeScript, React, Tailwind CSS, and shadcn/ui.
- Purpose: Serve as the official homepage for Sato Seminar, deployed as a static site on GitHub Pages.

##### File structure
Top-level highlights:
- Configuration files: next.config.ts, tsconfig.json, postcss.config.mjs, tailwind.config.ts
- Dev tools: .devcontainer, .github/workflows/deploy.yml, Husky hooks, ESLint/Prettier configs, lint-staged
- Source code: src/app (Next.js App Router pages), src/components (shared UI pieces), src/features (feature-scoped UI + data), src/lib (utility code), src/styles

Patterns & choices:
- App Router: src/app folder for route-based pages with layout.tsx and nested routes (about, activities, selection).
- “Feature” subdirs group domain logic (UI + static data).
- “components/ui” holds atomic UI components; “components/layout” holds global UI (navigation, theme toggle).
- No runtime backend or database – it’s pre-rendered static content.

##### README for additional insights
- Confirms tech stack: Next.js (App Router), TypeScript, Tailwind, shadcn/ui
- CI/CD: GitHub Actions builds and deploys to GitHub Pages
- Dev Container ensures a reproducible developer environment

##### Main components & relationships
A. Developer Environment
– VS Code (Dev Container)
– Git hooks (Husky, lint-staged), ESLint/Prettier
B. Source Code
– Next.js App (src/app, src/components, src/features, src/lib)
– Styling: Tailwind CSS, postcss
– UI Library: shadcn/ui components
C. Version Control & CI/CD
– GitHub (repo)
– GitHub Actions workflow (build → static export)
D. Hosting & Delivery
– GitHub Pages (static hosting)
– CDN (optional, GitHub Pages caching)
– End-user browsers (HTTP(S) requests)

Data flow / interactions:
1. Developer writes code in Dev Container → commits to GitHub
2. GitHub Actions triggers on push → runs lint/tests → next build → next export
3. Artifacts deployed to GitHub Pages
4. User’s browser requests HTML/CSS/JS from GitHub Pages CDN → static page render

##### Architectural patterns & principles
– Separation of concerns:
- App routes vs. shared UI vs. feature-scoped modules
– Static Site Generation (SSG): no backend, all pages pre-rendered
– Component-driven development: atomic UI in components/ui, layout in components/layout, domain features in features/*
– CI/CD best practices: automated linting, format, build, and deploy

##### Detail without over-thinking
– Capture every major folder as a sub-component (App Router, UI library, features, lib)
– Show build-time rendering step (Next.js build & export)
– Don’t forget code-quality tools in the developer flow (Husky, ESLint, Prettier, lint-staged)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Environment
    subgraph "Developer Environment" 
        DEV["Dev Container"]:::ide
        HUSKY["Husky (.husky/pre-commit)"]:::tools
        LSTAGED["lint-staged (lint-staged.config.mjs)"]:::tools
        ESLINT["ESLint (eslint.config.mjs)"]:::tools
        PRETTIER["Prettier (prettier.config.mjs)"]:::tools
    end

    %% Source Code
    subgraph "Source Code"
        subgraph "Next.js App (src/app)"
            LAYOUT["layout.tsx"]:::code
            PAGE["page.tsx"]:::code
            ABOUTPAGE["about/page.tsx"]:::code
            ACTPAGE["activities/page.tsx"]:::code
            SELPAGE["selection/page.tsx"]:::code
        end
        subgraph "Components"
            subgraph "UI (src/components/ui)"
                BTN["button.tsx"]:::code
                AC["accordion.tsx"]:::code
                DM["dropdown-menu.tsx"]:::code
                NM["navigation-menu.tsx"]:::code
            end
            subgraph "Layout (src/components/layout)"
                NAV["navigation.tsx"]:::code
                TOGGLE["mode-toggle.tsx"]:::code
            end
        end
        subgraph "Features"
            subgraph "About"
                DESCABOUT["description-with-image.tsx"]:::code
            end
            subgraph "Activities"
                DESCACT["description-with-image.tsx"]:::code
            end
            subgraph "Selection"
                DESCSEL["description-section.tsx"]:::code
                QUESSEL["questions.tsx"]:::code
                DATADESC["data/description-section.ts"]:::code
                DATAQUES["data/questions.ts"]:::code
            end
        end
        LIB["cn.ts"]:::code
        STYLES["globals.css"]:::code
    end

    %% Configuration
    subgraph "Configuration"
        TCFG["tsconfig.json"]:::config
        NCFG["next.config.ts"]:::config
        TWC["tailwind.config.ts"]:::config
        POC["postcss.config.mjs"]:::config
    end

    %% Version Control & CI/CD
    GIT["GitHub Repo"]:::cloud
    GHA["GitHub Actions (.github/workflows/deploy.yml)"]:::cloud

    %% Build & Deploy
    BUILD["Next.js Build & Export"]:::db
    GH_PAGES["GitHub Pages CDN"]:::cloud

    %% End User
    BROWSER["Web Browser"]:::browser

    %% Flows
    DEV --> HUSKY
    DEV --> LSTAGED
    DEV --> ESLINT
    DEV --> PRETTIER
    DEV -->|"writes code"| LAYOUT
    DEV -->|"writes code"| BTN
    DEV -->|"writes code"| DESCABOUT

    DEV -->|"push code"| GIT
    GIT -->|"on push"| GHA
    GHA -->|"build & export"| BUILD
    BUILD -->|"deploy artifacts"| GH_PAGES
    BROWSER -->|"fetch static files"| GH_PAGES

    %% Click Events
    click DEV "https://github.com/sato-seminor/seminar-website/blob/main/.devcontainer/devcontainer.json"
    click HUSKY "https://github.com/sato-seminor/seminar-website/tree/main/.husky/pre-commit"
    click LSTAGED "https://github.com/sato-seminor/seminar-website/blob/main/lint-staged.config.mjs"
    click ESLINT "https://github.com/sato-seminor/seminar-website/blob/main/eslint.config.mjs"
    click PRETTIER "https://github.com/sato-seminor/seminar-website/blob/main/prettier.config.mjs"
    click GHA "https://github.com/sato-seminor/seminar-website/blob/main/.github/workflows/deploy.yml"
    click LAYOUT "https://github.com/sato-seminor/seminar-website/blob/main/src/app/layout.tsx"
    click PAGE "https://github.com/sato-seminor/seminar-website/blob/main/src/app/page.tsx"
    click ABOUTPAGE "https://github.com/sato-seminor/seminar-website/blob/main/src/app/about/page.tsx"
    click ACTPAGE "https://github.com/sato-seminor/seminar-website/blob/main/src/app/activities/page.tsx"
    click SELPAGE "https://github.com/sato-seminor/seminar-website/blob/main/src/app/selection/page.tsx"
    click BTN "https://github.com/sato-seminor/seminar-website/blob/main/src/components/ui/button.tsx"
    click AC "https://github.com/sato-seminor/seminar-website/blob/main/src/components/ui/accordion.tsx"
    click DM "https://github.com/sato-seminor/seminar-website/blob/main/src/components/ui/dropdown-menu.tsx"
    click NM "https://github.com/sato-seminor/seminar-website/blob/main/src/components/ui/navigation-menu.tsx"
    click NAV "https://github.com/sato-seminor/seminar-website/blob/main/src/components/layout/navigation.tsx"
    click TOGGLE "https://github.com/sato-seminor/seminar-website/blob/main/src/components/layout/mode-toggle.tsx"
    click DESCABOUT "https://github.com/sato-seminor/seminar-website/blob/main/src/features/about/components/description-with-image.tsx"
    click DESCACT "https://github.com/sato-seminor/seminar-website/blob/main/src/features/activities/components/description-with-image.tsx"
    click DESCSEL "https://github.com/sato-seminor/seminar-website/blob/main/src/features/selection/components/description-section.tsx"
    click QUESSEL "https://github.com/sato-seminor/seminar-website/blob/main/src/features/selection/components/questions.tsx"
    click DATADESC "https://github.com/sato-seminor/seminar-website/blob/main/src/features/selection/data/description-section.ts"
    click DATAQUES "https://github.com/sato-seminor/seminar-website/blob/main/src/features/selection/data/questions.ts"
    click LIB "https://github.com/sato-seminor/seminar-website/blob/main/src/lib/cn.ts"
    click STYLES "https://github.com/sato-seminor/seminar-website/blob/main/src/styles/globals.css"
    click TWC "https://github.com/sato-seminor/seminar-website/blob/main/tailwind.config.ts"
    click POC "https://github.com/sato-seminor/seminar-website/blob/main/postcss.config.mjs"
    click NCFG "https://github.com/sato-seminor/seminar-website/blob/main/next.config.ts"
    click TCFG "https://github.com/sato-seminor/seminar-website/blob/main/tsconfig.json"

    %% Styles
    classDef ide fill:#e6f7ff,stroke:#91d5ff;
    classDef tools fill:#fff1b8,stroke:#ffe58f;
    classDef code fill:#f4ffb8,stroke:#d3f261;
    classDef config fill:#ffd6e7,stroke:#ffadd2;
    classDef cloud fill:#f0f5ff,stroke:#adc6ff;
    classDef db fill:#e6fffb,stroke:#87e8de;
    classDef browser fill:#fff0f6,stroke:#ffadd2;
```
