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
- Host: GitHub
- URL: https://github.com/fabiandistler/c4r
- Owner: fabiandistler
- License: other
- Created: 2025-07-28T06:22:20.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-11-08T08:26:15.000Z (7 months ago)
- Last Synced: 2025-11-08T08:26:47.589Z (7 months ago)
- Topics: c4-model, r, software-architecture
- Language: R
- Homepage: https://fabiandistler.github.io/c4r/
- Size: 1.74 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
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
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://CRAN.R-project.org/package=c4r)
[](https://github.com/fabiandistler/c4r/actions/workflows/R-CMD-check.yaml)
[](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