Skip to content

Add detailed Mermaid flow diagram to README #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 19, 2025
Merged

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 19, 2025

This PR adds a comprehensive Mermaid flowchart to the README that documents the complete webhook processing flow in the Hooks framework.

Changes Made

  • Added a new "Architecture Flow" subsection under "How It Works 🔧"
  • Created a detailed Mermaid diagram that shows:
    • Server Bootstrap Process: Configuration loading, plugin initialization, and endpoint setup
    • Request Processing Pipeline: Complete flow from incoming request to response
    • Plugin Integration Points: How auth, handler, lifecycle, and instrument plugins integrate
    • Error Handling Paths: Multiple error scenarios and their responses
    • Decision Points: IP filtering, authentication validation, and error handling
    • Visual Styling: Color-coded nodes for different states (start, success, errors)

Technical Details

The diagram accurately reflects the implementation in lib/hooks/app/api.rb and incorporates information from:

  • Server bootstrap process in lib/hooks/core/builder.rb
  • Plugin system architecture documented in docs/ directory
  • Authentication flow, IP filtering, and lifecycle hooks
  • Error handling for both handler errors and system errors

The flowchart provides developers with a clear visual understanding of how webhook requests flow through the system, making it easier to:

  • Understand the request processing pipeline
  • Debug issues at specific stages
  • Plan custom plugin implementations
  • Contribute to the framework

Testing

  • All unit tests pass (591 examples, 0 failures, 100% coverage)
  • All integration tests pass (10 examples, 0 failures)
  • All acceptance tests pass (52 examples, 0 failures)
  • Linting passes with no offenses detected

Fixes #64.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits June 19, 2025 00:26
Co-authored-by: GrantBirki <23362539+GrantBirki@users.noreply.github.com>
Co-authored-by: GrantBirki <23362539+GrantBirki@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] task: add detailed mermaid flow diagram to the readme Add detailed Mermaid flow diagram to README Jun 19, 2025
@Copilot Copilot AI requested a review from GrantBirki June 19, 2025 00:29
Copilot finished work on behalf of GrantBirki June 19, 2025 00:29
@GrantBirki GrantBirki marked this pull request as ready for review June 19, 2025 06:02
@Copilot Copilot AI review requested due to automatic review settings June 19, 2025 06:02
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a detailed Mermaid flowchart documenting the Hooks framework’s webhook request lifecycle and links it from the main README.

  • Added docs/architecture_flow.md containing a comprehensive Mermaid diagram of server boot, request pipeline, plugin hooks, and error paths
  • Updated README.md to reference the new Architecture Flow documentation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/architecture_flow.md New Mermaid-based flow diagram showing webhook processing flow
README.md Added link to Architecture Flow section in docs

@GrantBirki GrantBirki merged commit 9ec9217 into main Jun 19, 2025
22 checks passed
@GrantBirki GrantBirki deleted the copilot/fix-64 branch June 19, 2025 06:03
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.

task: add detailed mermaid flow diagram to the readme
2 participants