Skip to content

Commit

Permalink
Update main.dsl
Browse files Browse the repository at this point in the history
  • Loading branch information
antshc authored Nov 4, 2024
1 parent 01e1fa7 commit 737c109
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions documentation/diagrams-as-code/main.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -70,30 +70,25 @@ workspace "highly-scalable-image-sharing-platform" "This is an example workspace
user -> frontdoor "Download images" "HTTPS"


user -> postsApiApp "/posts" "JSON/HTTP" "posts"
webApp -> postsApiApp "Uses"
webApp -> postsApiApp "/posts" "JSON/HTTP" "posts"
postsApiApp -> postsDatabase "Saves posts data."
postsApiApp -> storage "Saves posts images."
frontdoor -> storage "Pull images"
imagesProcessingFuncApp -> storage "Saves resized images."
imagesProcessingFuncApp -> storage "Listen for new images."

user -> timelinesApiApp "/timelines" "JSON/HTTP"
webApp -> timelinesApiApp "/timelines" "JSON/HTTP"
timelinesApiApp -> timelinesDatabase "Stores posts as a timeline."

user -> searchApiApp "/search" "JSON/HTTP"
webApp -> searchApiApp "/search" "JSON/HTTP"
searchApiApp -> searchDatabase "Full text search" "JSON/HTTP"

user -> usersApiApp "users" "JSON/HTTP"
webApp -> usersApiApp "/search" "JSON/HTTP"
webApp -> usersApiApp "/users" "JSON/HTTP"
usersApiApp -> usersDatabase "Saves user info." "JSON/HTTP"
usersApiApp -> identityServerApp "reads user email, user id"
identityServerApp -> googleauth "Authentication"
identityServerApp -> identityServerDatabase "Uses"
user -> identityServerApp "Authentication"
webApp -> identityServerApp "Uses"
webApp -> identityServerApp "Authentication" "JSON/HTTP"

# components relations
# timelines API
Expand All @@ -111,7 +106,7 @@ workspace "highly-scalable-image-sharing-platform" "This is an example workspace
influencersPostsRepository -> influencersPostsTable "uses" "" "components,timelines"

# query timelines
user -> getTimelineEndpoint "uses" "REST/HTTP" "components,timelines"
webApp -> getTimelineEndpoint "uses" "REST/HTTP" "components,timelines"
getTimelineEndpoint -> timelineQuery "uses" "" "components,timelines"
timelineQuery -> usersClient "uses" "" "components,timelines"
timelineQuery -> influencersPostsRepository "uses" "" "components,timelines"
Expand Down Expand Up @@ -317,6 +312,7 @@ workspace "highly-scalable-image-sharing-platform" "This is an example workspace

container imageSharingPlatform "Containers" {
include *
exclude relationship.tag==components
animation {
webApp
identityServerApp
Expand Down Expand Up @@ -370,7 +366,7 @@ workspace "highly-scalable-image-sharing-platform" "This is an example workspace

dynamic timelinesApiApp "TimelinesApiQueryInfluencerPostsInTimeline" {
title "Follower query influencer posts in the timeline"
user -> getTimelineEndpoint "/timelines/{userId}"
webApp -> getTimelineEndpoint "/timelines/{userId}"
getTimelineEndpoint -> timelineQuery "Get user timeline by id {userId}"
timelineQuery -> timelinesRepository "Reads timeline by user id {userId}"
timelineQuery -> usersClient "Get user influencer folowers"
Expand All @@ -379,7 +375,7 @@ workspace "highly-scalable-image-sharing-platform" "This is an example workspace
usersClient -> timelineQuery "Returns list of influencers"
timelineQuery -> influencersPostsRepository "if user follows influencers, reads influencer posts"
timelineQuery -> getTimelineEndpoint "Returns timeline or if user follows influencers, returns aggregated timeline with influencers posts"
getTimelineEndpoint -> user "Returns timeline"
getTimelineEndpoint -> webApp "Returns timeline"
autoLayout rl
}

Expand Down

0 comments on commit 737c109

Please sign in to comment.