An open API service indexing awesome lists of open source software.

https://github.com/fabiandistler/c4r

Create C4 Architecture Diagrams in R
https://github.com/fabiandistler/c4r

c4-model r software-architecture

Last synced: 5 months ago
JSON representation

Create C4 Architecture Diagrams in R

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library(c4r)
```

# c4r

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/c4r)](https://CRAN.R-project.org/package=c4r)
[![R-CMD-check](https://github.com/fabiandistler/c4r/actions/workflows/R-CMD-check.yaml/badge.svg?branch=main)](https://github.com/fabiandistler/c4r/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/fabiandistler/c4r/graph/badge.svg)](https://app.codecov.io/gh/fabiandistler/c4r)

c4r provides a simple R interface for creating C4 architecture diagrams. The package focuses on the first three levels of the C4 model (Context, Container, Component), generating diagrams using Graphviz DOT notation rendered through {DiagrammeR}. For the Code level, consider the [{flow}](https://github.com/moodymudskipper/flow) package.

## Installation

c4r is not yet available on CRAN. You can install the development version from GitHub:

``` r
# install.packages("pak")
pak::pak("fabiandistler/c4r")
```

## Quick Example

```{r, eval=FALSE}
library(c4r)

# Create a simple system context diagram
c4_context(
title = "My System Context",
person = list(c4_person("user", "User", "System user")),
system = list(c4_system("app", "My App", "Does something useful")),
relationships = list(c4_rel("user", "app", "Uses"))
)
```

## Learn More

- **[Getting Started Guide](https://fabiandistler.github.io/c4r/articles/getting-started.html)** - Complete tutorial with examples
- **[Function Reference](https://fabiandistler.github.io/c4r/reference/)** - API documentation