# oblique-bit/oblique architecture

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

- Interactive diagram: https://gitdiagram.com/oblique-bit/oblique
- Repository: https://github.com/oblique-bit/oblique

## Overview

- CLI
- Design System
- Oblique (the core library)
- Sandbox (and Sandbox SSR for server‐side rendering demos)
- SDS (likely a separate design system sample or component library)
- Service Navigation Web Component

##### Main Components and Their Roles
- CLI: Provides command-line library features (with its own source code, tests, and release scripts). Indicate that it is an executable tool layered on top of the shared libraries.
- Design System: Contains reusable UI components, demo components, and styling files. It may represent the core UI library that is consumed by demo apps.
- Oblique Core Library: This is a large package with numerous sub-folders (e.g., “src/lib/…”). It exposes components, directives, pipes, and utilities. It might also implement various Angular modules.
- Sandbox & Sandbox SSR: These are demonstration/demonstrative implementations that likely act as a testing ground or a live sample for the libraries; one is traditional while the SSR version is for server-side rendering.
- SDS: Another package likely containing either additional or alternate design system implementations (with its own schematics and build configuration).
- Service Navigation Web Component: A self-contained Angular-based web component to provide service navigation features, possibly intended for integration into other systems.
- Additional shared scripts, configuration (e.g., Jenkinsfile, GitHub workflows, linting, formatting) that support the build and CI/CD processes.

##### Dependencies and Interactions
– The CLI may depend on the Oblique core library and shared utilities.
– The Sandbox, Sandbox SSR, and SDS packages are likely consumer/demo applications that use components from both the Design System and the Oblique Core Library.
– The Service Navigation Web Component is a standalone component that can be integrated into external projects but also leverages similar internal utilities.
- That many packages share testing configurations, linting, storybook or release scripts (evidenced by similar “scripts” folders and configuration files) – optionally indicate a “Build & CI/CD Infrastructure” module that interacts with each package.

##### Architectural Patterns & Design Principles
- Separation of concerns: core libraries (Oblique, Design System) are distinct from demonstration applications (Sandbox, Sandbox SSR) and from tooling (CLI).
- Modularity: Each package has its own build configuration (e.g., separate tsconfig files, Dockerfiles, eslint/jest configurations) even though they all reside in a single repository.
- The use of schematics (notably in the Oblique and SDS packages) indicates a design for ease of integration and extensibility – you could mark an “Extension / Schematics” area.
- Many packages have corresponding Dockerfiles and CI configurations (Jenkinsfile, GitHub workflows) illustrating a robust automated build/test & deployment pipeline. Indicate a “DevOps/CI/CD” layer that hooks into these modules.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Oblique Monorepo Container
    subgraph "Oblique Monorepo"
        CLI["CLI"]:::library
        DesignSys["Design System"]:::library
        Oblique["Oblique Core Library"]:::library
        Sandbox["Sandbox"]:::demo
        SandboxSSR["Sandbox SSR"]:::demo
        SDS["SDS"]:::demo
        ServiceNav["Service Navigation Web Component"]:::component
        StylesBuilder["StylesBuilder"]:::tool
    end

    %% Common Infrastructure / DevOps & CI/CD
    CI_CD["DevOps/CI/CD (Common Infrastructure)"]:::infrastructure

    %% Dependency Relationships
    CLI -->|"uses"| Oblique
    Sandbox -->|"consumes"| Oblique
    Sandbox -->|"consumes"| DesignSys
    SandboxSSR -->|"consumes"| Oblique
    SandboxSSR -->|"consumes"| DesignSys
    SDS -->|"consumes"| DesignSys
    SDS -->|"consumes"| Oblique
    ServiceNav -->|"integrates"| Oblique
    ServiceNav -->|"leverages"| DesignSys

    %% All modules interface with CI/CD
    CI_CD --- CLI
    CI_CD --- DesignSys
    CI_CD --- Oblique
    CI_CD --- Sandbox
    CI_CD --- SandboxSSR
    CI_CD --- SDS
    CI_CD --- ServiceNav
    CI_CD --- StylesBuilder

    %% Styles for Different Component Types
    classDef library fill:#b3cde0,stroke:#03396c,stroke-width:2px;
    classDef demo fill:#ccebc5,stroke:#2b542c,stroke-width:2px;
    classDef component fill:#fbb4ae,stroke:#990000,stroke-width:2px;
    classDef tool fill:#decbe4,stroke:#6a3d9a,stroke-width:2px;
    classDef infrastructure fill:#fed9a6,stroke:#d95f02,stroke-width:2px,stroke-dasharray: 5 5;

    %% Click Events for Mapped Components
    click CLI "https://github.com/oblique-bit/oblique/tree/master/projects/cli"
    click DesignSys "https://github.com/oblique-bit/oblique/tree/master/projects/design-system"
    click Oblique "https://github.com/oblique-bit/oblique/tree/master/projects/oblique"
    click Sandbox "https://github.com/oblique-bit/oblique/tree/master/projects/sandbox"
    click SandboxSSR "https://github.com/oblique-bit/oblique/tree/master/projects/sandbox-ssr"
    click SDS "https://github.com/oblique-bit/oblique/tree/master/projects/sds"
    click ServiceNav "https://github.com/oblique-bit/oblique/tree/master/projects/service-navigation-web-component"
    click StylesBuilder "https://github.com/oblique-bit/oblique/tree/master/projects/stylesBuilder"
```
