Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create architecture diagram with D2 #50

Merged
merged 2 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading