# felukka/bosla architecture

> Architecture diagram of the GitHub repository felukka/bosla, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/felukka/bosla
- Repository: https://github.com/felukka/bosla

## Overview

Bosla is a versioning CLI for projects, their services, and project releases linked to service versions. Users configure a database, create projects and register services, then publish and inspect releases; project and service commands also support listing, updates, deletion, search, and metadata management. The CLI initializes a shared database connection, wraps command handlers with query access, and formats results as tables or JSON. The graph preserves documented command capabilities, but some command implementations and database wiring were not excerpted, so their specific call relationships are omitted.

Main entry points: [`internal/database`](https://github.com/felukka/bosla/tree/main/internal/database) (Database queries), [`cmd/bosla/main.go`](https://github.com/felukka/bosla/blob/main/cmd/bosla/main.go) (CLI entry point), [`internal/commands/project`](https://github.com/felukka/bosla/tree/main/internal/commands/project) (Project commands), [`internal/commands/service`](https://github.com/felukka/bosla/tree/main/internal/commands/service) (Service commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and configuration"]
  node_entry["CLI entry point<br/>[main.go]"]
  node_configure["Database configuration"]
end

subgraph group_projects["Project management"]
  node_project["Project commands"]
  node_projectmeta["Project metadata"]
end

subgraph group_services["Service management"]
  node_service["Service commands"]
  node_servicemeta["Service metadata"]
end

subgraph group_releases["Release management"]
  node_release["Release commands"]
end

subgraph group_core["Shared runtime and data"]
  node_wrapper["Command wrapper<br/>[cmd.go]"]
  node_models["Output models"]
  node_format["Output formatting<br/>[format.go]"]
  node_database[("Database queries")]
end

node_user(("CLI user"))
node_postgres[("PostgreSQL")]

node_user -->|"runs commands"| node_entry
node_entry -->|"registers commands"| node_configure
node_entry -->|"registers commands"| node_project
node_entry -->|"registers commands"| node_service
node_entry -->|"registers commands"| node_release
node_entry -->|"loads config"| node_configure
node_entry -->|"initializes connection"| node_database
node_entry -->|"closes connection"| node_database
node_configure -->|"initializes schema"| node_database
node_project -->|"queries projects"| node_database
node_projectmeta -->|"reads and writes metadata"| node_database
node_service -->|"queries services"| node_database
node_servicemeta -->|"reads and writes metadata"| node_database
node_release -->|"publishes and describes releases"| node_database
node_wrapper -->|"gets query handle"| node_database
node_project -->|"formats results"| node_format
node_service -->|"formats results"| node_format
node_release -->|"formats results"| node_format
node_database -.->|"connects to"| node_postgres

click node_entry "https://github.com/felukka/bosla/blob/main/cmd/bosla/main.go"
click node_configure "https://github.com/felukka/bosla/tree/main/internal/commands/configure"
click node_project "https://github.com/felukka/bosla/tree/main/internal/commands/project"
click node_projectmeta "https://github.com/felukka/bosla/tree/main/internal/commands/project/metadata"
click node_service "https://github.com/felukka/bosla/tree/main/internal/commands/service"
click node_servicemeta "https://github.com/felukka/bosla/tree/main/internal/commands/service/metadata"
click node_release "https://github.com/felukka/bosla/tree/main/internal/commands/release"
click node_wrapper "https://github.com/felukka/bosla/blob/main/internal/utils/cmd.go"
click node_models "https://github.com/felukka/bosla/tree/main/internal/models"
click node_format "https://github.com/felukka/bosla/blob/main/internal/utils/format.go"
click node_database "https://github.com/felukka/bosla/tree/main/internal/database"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_configure,node_user toneBlue
class node_project,node_projectmeta,node_postgres toneAmber
class node_service,node_servicemeta toneMint
class node_release toneRose
class node_wrapper,node_models,node_format,node_database toneIndigo
```

## Components

### CLI and configuration

- [CLI entry point](https://github.com/felukka/bosla/blob/main/cmd/bosla/main.go): `cmd/bosla/main.go`
- [Database configuration](https://github.com/felukka/bosla/tree/main/internal/commands/configure): `internal/commands/configure`

### Project management

- [Project commands](https://github.com/felukka/bosla/tree/main/internal/commands/project): `internal/commands/project`
- [Project metadata](https://github.com/felukka/bosla/tree/main/internal/commands/project/metadata): `internal/commands/project/metadata`

### Service management

- [Service commands](https://github.com/felukka/bosla/tree/main/internal/commands/service): `internal/commands/service`
- [Service metadata](https://github.com/felukka/bosla/tree/main/internal/commands/service/metadata): `internal/commands/service/metadata`

### Release management

- [Release commands](https://github.com/felukka/bosla/tree/main/internal/commands/release): `internal/commands/release`

### Shared runtime and data

- [Command wrapper](https://github.com/felukka/bosla/blob/main/internal/utils/cmd.go): `internal/utils/cmd.go`
- [Output models](https://github.com/felukka/bosla/tree/main/internal/models): `internal/models`
- [Output formatting](https://github.com/felukka/bosla/blob/main/internal/utils/format.go): `internal/utils/format.go`
- [Database queries](https://github.com/felukka/bosla/tree/main/internal/database): `internal/database`

### Other components

- **CLI user**
- **PostgreSQL**

## Connections

- CLI user → CLI entry point: runs commands (evidence: `README.md`)
- CLI entry point → Database configuration: registers commands (evidence: `cmd/bosla/main.go`)
- CLI entry point → Project commands: registers commands (evidence: `cmd/bosla/main.go`)
- CLI entry point → Service commands: registers commands (evidence: `cmd/bosla/main.go`)
- CLI entry point → Release commands: registers commands (evidence: `cmd/bosla/main.go`)
- CLI entry point → Database configuration: loads config (evidence: `cmd/bosla/main.go`)
- CLI entry point → Database queries: initializes connection (evidence: `cmd/bosla/main.go`)
- CLI entry point → Database queries: closes connection (evidence: `cmd/bosla/main.go`)
- Database configuration → Database queries: initializes schema (evidence: `README.md`)
- Project commands → Database queries: queries projects (evidence: `internal/commands/project/search.go`)
- Project metadata → Database queries: reads and writes metadata (evidence: `internal/commands/project/metadata/list.go`)
- Service commands → Database queries: queries services (evidence: `internal/commands/service/search.go`)
- Service metadata → Database queries: reads and writes metadata (evidence: `internal/commands/service/metadata/list.go`)
- Release commands → Database queries: publishes and describes releases (evidence: `internal/commands/release/publish.go`)
- Command wrapper → Database queries: gets query handle (evidence: `internal/utils/cmd.go`)
- Project commands → Output formatting: formats results (evidence: `internal/commands/project/search.go`)
- Service commands → Output formatting: formats results (evidence: `internal/commands/service/search.go`)
- Release commands → Output formatting: formats results (evidence: `internal/commands/release/describe.go`)
- Database queries → PostgreSQL: connects to (evidence: `README.md`)
