# sitcon-tw/2025 architecture

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

- Interactive diagram: https://gitdiagram.com/sitcon-tw/2025
- Repository: https://github.com/sitcon-tw/2025

## Overview

##### Project type and purpose
- This is a Next.js 13 “App Router” web application that serves as the conference website (SITCON-2025).
- It is primarily a front-end application with SSR/SSG pages, dynamic routes (e.g., agenda/[id], cfp/(submission)), static JSON data (staff.json, sponsors.json) and ICS calendar files in `/public`.

##### File structure
- Top-level directories:
- `app/` – Next.js App Router source: nested folders map directly to pages and layouts.
- `public/` – static assets (images, PDFs, ICS files, JSON content).
- `hooks/` & `lib/` – reusable React hooks and utility functions.
- Configuration: `next.config.mjs`, `tailwind.config.ts`, ESLint, Prettier, Husky, GitHub Actions workflows.

##### README insights
- Confirms Next.js framework, suggests deployment on Vercel.
- No external database or API: site uses static files and server-rendered React components.

##### Core components
a. Developer & Code Repo
- GitHub repository with branches
- Husky pre-commit (lint/staged checks)
- GitHub Actions (CI pipelines: `deploy.yaml`, `vercel.yaml`)
b. CI/CD & Hosting
- GitHub Actions → Vercel deployment
- Vercel Edge Network + Serverless Functions (SSR/SSG)
- CDN for static assets under `public/`
c. Next.js Application
- App Router Entry (`app/layout.tsx`, `app/page.tsx`)
- Nested layouts & pages under `app/(website)` and `app/cfp`
- Reusable UI (`app/_components`, `app/(website)/_components`)
- Dynamic route handlers (`agenda/[id]/page.tsx`, `cfp/(submission)/…`)
d. Data & Assets
- Static JSON (e.g., `/public/sponsor/sponsors.json`, `/public/staff/staff.json`)
- ICS calendar files (`.ics` under `/public`)
- Poster PDFs, images, logos served from `/public`
e. Tooling & Config
- ESLint, Prettier for code quality
- Tailwind CSS for styling
- TypeScript configuration

##### Relationships & data flow
- Developer → pushes code → GitHub
- GitHub Actions CI → runs tests/lint → on success triggers Vercel deploy
- Vercel builds Next.js → produces SSR endpoints + static assets → deploys to Edge CDN
- Browser requests a URL → served by Vercel Edge CDN (static or SSR) → Next.js SSR may read JSON from `/public`
- React renders component tree (layout → page → nested components) and returns HTML/CSS/JS to client

##### Architectural patterns & principles
- File-system routing (Next.js App Router)
- Hybrid SSG/SSR:
- SSG for truly static content (staff, sponsors, venue pages)
- SSR or dynamic rendering for pages with parameters (`[id]`)
- Component reuse: central `_components` and hooks
- CI/CD best practices: automated linting, formatting, test gate, zero-downtime deploys on Vercel

##### Final recommendations
- Be detailed: break out CI steps, hosting, build output, and runtime.
- Separation of concerns: routing layer vs. component layer vs. data layer vs. infrastructure.
- Keep it focused: although no traditional backend service exists, highlight the SSR/SSG functions on Vercel as your “runtime.”

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer & Repository
    subgraph "Developer & Code Repo"
        direction TB
        Dev["Developer"]:::dev
        Repo["GitHub Repository"]:::repo
        Husky["Husky Pre-commit Hook"]:::tool
        CIWorkflow["GitHub Actions Workflows"]:::tool
    end

    %% CI/CD & Hosting
    subgraph "CI/CD & Hosting"
        direction TB
        NextConfig["next.config.mjs"]:::config
        TailwindConfig["tailwind.config.ts"]:::config
        ESLint[".eslintrc.json"]:::config
        Prettier["prettier.config.mjs"]:::config
        ActionsCI["GitHub Actions CI"]:::ci
        Vercel["Vercel Edge + Serverless"]:::infra
    end

    %% Application
    subgraph "Next.js Application (App Router)"
        direction TB
        Layout["app/layout.tsx"]:::app
        Globals["app/globals.css"]:::app
        subgraph "Website Pages"
            direction TB
            SiteLayout["app/(website)/layout.tsx"]:::app
            Home["app/(website)/(home)/page.tsx"]:::page
            PagesLayout["app/(website)/(pages)/layout.tsx"]:::app
            AgendaIndex["app/(website)/(pages)/agenda/page.tsx"]:::page
            AgendaLayout["app/(website)/(pages)/agenda/layout.tsx"]:::app
            AgendaDetails["app/(website)/(pages)/agenda/[id]/page.tsx"]:::page
            Events["app/(website)/(pages)/events/page.tsx"]:::page
            PosterPage["app/(website)/(pages)/poster/page.tsx"]:::page
            PosterData["app/(website)/(pages)/poster/posterData.ts"]:::data
            SponsorPage["app/(website)/(pages)/sponsor/page.tsx"]:::page
            SponsorsJSON["app/(website)/(pages)/sponsor/sponsors.json"]:::data
            StaffPage["app/(website)/(pages)/staff/page.tsx"]:::page
            StaffJSON["app/(website)/(pages)/staff/staff.json"]:::data
            Tickets["app/(website)/(pages)/tickets/page.tsx"]:::page
            Traffic["app/(website)/(pages)/traffic/page.tsx"]:::page
            VenuePage["app/(website)/(pages)/venue/page.tsx"]:::page
            VenueData["app/(website)/(pages)/venue/venueData.ts"]:::data
        end
        subgraph "CFP Section"
            direction TB
            CFPLayout["app/cfp/layout.tsx"]:::app
            CFPPage["app/cfp/page.tsx"]:::page
            subgraph "Submission Flow"
                direction TB
                SubLayout["app/cfp/(submission)/layout.tsx"]:::app
                NormalSub["app/cfp/(submission)/normal/page.tsx"]:::page
                PosterSub["app/cfp/(submission)/poster/page.tsx"]:::page
                UndefSub["app/cfp/(submission)/undefined/page.tsx"]:::page
            end
        end
        subgraph "Shared Components & Hooks"
            direction TB
            AppComponents["app/_components/"]:::component
            WebsiteComponents["app/(website)/_components/"]:::component
            CFPComponents["app/cfp/_components/"]:::component
            Hooks["hooks/"]:::component
            Lib["lib/"]:::component
        end
    end

    %% Static Data & Assets
    subgraph "Static Assets & Data (CDN)"
        direction TB
        CFPICS["/public/cfp/deadline.ics"]:::data
        TicketICS["/public/website/ticket_dates.ics"]:::data
        PosterPDFs["/public/poster/*.pdf"]:::data
        PublicAssets["/public/assets/"]:::data
        PublicImages["/public/image/"]:::data
    end

    %% Browser Interaction
    Browser["Browser"]:::client

    %% Connections
    Dev -->|push code| Repo
    Repo -->|pre-commit lint| Husky
    Repo -->|CI triggered| ActionsCI
    ActionsCI -->|build & deploy| Vercel
    Vercel -->|serves| Browser
    Browser -->|requests| Vercel
    Vercel -->|reads JSON/ICS| StaticAssets & Data
    Vercel -->|executes SSR/SSG| Layout
    Layout --> Globals
    Layout --> SiteLayout
    SiteLayout --> PagesLayout
    PagesLayout --> AgendaIndex
    AgendaIndex --> AgendaDetails
    SiteLayout --> Events
    SiteLayout --> PosterPage
    SiteLayout --> SponsorPage
    SiteLayout --> StaffPage
    SiteLayout --> Tickets
    SiteLayout --> Traffic
    SiteLayout --> VenuePage
    CFPLayout --> CFPPage
    CFPPage --> SubLayout
    SubLayout --> NormalSub
    SubLayout --> PosterSub
    SubLayout --> UndefSub
    Layout --> AppComponents
    SiteLayout --> WebsiteComponents
    CFPLayout --> CFPComponents
    Layout --> Hooks
    Layout --> Lib

    %% Click Events
    click Repo "https://github.com/sitcon-tw/2025/tree/main//"
    click Husky "https://github.com/sitcon-tw/2025/tree/main//.husky/pre-commit"
    click CIWorkflow "https://github.com/sitcon-tw/2025/blob/main//.github/workflows/deploy.yaml"
    click CIWorkflow "https://github.com/sitcon-tw/2025/blob/main//.github/workflows/vercel.yaml"
    click NextConfig "https://github.com/sitcon-tw/2025/blob/main//next.config.mjs"
    click TailwindConfig "https://github.com/sitcon-tw/2025/blob/main//tailwind.config.ts"
    click ESLint "https://github.com/sitcon-tw/2025/blob/main//.eslintrc.json"
    click Prettier "https://github.com/sitcon-tw/2025/blob/main//prettier.config.mjs"
    click Layout "https://github.com/sitcon-tw/2025/blob/main//app/layout.tsx"
    click Globals "https://github.com/sitcon-tw/2025/blob/main//app/globals.css"
    click SiteLayout "https://github.com/sitcon-tw/2025/blob/main//app/(website)/layout.tsx"
    click Home "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(home)/page.tsx"
    click PagesLayout "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/layout.tsx"
    click AgendaIndex "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/agenda/page.tsx"
    click AgendaLayout "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/agenda/layout.tsx"
    click AgendaDetails "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/agenda/[id]/page.tsx"
    click Events "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/events/page.tsx"
    click PosterPage "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/poster/page.tsx"
    click PosterData "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/poster/posterData.ts"
    click SponsorPage "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/sponsor/page.tsx"
    click SponsorsJSON "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/sponsor/sponsors.json"
    click StaffPage "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/staff/page.tsx"
    click StaffJSON "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/staff/staff.json"
    click Tickets "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/tickets/page.tsx"
    click Traffic "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/traffic/page.tsx"
    click VenuePage "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/venue/page.tsx"
    click VenueData "https://github.com/sitcon-tw/2025/blob/main//app/(website)/(pages)/venue/venueData.ts"
    click CFPLayout "https://github.com/sitcon-tw/2025/blob/main//app/cfp/layout.tsx"
    click CFPPage "https://github.com/sitcon-tw/2025/blob/main//app/cfp/page.tsx"
    click SubLayout "https://github.com/sitcon-tw/2025/blob/main//app/cfp/(submission)/layout.tsx"
    click NormalSub "https://github.com/sitcon-tw/2025/blob/main//app/cfp/(submission)/normal/page.tsx"
    click PosterSub "https://github.com/sitcon-tw/2025/blob/main//app/cfp/(submission)/poster/page.tsx"
    click UndefSub "https://github.com/sitcon-tw/2025/blob/main//app/cfp/(submission)/undefined/page.tsx"
    click AppComponents "https://github.com/sitcon-tw/2025/tree/main//app/_components/"
    click WebsiteComponents "https://github.com/sitcon-tw/2025/tree/main//app/(website)/_components/"
    click CFPComponents "https://github.com/sitcon-tw/2025/tree/main//app/cfp/_components/"
    click Hooks "https://github.com/sitcon-tw/2025/tree/main//hooks/"
    click Lib "https://github.com/sitcon-tw/2025/tree/main//lib/"
    click CFPICS "https://github.com/sitcon-tw/2025/blob/main//public/cfp/deadline.ics"
    click TicketICS "https://github.com/sitcon-tw/2025/blob/main//public/website/ticket_dates.ics"
    click PosterPDFs "https://github.com/sitcon-tw/2025/blob/main//public/poster/*.pdf"
    click PublicAssets "https://github.com/sitcon-tw/2025/tree/main//public/assets/"
    click PublicImages "https://github.com/sitcon-tw/2025/tree/main//public/image/"

    %% Styles
    classDef dev fill:#ffd;stroke:#333,stroke-width:1px
    classDef repo fill:#fee;stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
    classDef tool fill:#fdf6e3,stroke:#333,stroke-width:1px
    classDef ci fill:#def,stroke:#333,stroke-width:1px
    classDef infra fill:#cdf,stroke:#333,stroke-width:1px
    classDef config fill:#fdd,stroke:#333,stroke-width:1px
    classDef app fill:#ddf,stroke:#333,stroke-width:1px
    classDef page fill:#dfd,stroke:#333,stroke-width:1px
    classDef component fill:#ffd,stroke:#333,stroke-width:1px
    classDef data fill:#fde,stroke:#333,stroke-width:1px
    classDef client fill:#efe,stroke:#333,stroke-width:1px
```
