Skip to content

Commit

Permalink
add C4 diagrams, current views, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Kacper-RF committed Sep 15, 2023
1 parent 0accb70 commit c3b03bf
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
lerna-debug.log
c4/.structurizr
c4/workspace.json
23 changes: 23 additions & 0 deletions c4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Quiet C4 Diagrams

Quiet architecture presented on C4 diagrams. Currently it uses 2 diagrams - Context and Container.
Made in Structurzir
Current views saved in `/current`

## Run locally

1. Make sure you have Docker installed
2. Run command in terminal: ```docker pull structurizr/lite```
3. Run docker container inside your Quiet directory and choosen porsts, example : ```docker run -it --rm -p 8080:8080 -v /home/kacper/development/quiet:/usr/local/structurizr structurizr/lite```
4. Open `http://localhost:8080/`

## Editing

Everything is in file `workspace.dsl`
After change, save file and reload page.
Highly recommend extenstions for VSC: C4 DSL Extension and Structurizr.

## Docs

https://c4model.com/
https://docs.structurizr.com/
Binary file added c4/current/C1-Context.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added c4/current/C2-Container.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
159 changes: 159 additions & 0 deletions c4/workspace.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
workspace {

model {

properties {
"structurizr.groupSeparator" "/"
}

userA = person "User A" "Owner of Quiet community"
userB = person "User B" "Member of Quiet community"
userC = person "User C" "Member of Quiet community"
userD = person "User D" "Member of Quiet community"

quietB = softwareSystem "Quiet App B" "Linux/MacOS/Windows/Android/iOS" {
userB -> this
}

quietC = softwareSystem "Quiet App C" "Linux/MacOS/Windows/Android/iOS" {
userC -> this
}

quietD = softwareSystem "Quiet App D" "Linux/MacOS/Windows/Android/iOS" {
userD -> this "One peer is enough for replicating all data"
}

quietA = softwareSystem "Quiet App" "Linux/MacOS/Windows/Android/iOS" {

desktops = group "Desktop Apps" {

linux = container "Linux" "React & Electron" {
userA -> this
}

macOS = container "MacOS" "React & Electron" {
userA -> this
}

windows = container "Windows" "React & Electron" {
userA -> this
}
}

mobiles = group "Mobiles" {

android = container "Android" "React Native - UI" "xd"{
userA -> this
}

iOS = container "iOS" "React Native - UI"{
userA -> this
}

androidWorker = group "Android Worker" {

cpp = container "CPP" {

}

nodeAndroid = container "Node Android" {
android -> this
cpp -> this
}

notifications = container "Notifications" "Java" {
nodeAndroid -> this
}

}

iOSWorker = group "iOS Worker" {

nodeiOS = container "Node iOS" {
iOS -> this
}

}

}

stateManager = container "State Manager" "Redux Toolkit & Redux Saga" {
linux -> this
macOS -> this
windows -> this
android -> this
iOS -> this
}


backend = group "Backend" {

nest = container "Nest JS" "Connection Manager as a core mediator between other services" {
stateManager -> this "Conntected via Socket IO"
nodeAndroid -> this "Conntected via Socket IO"
nodeiOS -> this
}

reigstration = container "Registration Service" {
nest -> this
}

levelDB = container "levelDB" "local database" {
nest -> this
}

storage = group "Storage" {

orbitDB = container "orbitDB" {
nest -> this
}

ipfs = container "IPFS" {
orbitDB -> this
}

libp2p = container "libp2p"{
ipfs -> this
}

}

}

tor = container "Tor"{
nest -> this
}

}


quietA -> quietB
quietA -> quietC

quietB -> quietA
quietB -> quietC

quietC -> quietA
quietC -> quietB

quietD -> quietA
quietA -> quietD

}


views {
systemLandscape {
include *
autolayout
}

container quietA {
include *
autolayout
}


theme default
}
}

0 comments on commit c3b03bf

Please sign in to comment.