Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 31 Jan 03:46
· 107 commits to main since this release

2.0.0 (2025-06-25)

πŸš€ Major Release: Event-Driven Architecture Overhaul

This release marks a significant milestone for the Staxless platform, transitioning our core backend services (auth-service, email-service, stripe-service, and user-service) to a robust, event-driven architecture powered by Apache Kafka. This overhaul replaces synchronous API-based communication with asynchronous Kafka topic-based event production and consumption, enhancing scalability, decoupling services, and improving fault tolerance. This is a breaking change, requiring updates to client integrations and service configurations to align with the new event-driven model.

✨ Features

  • Event-Based Architecture Transition (2a3b6d4)
    • auth-service:
      • Refactored MagicLinkProvider to produce magic link email events to the auth.magic-link topic, replacing direct email sending.
      • Reworked session validation and user logout handlers to consume events from auth.session.validate and auth.logout topics, eliminating direct API endpoints.
      • Added Kafka client configuration with producer and consumer utilities in kafka/client.js.
      • Implemented a dedicated authentication event consumer for processing Kafka messages.
      • Updated server initialization to start the authentication event consumer.
    • email-service:
      • Removed email-related API routes, adopting Kafka-based event consumption for magic link emails.
      • Added Kafka client configuration and consumer functions in kafka/email-consumer.js.
      • Developed a handler for processing auth.magic-link topic events.
      • Updated server initialization to start the email event consumer.
    • stripe-service:
      • Integrated Kafka for payment events, producing subscription updates to the stripe.subscription.update topic.
      • Added Kafka client configuration and producer functions in kafka/stripe-producer.js.
      • Modified webhook handling to emit events to Kafka instead of direct processing.
      • Updated server initialization to start the user event consumer.
    • user-service:
      • Transitioned subscription update processing to consume stripe.subscription.update topic events.
      • Added Kafka client configuration and consumer functions in kafka/user-consumer.js.
      • Implemented a handler for processing subscription update events.
      • Updated server initialization to start the user event consumer.

πŸ› Bug Fixes

  • Admin Route Correction (43cef73)
    • Updated the admin route destination to use the correct port, ensuring proper routing and accessibility.

⚠️ BREAKING CHANGES

  • Event-Driven Architecture:
    • Replaced direct API calls with Kafka-based event-driven communication across all services. Clients relying on synchronous API endpoints for magic link emails, session validation, logout, or subscription updates must now interact with Kafka topics or adapt to the event-based flow.
    • Action Required:
      • Update client integrations to handle Kafka-based events.
      • Configure services with Kafka broker details (e.g., bootstrap.servers, group.id) and topic subscriptions.
      • Deploy all services simultaneously to avoid communication mismatches.
      • Ensure Kafka brokers are accessible and topics (auth.magic-link, auth.session.validate, auth.logout, stripe.subscription.update) are created with appropriate partitions and replication factors.

πŸ“ Deployment Notes

  • Verify Kafka broker connectivity and topic creation before deployment.
  • Update environment variables with Kafka broker details and consumer group IDs.
  • Monitor consumer lag and topic partitioning post-deployment to ensure performance.
  • Review updated documentation for guidance on the new event-driven flow.