Skip to content

Conversation

@smokeyScraper
Copy link
Contributor

@smokeyScraper smokeyScraper commented Mar 9, 2025

@chandansgowda please review this, collaborated with @Vivekgupta008 and still working on...

References #18 built on top of #8

🚀 PR Description: Foundational Event-Driven System and Workflow Architecture

📌 Overview

This PR implements the foundational components of the event-driven system and workflow architecture for Devr.AI. It sets up the core structure for handling events across platforms (GitHub, Discord, Slack) and provides a modular framework for future extensions.


✅ Implemented in This PR

  1. Event Schema:

    • Defined a standardized BaseEvent class with common fields (platform, event_type, timestamp, actor, etc.).
    • Implemented platform-specific event classes (GitHubEvent, DiscordEvent, SlackEvent).
  2. Event Handlers:

    • Created a BaseHandler class with pre_handle, handle, and post_handle methods.
    • Implemented placeholder logic for specific handlers:
      • IssueHandler: For GitHub issue events.
      • PRHandler: For GitHub PR events.
      • MessageHandler: For Discord/Slack messages.
      • OnboardingHandler: For new contributor detection.
      • FAQHandler: For knowledge-based questions.
  3. Handler Registry:

    • Implemented HandlerRegistry for dynamic event routing.
    • Added support for platform-specific and generic event handlers.
  4. Event Bus:

    • Defined the EventBus class (stub implementation).
    • Added basic event serialization/deserialization methods (to_dict, from_dict).

🚧 Partially Implemented

  • Event Bus:
    • The EventBus class is defined but lacks implementation for dispatching events to handlers.
  • Handlers:
    • Placeholder logic is implemented, but detailed platform-specific workflows (e.g., GitHub issue triage, Discord message handling) are not yet completed.
  • Vector DB Interactions:
    • No implementation for Supabase vector operations or embedding generation.

📝 Remaining Tasks

The following components will be implemented in future PRs:

  1. Event Bus:
    • Complete EventBus.dispatch() for routing events to handlers.
    • Add platform-specific event producers (e.g., GitHub webhook listeners).
  2. Handlers:
    • Add detailed logic for platform-specific workflows.
    • Implement fallback/retry mechanisms for failed event processing.
  3. Vector DB:
    • Implement VectorDBService for Supabase vector operations.
    • Add EmbeddingGenerator for generating embeddings.
  4. Analytics:
    • Implement event listeners for analytics.
    • Build a pipeline for aggregating and storing analytics data.
  5. Configuration:
    • Add a configuration system for managing bot settings.
    • Implement feature flags for gradual rollout.

📦 Files Changed

  • backend/app/core/events/base.py: Added BaseEvent and platform-specific event classes.
  • backend/app/core/handlers/base.py: Added BaseHandler and specific handler classes.
  • backend/app/core/handlers/handler_registry.py: Implemented HandlerRegistry.
  • backend/app/core/events/event_bus.py: Added EventBus (stub implementation).

📋 Next Steps

  • Complete the EventBus implementation and integrate it with HandlerRegistry.
  • Add detailed logic to handlers for platform-specific workflows.
  • Implement VectorDBService and EmbeddingGenerator.

This PR description clearly outlines what has been implemented, what is partially done, and what remains for future work. It also provides context for reviewers and sets expectations for the next steps.

@Vivekgupta008
Copy link
Contributor

Can you please review this @chandansgowda

@smokeyScraper smokeyScraper changed the title Foundational Base structure implementation for Devr.AI (S.R. number-1) Foundational Base structure implementation for Devr.AI Mar 16, 2025
@chandansgowda chandansgowda merged commit 349edcd into AOSSIE-Org:main Mar 22, 2025
@chandansgowda
Copy link
Member

Thanks for contributing guys!!

harshvardhan119 pushed a commit to harshvardhan119/Devr.AI that referenced this pull request Mar 27, 2025
@smokeyScraper smokeyScraper deleted the base-structure-implementation branch June 24, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants