How bucketeer-io/bucketeer works
Main System Components
• Backend Services: You have several “cmd” directories (cmd/api, cmd/batch, cmd/subscriber, cmd/web) which indicate that the backend is composed of multiple services. In addition, the “pkg” directory is divided by domain (account, auditlog, auth, autoops, batch, etc.) that implement business logic and data storage operations.
• Communication & API Layer: The “proto” directory and generated Go and TypeScript files illustrate that the system uses gRPC (and likely REST) as well as Protobuf contracts between services.
• Data Stores and Cache: The presence of storage packages (MySQL, Postgres, BigQuery, Redis, etc.) and caching layers (pkg/cache) show that persistent storage and caching are key parts of the system.
• Frontend Applications: Two major UI directories exist (“ui/dashboard” and “ui/web‑v2”). They are built with TypeScript/React and handle client-side interactions with the backend through REST/gRPC APIs.
• Infrastructure & Deployment: Directories such as “manifests,” “.github/workflows,” “migration,” and “Dockerfiles” imply the use of containerized deployments (e.g., Docker, Kubernetes via Helm charts) and automated CI/CD pipelines.
• Messaging/Events: The presence of “pkg/pubsub,” “pkg/eventcounter,” and “pkg/subscriber” modules indicates that event streaming/message processing is used to process events (for logging, evaluation events, and notifications).
Relationships and Interactions
• Shared Communication Contract: Represent the Protobuf/gRPC layer as a middle entity used by both internal services and client SDKs (Android, iOS, JavaScript, Flutter, Go, Node.js) to maintain consistent communication.
• Messaging and Event Pipelines: Represent the pubsub system and other messaging channels that feed evaluation results, notifications, and analytics from one module (e.g., autoops or eventcounter) to another (e.g., batch or subscriber) via asynchronous message brokers.
Architectural Patterns and Technologies
• Continuous Integration/Delivery: Optionally add an “Infra/DevOps” layer that displays CI/CD pipelines, Docker containers, and orchestration with Kubernetes showing deployment flow.
Final Touches
• Flows such as “Feature Flag Evaluation,” “A/B Testing Results Analysis,” and “Notification Delivery” to emphasize Bucketeer’s core functionality.