# egurapha/shunpo architecture

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

- Interactive diagram: https://gitdiagram.com/egurapha/shunpo
- Repository: https://github.com/egurapha/shunpo

## Overview

##### Main Components Identification
The system can be broken down into these primary components:

a) Core Navigation System
b) Bookmark Management System
c) User Interface Layer
d) Testing Framework

##### Technical Details

Specific implementation details:
- Bash environment requirements (3.2+)
- Installation/uninstallation hooks
- GitHub Actions integration points
- Test framework integration (Bats)

##### Additional Elements

Specific items:
- Version compatibility notes
- Installation flow
- Test coverage paths

For this specific project, focus on showing how the commands flow through the system, from user input to file system operations, as this is the core functionality of a navigation tool.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User Interface Layer"
        UI_CMD["Command Interface"]
        SB["sb - Set Bookmark"]
        SG["sg - Go to Bookmark"]
        SL["sl - List Bookmarks"]
        SC["sc - Clear Bookmarks"]
        SR["sr - Remove Bookmark"]
        SP["sp - Jump to Parent"]
        SD["sd - Jump to Child"]
    end

    subgraph "Core Functionality Layer"
        subgraph "Bookmark Manager"
            ADD["Add Bookmark"]
            REM["Remove Bookmark"]
            LIST["List Bookmarks"]
            CLEAR["Clear Bookmarks"]
            GOTO["Go to Bookmark"]
        end

        subgraph "Navigation Manager"
            PARENT["Parent Navigation"]
            CHILD["Child Navigation"]
        end
    end

    subgraph "Utility Layer"
        COLORS["Color Handling"]
        FUNCS["Common Functions"]
    end

    subgraph "Testing Framework"
        BATS["Bats Framework"]
        TEST_BM["Bookmark Tests"]
        TEST_NAV["Navigation Tests"]
        TEST_COMMON["Common Test Utils"]
    end

    subgraph "CI/CD"
        GH_FORMAT["Code Formatting"]
        GH_TEST["Unit Testing"]
    end

    subgraph "System Management"
        INSTALL["Installation Script"]
        UNINSTALL["Uninstallation Script"]
    end

    %% Relationships
    UI_CMD --> SB & SG & SL & SC & SR & SP & SD
    SB --> ADD
    SG --> GOTO
    SL --> LIST
    SC --> CLEAR
    SR --> REM
    SP --> PARENT
    SD --> CHILD

    ADD & REM & LIST & CLEAR & GOTO --> FUNCS
    PARENT & CHILD --> FUNCS
    ADD & REM & LIST & CLEAR & GOTO & PARENT & CHILD --> COLORS

    BATS --> TEST_BM & TEST_NAV
    TEST_BM & TEST_NAV --> TEST_COMMON

    %% Click events
    click ADD "https://github.com/egurapha/Shunpo/blob/main/src/add_bookmark.sh"
    click REM "https://github.com/egurapha/Shunpo/blob/main/src/remove_bookmark.sh"
    click LIST "https://github.com/egurapha/Shunpo/blob/main/src/list_bookmarks.sh"
    click CLEAR "https://github.com/egurapha/Shunpo/blob/main/src/clear_bookmarks.sh"
    click GOTO "https://github.com/egurapha/Shunpo/blob/main/src/go_to_bookmark.sh"
    click PARENT "https://github.com/egurapha/Shunpo/blob/main/src/jump_to_parent.sh"
    click CHILD "https://github.com/egurapha/Shunpo/blob/main/src/jump_to_child.sh"
    click COLORS "https://github.com/egurapha/Shunpo/blob/main/src/colors.sh"
    click FUNCS "https://github.com/egurapha/Shunpo/blob/main/src/functions.sh"
    click BATS "https://github.com/egurapha/Shunpo/tree/main/tests/bats"
    click TEST_BM "https://github.com/egurapha/Shunpo/blob/main/tests/test_bookmarks.bats"
    click TEST_NAV "https://github.com/egurapha/Shunpo/blob/main/tests/test_navigation.bats"
    click TEST_COMMON "https://github.com/egurapha/Shunpo/blob/main/tests/common.sh"
    click GH_FORMAT "https://github.com/egurapha/Shunpo/blob/main/.github/workflows/code_formatting.yml"
    click GH_TEST "https://github.com/egurapha/Shunpo/blob/main/.github/workflows/unit_testing.yml"
    click INSTALL "https://github.com/egurapha/Shunpo/blob/main/install.sh"
    click UNINSTALL "https://github.com/egurapha/Shunpo/blob/main/uninstall.sh"

    %% Styling
    classDef ui fill:#a8d1f0
    classDef bookmarks fill:#90EE90
    classDef navigation fill:#FFB347
    classDef utility fill:#D3D3D3
    classDef testing fill:#DDA0DD
    classDef cicd fill:#F0E68C
    classDef system fill:#E6E6FA

    class UI_CMD,SB,SG,SL,SC,SR,SP,SD ui
    class ADD,REM,LIST,CLEAR,GOTO bookmarks
    class PARENT,CHILD navigation
    class COLORS,FUNCS utility
    class BATS,TEST_BM,TEST_NAV,TEST_COMMON testing
    class GH_FORMAT,GH_TEST cicd
    class INSTALL,UNINSTALL system
```
