Cascade implements a microservices architecture with the following core services:
- Auth Service (
auth) - User authentication using Better Auth with email/password and GitHub OAuth - Board Command Service (
board-command) - Write operations for boards and tasks - Board Query Service (
board-query) - Read operations with caching - Activity Service (
activity) - Real-time activity logging via Kafka events - Audit Service (
audit) - Immutable audit trail for compliance - API Docs Service (
api-docs) - Centralized API documentation
All services are deployed to both local (Docker Compose) and production (GKE) environments.
- Command Service: Handles all write operations
- Query Service: Optimized for read operations with Redis caching
- Async synchronization via Kafka events
- All state changes published as events to Kafka
- Audit service maintains immutable event log
- Nginx ingress controller routes traffic
- Path-based routing to appropriate services
- Each service has its own MongoDB database or collection
- No shared databases between services
- Multi-step workflows coordinated via Kafka events
- Example: Board creation triggers notifications and audit logs
- Services implement retry mechanisms for Kafka connections
- Observable Streams: Kafka events processed as reactive streams
- Operators: map, filter, tap, catchError for event transformation
- Backpressure: Built-in handling via RxJS
- Error Recovery: Graceful error handling with stream continuation
- User action → Command Service
- Command Service writes to DB
- Command Service publishes event to Kafka
- Query Service consumes event, invalidates cache
- Activity Service logs the event
- Audit Service stores immutable record
To run the project locally using Docker Compose:
-
Ensure you have Docker and Docker Compose installed.
-
Start the services:
docker-compose up --build
More details in the local docker compose documentation.
To deploy the project to Google Kubernetes Engine (GKE) using Helm:
Quick Start:
./setup.sh <YOUR_PROJECT_ID>Manual Deployment: See the Deployment Checklist for step-by-step instructions.
Key Features:
- Automated cluster setup and configuration
- Kafka with KRaft mode (no Zookeeper)
- MongoDB 3-node replica set
- Redis caching layer
- Nginx Ingress with dynamic IP support (nip.io)
- GitHub OAuth authentication
Kafka UI is not exposed via Ingress by default. To access it:
kubectl port-forward svc/cascade-kafka-ui 8080:80Then open http://localhost:8080 in your browser.
Cascade supports multiple authentication methods:
Users can sign up and sign in using email and password (powered by Better Auth).
Users can sign in with their GitHub accounts for a seamless experience.
Setup Instructions: See GitHub OAuth Setup Guide for detailed configuration steps.
Quick Setup:
-
Create a GitHub OAuth App at https://github.com/settings/developers
-
Deploy with secrets:
helm upgrade cascade helm/cascade \ --set secrets.githubClientId="your-client-id" \ --set secrets.githubClientSecret="your-secret"
-
Configure callback URL:
http://<INGRESS_IP>/api/auth/callback/github
API documentation is available via Scalar for each microservice when running:
- Centralized API Docs: http://localhost:3006
- Architecture Overview - High-level architecture diagrams
- GKE Architecture Guide - Detailed documentation on how Cascade works in Kubernetes
- Service discovery and communication patterns
- Database architecture and synchronization
- Caching strategy and data flow
- Event-driven architecture with Kafka
- Complete deployment topology
- Activity & Audit Services - Observability and compliance features
- Real-time activity monitoring
- Immutable audit trail
- Deployment and usage guide
setup.sh: Initializes the environment and prepares dependencies.cleanup.sh: Cleans up local or remote resources.build-and-push.sh: Builds Docker images and pushes them to a container registry.
This project is licensed under the MIT License - see the LICENSE file for details.
