# jibedoubleve/lanceur-bis architecture

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

- Interactive diagram: https://gitdiagram.com/jibedoubleve/lanceur-bis
- Repository: https://github.com/jibedoubleve/lanceur-bis

## Overview

##### Project Type and Purpose
- Lanceur Bis is a .NET-based, lightweight application launcher that enables users to quickly start applications, open files, or navigate to web pages using customizable shortcuts. It’s inspired by similar launchers like SlickRun, Wox, and Flow Launcher.
- The README emphasizes its ease-of-use and customization, while the file structure clearly separates the application into multiple layers (infrastructure, core business logic, shared utilities, UI, and external libraries).

##### High-Level Components
- UI Layer:
– Found under the “src/UI” directory, which includes both “Lanceur.Ui.Core” (likely the MVVM or core UI logic) and “Lanceur.Ui.WPF” (the Windows Presentation Foundation user interface). These components manage user interaction, views, converters, and control logic.
- Core Layer:
– Under “src/Lanceur.Core”. This contains the business logic, models, services, managers, repositories’ interfaces, and execution/request handling. It is where the main logic for interpreting user input and orchestrating actions is implemented.
- Infrastructure Layer:
– Although there are multiple “Infra” directories (“src/Infra/Lanceur.Infra”, “Lanceur.Infra.SQLite”, and “Lanceur.Infra.Win32”), these modules deal with data access, platform-specific functionalities, repository implementations, and additional support for features like macros and Lua scripting.
- Shared Kernel:
– “src/Lanceur.SharedKernel” holds cross-cutting concerns like caching, logging, dependency injection extensions, utility classes, and helper methods that support other parts of the system.
- External Libraries and Scripts:
– “src/Libraries” includes wrappers and tools (for Everything search API, SQLite updater, system-level bookmarks), which integrate with or extend the system’s functionalities.
– “src/Lanceur.Scripts” holds SQL scripts and related tools that probably manage database schema updates or seed data.
- Tests:
– The “src/Tests” directory is well-organized into unit, integration, and functional tests for various components of the system. This layer reinforces the architectural boundaries by ensuring that dependencies and services work as expected.

##### Interactions and Data Flow
- The UI (WPF views and ViewModels) collects and processes user inputs (like a typed shortcut) and sends these triggers to the Core layer.
- The Core layer receives these commands and, through orchestrated services and managers, determines how to process them. For instance, it might interact with macros, command-line managers, and then call appropriate services.
- Core services then call the Infrastructure layer to perform actions such as accessing or updating the database (using SQLite in this case) or interfacing with the operating system (via Win32-related services) to launch applications.
- The Shared Kernel provides logging, caching, and dependency injection support throughout all layers.
- External libraries (like Everything.Wrapper and System.Web.Bookmarks) provide additional integration points if the launcher needs to search for files/web bookmarks quickly.
- Tests validate the interactions between these layers and help maintain the overall system integrity.

##### Architectural Patterns and Design Principles
- Separation of Concerns: Each module (UI, Core, Infra, SharedKernel) is clearly separated.
- Dependency Injection: With multiple “Extensions/ServiceCollectionExtensions” found in several modules, the system is designed to leverage DI for loose coupling.
- MVVM Pattern: The WPF UI is likely using MVVM (given the presence of ViewModels, converters, and XAML files) to separate presentation from business logic.
- Repository Pattern: The presence of “Repositories” and “IDbConnectionFactory/Manager” classes points to the use of repository patterns for data access.
- Modularization: The project is broken into several projects (solution file “Lanceur.sln” groups various libraries, tests, and UI projects) to keep responsibilities distinct.

##### Final Checklist
– Include clear, labeled blocks for UX/UI, Business Logic (Core), Data Access (Infra), Utility/Shared Components, and External Integrations.
– Annotate with notes where important design patterns (such as MVVM, repository, or DI) are applied.

## Diagram (Mermaid)

```mermaid
flowchart TD

    %% UI Layer
    subgraph "UI Layer"
        UI_Core("Lanceur.Ui.Core"):::ui
        UI_WPF("Lanceur.Ui.WPF"):::ui
    end

    %% Core Layer
    subgraph "Core Layer"
        Core("Lanceur.Core"):::core
    end

    %% Infrastructure Layer
    subgraph "Infrastructure Layer"
        Infra("Lanceur.Infra"):::infra
        Infra_SQLite("Lanceur.Infra.SQLite"):::infra
        Infra_Win32("Lanceur.Infra.Win32"):::infra
    end

    %% Shared Kernel
    subgraph "Shared Kernel"
        Shared("Lanceur.SharedKernel"):::shared
    end

    %% External Integration
    subgraph "External Integration"
        ExtLib("External Libraries"):::ext
        ExtScr("Lanceur.Scripts"):::ext
    end

    %% Tests
    subgraph "Tests"
        Tests("Tests"):::tests
    end

    %% Data Flows
    UI_Core -->|"userAction"| Core
    UI_WPF -->|"userAction"| Core

    Core -->|"calls"| Infra
    Core -->|"calls"| Infra_SQLite
    Core -->|"calls"| Infra_Win32
    Core -->|"uses"| Shared

    Infra -->|"integrates"| ExtLib
    Core -->|"orchestrates"| ExtScr

    Tests -->|"tests"| UI_Core
    Tests -->|"tests"| UI_WPF
    Tests -->|"tests"| Core
    Tests -->|"tests"| Infra
    Tests -->|"tests"| Shared
    Tests -->|"tests"| ExtLib

    %% Click Events
    click UI_Core "https://github.com/jibedoubleve/lanceur-bis/blob/master/src/UI/Lanceur.Ui.Core"
    click UI_WPF "https://github.com/jibedoubleve/lanceur-bis/blob/master/src/UI/Lanceur.Ui.WPF"
    click Core "https://github.com/jibedoubleve/lanceur-bis/blob/master/src/Lanceur.Core"
    click Infra "https://github.com/jibedoubleve/lanceur-bis/blob/master/src/Infra/Lanceur.Infra"
    click Infra_SQLite "https://github.com/jibedoubleve/lanceur-bis/blob/master/src/Infra/Lanceur.Infra.SQLite"
    click Infra_Win32 "https://github.com/jibedoubleve/lanceur-bis/blob/master/src/Infra/Lanceur.Infra.Win32"
    click Shared "https://github.com/jibedoubleve/lanceur-bis/blob/master/src/Lanceur.SharedKernel"
    click ExtLib "https://github.com/jibedoubleve/lanceur-bis/tree/master/src/Libraries"
    click ExtScr "https://github.com/jibedoubleve/lanceur-bis/blob/master/src/Lanceur.Scripts"
    click Tests "https://github.com/jibedoubleve/lanceur-bis/tree/master/src/Tests"

    %% Styles
    classDef ui fill:#ADD8E6,stroke:#00008B,stroke-width:2px;
    classDef core fill:#90EE90,stroke:#006400,stroke-width:2px;
    classDef infra fill:#F08080,stroke:#8B0000,stroke-width:2px;
    classDef shared fill:#D3D3D3,stroke:#696969,stroke-width:2px;
    classDef ext fill:#FFFF99,stroke:#CCCC00,stroke-width:2px;
    classDef tests fill:#E0B0FF,stroke:#800080,stroke-width:2px;
```
