Rene Nochebuena 4a8cbc0d29
All checks were successful
Go CI/CD / go-ci (push) Successful in 19m6s
Go CI/CD / go-ci (pull_request) Successful in 19m4s
Merge pull request 'CQRS Implementation' (#1) from feature/cqrs-implementation into develop
Reviewed-on: #1
Reviewed-by: Cloud Administrator <cloud-admin@noreply.gitstormr.dev>
2025-04-13 09:35:47 -06:00
2025-04-12 22:00:42 -06:00

πŸ”₯ StoneCQRS - 10 billion% decoupled architecture!

Ultimate CQRS/Event toolkit! ⚑ Command/Query separation with event-driven superpowers. Perfect for complex domains & microservices. Saga-ready architecture baked in. Part of stone-utils ecosystem. 10 billion% more decoupled! πŸš€

Kingdom of Science Approved EVENT-DRIVEN 10 BILLION

πŸš€ Why StoneCQRS?

  • CQRS/Event-Sourcing with Senku-level precision
  • Saga-ready architecture out of the box
  • 100% decoupled components (like good science should be)
  • 10 billion events/sec handling capacity (theoretical)

πŸ’₯ Installation

go get gitstormr.dev/stone-utils/stonecqrs@latest

⚑ Basic Usage

package main

import (
	"gitstormr.dev/stone-utils/stonecqrs"
)

type CreateOrderCommand struct{ UserID string }
type OrderCreatedEvent struct{ OrderID string }

type OrderHandler struct{}

func (h *OrderHandler) Handle(ctx context.Context, cmd stonecqrs.Command) ([]stonecqrs.Event, error) {
	return []stonecqrs.Event{OrderCreatedEvent{OrderID: "123"}}, nil
}

func main() {
	dispatcher := stonecqrs.NewDispatcher()
	dispatcher.RegisterCommandHandler(CreateOrderCommand{}, &OrderHandler{})
	events, _ := dispatcher.DispatchCommand(ctx, CreateOrderCommand{UserID: "u-456"})
	// events = [OrderCreatedEvent]  
}  

πŸ”¬ Core Patterns

Command -> Event -> Reaction

[CreateOrderCommand]  
     ↓  
[OrderCreatedEvent] β†’ [PaymentHandler] β†’ [InventoryHandler]  

Saga ready flow

// 1. Execute command  
events, _ := dispatcher.DispatchCommand(ctx, cmd)  

// 2. Automatic event processing  
//    (Handlers trigger subsequent commands)  

// 3. Compensation on failure  
//    (Built-in rollback capabilities)  

βš—οΈ Scientific Benchmarks

METRIC STANDARD LIB STONECQRS
Decoupling 30% 10B%
Scalability 1x ∞x
Debuggability ❌ πŸ”πŸ’‘

Join the Scientific Revolution!

"This isn't just CQRS - it's revolutionizing software patterns like we revived civilization!" - Senku Ishigami

Kingdom of Science Approved

(Now with 100% more Chrome screaming "SO BADASS!")

Description
StoneCQRS - Ultimate CQRS/Event toolkit! ⚑ Command/Query separation with event-driven superpowers. Perfect for complex domains & microservices. Saga-ready architecture baked in. Part of stone-utils ecosystem. 10 billion% more decoupled! πŸš€
Readme MIT 42 KiB
v1.0.0 Latest
2025-04-13 11:52:43 -06:00
Languages
Go 100%