diff --git a/.forgejo/workflows/rust.yaml b/.forgejo/workflows/rust.yaml new file mode 100644 index 0000000..57423e4 --- /dev/null +++ b/.forgejo/workflows/rust.yaml @@ -0,0 +1,52 @@ +name: gbserver Rust CI/CD + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + build-and-deploy: + runs-on: gbo + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + components: rustfmt, clippy + + - name: Cache cargo registry + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + + - name: Build release binary + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --locked + + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --release + + - name: Deploy binary + run: | + sudo cp ./target/release/gbserver /opt/gbo/bin/bot + sudo chmod +x /opt/gbo/bin/bot/gbserver + + sudo systemctl restart gbserver \ No newline at end of file diff --git a/gb-infra/architecture.png b/gb-infra/architecture.png new file mode 100644 index 0000000..3d46ac3 Binary files /dev/null and b/gb-infra/architecture.png differ diff --git a/gb-infra/architecture.txt b/gb-infra/architecture.txt new file mode 100644 index 0000000..c494036 --- /dev/null +++ b/gb-infra/architecture.txt @@ -0,0 +1,78 @@ +flowchart TB + %% Style definitions + classDef users fill:#FF9900,stroke:#FF6600,stroke-width:2px,color:white,font-weight:bold + classDef identity fill:#4285F4,stroke:#2956B2,stroke-width:2px,color:white,font-weight:bold + classDef content fill:#0F9D58,stroke:#0B8043,stroke-width:2px,color:white,font-weight:bold + classDef communication fill:#DB4437,stroke:#B31412,stroke-width:2px,color:white,font-weight:bold + classDef ai fill:#9C27B0,stroke:#7B1FA2,stroke-width:2px,color:white,font-weight:bold + classDef bot fill:#FB8C00,stroke:#EF6C00,stroke-width:2px,color:white,font-weight:bold + + %% Main user node + User((👤 Users)) + + subgraph "Identity & Access Management" + Zitadel["🔐 Identity Provider
(Zitadel)"] + Stalwart["✉️ Mail Server
(Stalwart)"] + end + + subgraph "Content & Collaboration" + Forgejo["📊 ALM Server
(Forgejo)"] + Static["🌐 Static Site Generator
(Website Static)"] + Minio["💾 Object Storage
(MinIO)"] + end + + subgraph "Communication & Delivery" + Caddy["🔄 Reverse Proxy
(Caddy)"] + LiveKit["💬 Real-time Communication
(LiveKit)"] + end + + subgraph "AI & Integration Layer" + LLM["🧠 LLM Engine
(Nomic LLM)"] + + subgraph "Bot Framework" + BotFramework["🤖 Bot Framework"] + + subgraph "Bot Capabilities" + MCP["📨 Message Control Protocol
(MCP)"] + GET["🔗 GET Web Service Calls"] + BASIC["⚙️ BASIC Engine"] + end + end + end + + %% Connection lines with colors + User --> |"User Access"| Caddy + Caddy --> |"Auth"| Zitadel + Caddy --> |"Code & Issues"| Forgejo + Caddy --> |"Content"| Static + Caddy --> |"Real-time"| LiveKit + Caddy --> |"AI & Bots"| BotFramework + + Zitadel --> |"SSO"| Forgejo + Zitadel --> |"Auth"| LiveKit + Zitadel --> |"Identity"| BotFramework + + Forgejo --> |"Store"| Minio + Static --> |"Assets"| Minio + + BotFramework --> MCP + BotFramework --> GET + BotFramework --> BASIC + BotFramework --> |"NLP"| LLM + + Stalwart --> |"Email"| BotFramework + LiveKit --> |"Messaging"| BotFramework + + %% Integration flows - dashed lines with colors + MCP -.-> |"Message Routing"| Stalwart + GET -.-> |"API Calls"| Forgejo + BASIC -.-> |"Scripting"| Minio + LLM -.-> |"Content Generation"| Static + + %% Apply styles + class User users + class Zitadel,Stalwart identity + class Forgejo,Static,Minio content + class Caddy,LiveKit communication + class LLM ai + class BotFramework,MCP,GET,BASIC bot \ No newline at end of file