Skip to content

Commit

Permalink
Merge pull request #50 from bee-ci-system/add_architecture_diagram
Browse files Browse the repository at this point in the history
create architecture diagram with D2
  • Loading branch information
bartekpacia authored Nov 16, 2024
2 parents d45402c + 0d2e52c commit 60f65d8
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
27 changes: 27 additions & 0 deletions architecture.d2
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
browser -> backend.server: REST API

GitHub: {
shape: cloud
icon: https://icons.terrastruct.com/dev%2Fgithub.svg
}

GitHub -> backend.server: webhook events

backend.server <-> backend.storage.Postgres: read/write data
backend.server <-> backend.storage.Redis: store KV data
backend.server <-> backend.storage.Influx: read data

backend.storage.Postgres.shape: cylinder
backend.storage.Redis.shape: cylinder
backend.storage.Influx.shape: cylinder

backend.gh-updater -- backend.storage.Postgres: listen to build status changes
backend.gh-updater -> GitHub: write check status

backend.executors.executor 1 -> backend.storage.Postgres: build status data
backend.executors.executor 2 -> backend.storage.Postgres: build status data
backend.executors.executor n -> backend.storage.Postgres: build status data

backend.executors.executor 1 -> backend.storage.Influx: build logs
backend.executors.executor 2 -> backend.storage.Influx: build logs
backend.executors.executor n -> backend.storage.Influx: build logs
7 changes: 4 additions & 3 deletions backend/cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ import (
"crypto/tls"
"encoding/base64"
"fmt"
"github.com/bee-ci/bee-ci-system/internal/common/ghservice"
"github.com/golang-jwt/jwt/v5"
"github.com/redis/go-redis/v9"
"log/slog"
"net/http"
"os"
"os/signal"
"strconv"
"time"

"github.com/bee-ci/bee-ci-system/internal/common/ghservice"
"github.com/golang-jwt/jwt/v5"
"github.com/redis/go-redis/v9"

influxdb2 "github.com/influxdata/influxdb-client-go/v2"

"github.com/bee-ci/bee-ci-system/internal/common/middleware"
Expand Down
3 changes: 2 additions & 1 deletion backend/internal/server/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"embed"
"encoding/json"
"fmt"
"github.com/bee-ci/bee-ci-system/internal/common/ghservice"
"html/template"
"io"
"log"
Expand All @@ -18,6 +17,8 @@ import (
"strconv"
"time"

"github.com/bee-ci/bee-ci-system/internal/common/ghservice"

"github.com/golang-jwt/jwt/v5"
"github.com/google/go-github/v64/github"

Expand Down

0 comments on commit 60f65d8

Please sign in to comment.