# raychang/fuelog architecture

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

- Interactive diagram: https://gitdiagram.com/raychang/fuelog
- Repository: https://github.com/raychang/fuelog

## Overview

##### Project type and purpose
- This is a Turborepo‐based monorepo. It hosts:
- One Next.js application (“web”) under apps/web
- A shared React UI component library (@repo/ui)
- Two shared configuration packages: ESLint configs and TypeScript configs
- Purpose: provide a boilerplate starter with centralized code sharing, linting/formatting, type checking, and high-performance builds via Turborepo.

##### File structure
- Top-level:
- .github: CI workflows, custom chat modes, instructions
- apps/web: Next.js TypeScript app, with app/ folder, CSS, fonts, public assets, config files (next.config.ts, tsconfig.json, eslint.config.mjs)
- packages/ui: shared React components (button, card, code), its own tsconfig and ESLint config
- packages/eslint-config & packages/typescript-config: sharable ESLint rules and tsconfig presets
- turbo.json & pnpm-workspace.yaml & pnpm-lock.yaml: orchestrate tasks and dependencies
- Patterns:
- Monorepo with “apps” (deployable units) vs. “packages” (libraries/configs)
- Next.js app leverages React UI library
- CI/CD configured via GitHub Actions and optional Vercel remote cache

##### README for additional insights
- Describes apps/packages, core technologies (Next.js, TypeScript, ESLint, Prettier)
- Highlights Turborepo commands (turbo dev, turbo build) and remote caching support with Vercel
- No runtime backend—Next.js handles server-side rendering and routing

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Monorepo Orchestration Layer
    subgraph "Root Configuration & Tooling"
        direction TB
        Orchestrator["Turborepo Orchestrator"]:::tool
        Workspace["pnpm Workspace & Package Manager"]:::tool
        RootPkg["package.json (root)"]:::tool
        CodeQuality["Code Quality & Editor Config"]:::tool
    end

    %% Apps and Packages
    subgraph "Applications"
        direction TB
        WebApp["apps/web (Next.js Application)"]:::app
    end

    subgraph "Shared Packages"
        direction TB
        UI["packages/ui (React UI Library)"]:::pkg
        ESLintCfg["packages/eslint-config"]:::pkg
        TSCfg["packages/typescript-config"]:::pkg
    end

    %% CI and External Services
    subgraph "CI/CD & Caching"
        direction TB
        GHActions["GitHub Actions Workflows"]:::external
        VercelCache["Vercel Remote Cache"]:::external
    end

    %% Dependencies and Flows
    Orchestrator -->|reads turbo.json| Workspace
    Workspace -->|manages| WebApp
    Workspace -->|manages| UI
    Workspace -->|manages| ESLintCfg
    Workspace -->|manages| TSCfg

    WebApp -->|depends on| UI
    WebApp -->|depends on| ESLintCfg
    WebApp -->|depends on| TSCfg

    GHActions -->|triggers turbo build/dev| Orchestrator
    Orchestrator -->|uses remote cache| VercelCache

    %% Detailed Structure of WebApp
    subgraph "apps/web (Next.js)" 
        direction TB
        WebConfig["Config Files"]:::config
        WebSrc["Source & Assets"]:::code
        WebPkgJSON["package.json"]:::config
    end
    WebConfig --> WebSrc
    WebSrc --> WebPkgJSON

    WebApp --> WebConfig
    WebApp --> WebSrc
    WebApp --> WebPkgJSON

    %% Detailed Structure of UI Library
    subgraph "packages/ui (UI Library)" 
        direction TB
        UILibConfig["Config Files"]:::config
        UIComponents["Components"]:::code
        UIPkgJSON["package.json"]:::config
    end
    UILibConfig --> UIComponents
    UIComponents --> UIPkgJSON

    UI --> UILibConfig
    UI --> UIComponents
    UI --> UIPkgJSON

    %% Detailed ESLint Config Package
    subgraph "packages/eslint-config"
        direction TB
        ESLintFiles["ESLint Rules"]:::code
        ESLintPkgJSON["package.json"]:::config
    end
    ESLintCfg --> ESLintFiles
    ESLintFiles --> ESLintPkgJSON

    %% Detailed TypeScript Config Package
    subgraph "packages/typescript-config"
        direction TB
        TSConfigFiles["TSConfig Presets"]:::code
        TSPkgJSON["package.json"]:::config
    end
    TSCfg --> TSConfigFiles
    TSConfigFiles --> TSPkgJSON

    %% Click Events
    click Orchestrator "https://github.com/raychang/fuelog/blob/main/turbo.json"
    click Workspace "https://github.com/raychang/fuelog/blob/main/pnpm-workspace.yaml"
    click Workspace "https://github.com/raychang/fuelog/blob/main/pnpm-lock.yaml"
    click RootPkg "https://github.com/raychang/fuelog/blob/main/package.json"
    click CodeQuality "https://github.com/raychang/fuelog/blob/main/.gitignore"
    click CodeQuality "https://github.com/raychang/fuelog/blob/main/.npmrc"
    click CodeQuality "https://github.com/raychang/fuelog/tree/main/.vscode/"
    click CodeQuality "https://github.com/raychang/fuelog/blob/main/CLAUDE.md"
    click CodeQuality "https://github.com/raychang/fuelog/blob/main/README.md"

    click WebApp "https://github.com/raychang/fuelog/tree/main/apps/web"
    click WebConfig "https://github.com/raychang/fuelog/blob/main/apps/web/next.config.ts"
    click WebConfig "https://github.com/raychang/fuelog/blob/main/apps/web/tsconfig.json"
    click WebConfig "https://github.com/raychang/fuelog/blob/main/apps/web/eslint.config.mjs"
    click WebConfig "https://github.com/raychang/fuelog/blob/main/apps/web/postcss.config.mjs"
    click WebSrc "https://github.com/raychang/fuelog/blob/main/apps/web/app/layout.tsx"
    click WebSrc "https://github.com/raychang/fuelog/blob/main/apps/web/app/page.tsx"
    click WebSrc "https://github.com/raychang/fuelog/blob/main/apps/web/app/globals.css"
    click WebSrc "https://github.com/raychang/fuelog/blob/main/apps/web/app/page.module.css"
    click WebSrc "https://github.com/raychang/fuelog/tree/main/apps/web/app/fonts/"
    click WebSrc "https://github.com/raychang/fuelog/tree/main/apps/web/public/"
    click WebPkgJSON "https://github.com/raychang/fuelog/blob/main/apps/web/package.json"
    click WebPkgJSON "https://github.com/raychang/fuelog/blob/main/apps/web/.gitignore"
    click WebPkgJSON "https://github.com/raychang/fuelog/blob/main/apps/web/README.md"

    click UI "https://github.com/raychang/fuelog/tree/main/packages/ui"
    click UILibConfig "https://github.com/raychang/fuelog/blob/main/packages/ui/tsconfig.json"
    click UILibConfig "https://github.com/raychang/fuelog/blob/main/packages/ui/eslint.config.mjs"
    click UIPkgJSON "https://github.com/raychang/fuelog/blob/main/packages/ui/package.json"
    click UIComponents "https://github.com/raychang/fuelog/blob/main/packages/ui/src/button.tsx"
    click UIComponents "https://github.com/raychang/fuelog/blob/main/packages/ui/src/card.tsx"
    click UIComponents "https://github.com/raychang/fuelog/blob/main/packages/ui/src/code.tsx"

    click ESLintCfg "https://github.com/raychang/fuelog/tree/main/packages/eslint-config"
    click ESLintFiles "https://github.com/raychang/fuelog/blob/main/packages/eslint-config/base.js"
    click ESLintFiles "https://github.com/raychang/fuelog/blob/main/packages/eslint-config/next.js"
    click ESLintFiles "https://github.com/raychang/fuelog/blob/main/packages/eslint-config/react-internal.js"
    click ESLintPkgJSON "https://github.com/raychang/fuelog/blob/main/packages/eslint-config/package.json"

    click TSCfg "https://github.com/raychang/fuelog/tree/main/packages/typescript-config"
    click TSConfigFiles "https://github.com/raychang/fuelog/blob/main/packages/typescript-config/base.json"
    click TSConfigFiles "https://github.com/raychang/fuelog/blob/main/packages/typescript-config/nextjs.json"
    click TSConfigFiles "https://github.com/raychang/fuelog/blob/main/packages/typescript-config/react-library.json"
    click TSPkgJSON "https://github.com/raychang/fuelog/blob/main/packages/typescript-config/package.json"

    click GHActions "https://github.com/raychang/fuelog/blob/main/.github/workflows/claude.yml"
    click GHActions "https://github.com/raychang/fuelog/blob/main/.github/chatmodes/*.chatmode.md"
    click GHActions "https://github.com/raychang/fuelog/blob/main/.github/instructions/*.md"
    click GHActions "https://github.com/raychang/fuelog/blob/main/.github/prompts/*.prompt.md"

    %% Styles
    classDef app fill:#cce5ff,stroke:#004085,color:#004085
    classDef pkg fill:#d4edda,stroke:#155724,color:#155724
    classDef tool fill:#e2e3e5,stroke:#6c757d,color:#6c757d
    classDef external fill:#fff3cd,stroke:#856404,color:#856404
    classDef config fill:#f8d7da,stroke:#721c24,color:#721c24
    classDef code fill:#d1ecf1,stroke:#0c5460,color:#0c5460
```
