# jisop/til architecture

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

- Interactive diagram: https://gitdiagram.com/jisop/til
- Repository: https://github.com/jisop/til

## Overview

##### Main Components

a) Frontend Layer:
- Gatsby Static Site Generator
- React Components (located in src/gatsby-theme-code-notes/components)
- Theme UI System (gatsby-plugin-theme-ui configurations)
- Search Functionality

b) Content Layer:
- Markdown Notes Organization
- Code Examples and Algorithms
- Technical Documentation

##### Key Architectural Elements

**User Interface Layer**

**Component Layer**

**Content Management Layer**

**Build/Deploy Layer**

##### Specific Implementation Details

a) User Interface Layer:
- Main page components (Layout, NotePage, NotesPage)
- Search functionality
- Navigation system (TagNav, Sidebar)

b) Component Layer:
- Component hierarchy
- Relationships between components (NoteList → NoteListItem)
- Theme UI integration points

c) Content Management Layer:
- Notes directory structure:
- Algorithm
- JavaScript
- React
- TypeScript
- Web
- Other categories

d) Build/Deploy Layer:
- Gatsby build process
- GitHub Actions workflow
- Static site output

##### Important Relationships to Highlight

- How the search functionality interfaces with content
- How the theme system applies across components

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph User_Interface
        Layout["Layout Component"]:::component
        NotePage["Note Page"]:::component
        NotesPage["Notes List Page"]:::component
        Nav["Navigation System"]:::component
    end

    subgraph Search_System
        SearchProvider["Search Provider"]:::search
        SearchInput["Search Input"]:::search
        SearchResults["Search Results"]:::search
        SearchIndex["Search Index"]:::search
    end

    subgraph Component_Layer
        NoteList["Note List"]:::component
        NoteListItem["Note List Item"]:::component
        TagSystem["Tag System"]:::component
        TagNav["Tag Navigation"]:::component
        Sidebar["Sidebar"]:::component
    end

    subgraph Theme_System
        ThemeConfig["Theme Configuration"]:::theme
        ColorSystem["Color System"]:::theme
        Typography["Typography"]:::theme
        ComponentStyles["Component Styles"]:::theme
    end

    subgraph Content_Layer
        Algorithm["Algorithm Notes"]:::content
        JavaScript["JavaScript Notes"]:::content
        React["React Notes"]:::content
        TypeScript["TypeScript Notes"]:::content
        Web["Web Notes"]:::content
    end

    subgraph Build_Layer
        GatsbyBuild["Gatsby Build"]:::build
        GithubActions["GitHub Actions"]:::build
        GatsbyConfig["Gatsby Config"]:::build
    end

    %% Relationships
    Layout --> NotePage
    Layout --> NotesPage
    Layout --> Nav
    Nav --> TagNav
    Nav --> Sidebar
    
    SearchProvider --> SearchInput
    SearchProvider --> SearchResults
    SearchProvider --> SearchIndex
    
    NotesPage --> NoteList
    NoteList --> NoteListItem
    NoteList --> TagSystem
    
    ThemeConfig --> ColorSystem
    ThemeConfig --> Typography
    ThemeConfig --> ComponentStyles
    
    Content_Layer --> GatsbyBuild
    GatsbyBuild --> GithubActions
    GatsbyConfig --> GatsbyBuild

    %% Click Events
    click Layout "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/components/Layout/Layout.tsx"
    click NotePage "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/components/NotePage/NotePage.tsx"
    click NotesPage "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/components/NotesPage/NotesPage.tsx"
    click TagNav "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/components/TagNav/TagNav.tsx"
    click Sidebar "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/components/Sidebar/Sidebar.tsx"
    click SearchProvider "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/components/Search/SearchProvider.tsx"
    click SearchInput "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/components/Search/SearchInput.tsx"
    click SearchResults "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/components/Search/SearchResults.tsx"
    click ThemeConfig "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/gatsby-plugin-theme-ui/index.js"
    click ColorSystem "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/gatsby-plugin-theme-ui/colors.js"
    click Typography "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/gatsby-plugin-theme-ui/text.js"
    click ComponentStyles "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/gatsby-plugin-theme-ui/components.js"
    click Algorithm "https://github.com/JiSop/TIL/tree/TIL/notes/Algorithm"
    click JavaScript "https://github.com/JiSop/TIL/tree/TIL/notes/JavaScript"
    click React "https://github.com/JiSop/TIL/tree/TIL/notes/React"
    click TypeScript "https://github.com/JiSop/TIL/tree/TIL/notes/TypeScript"
    click Web "https://github.com/JiSop/TIL/tree/TIL/notes/Web"
    click GithubActions "https://github.com/JiSop/TIL/blob/TIL/.github/workflows/main.yml"
    click GatsbyConfig "https://github.com/JiSop/TIL/blob/TIL/gatsby-config.js"
    click NoteList "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/components/NoteList/NoteList.tsx"
    click NoteListItem "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/components/NoteListItem/NoteListItem.tsx"
    click TagSystem "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/components/TagList/TagList.tsx"
    click SearchIndex "https://github.com/JiSop/TIL/blob/TIL/src/gatsby-theme-code-notes/utils/createOpenSearch.js"

    %% Styles
    classDef component fill:#3498db,stroke:#2980b9,color:white
    classDef search fill:#9b59b6,stroke:#8e44ad,color:white
    classDef theme fill:#e67e22,stroke:#d35400,color:white
    classDef content fill:#2ecc71,stroke:#27ae60,color:white
    classDef build fill:#95a5a6,stroke:#7f8c8d,color:white
```
