feat(#78): implement server-side filtering and pagination for dashboa…#240
Open
Killerjunior wants to merge 1 commit into
Open
Conversation
…agination for dashboard events - Add GET /api/v1/events endpoint with server-side filtering by contractId, eventType, and network, plus offset-based pagination (page/limit params) - Create shadcn/ui-styled Select component (components/ui/select.tsx) using native HTML select with custom styling (no new dependency needed) - Refactor FilterBuilder to use Select dropdowns for Network, Contract ID, and Event Topic instead of plain text inputs with datalists - Extend useEventFilters hook with page and network URL params, add setPage helper that syncs pagination state to URL search parameters - Rewrite DashboardClient: clean up all duplicate imports and merge-conflict remnants, integrate server-side fetch from /api/v1/events triggered on filter/page/network changes, add pagination nav with page number buttons - Fix package.json syntax errors (missing comma, vitest override mismatch) - All filter state is deep-link ready via URL search parameters Closes Open-audit-foundation#78
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…rd events
Closes #78
Architecture Documentation - PR Summary
📋 Issue Summary
Problem: New contributors struggle to understand how data flows through the Open-Audit backend pipeline, from fetching raw XDR from Stellar RPC through the Translation Registry to the frontend dashboard.
Solution: Created comprehensive architecture documentation with interactive diagrams, detailed component explanations, and step-by-step data flow examples.
✅ Changes Made
New Files Created
ARCHITECTURE.md(773 lines)docs/architecture-simple.md(simplified version)Modified Files
README.md🎨 Diagrams Included
1. High-Level Architecture (Mermaid)
flowchart TB StellarNetwork --> EventIndexer EventIndexer --> TranslationEngine TranslationEngine --> WebSocketServer WebSocketServer --> FrontendDashboard2. Detailed Component Diagram
Shows all services, their interactions, and data flow with:
3. Data Transformation Example
Demonstrates how a raw XDR event becomes human-readable text:
📚 Documentation Coverage
For Backend Developers
For Frontend Developers
For New Contributors
🔍 Key Sections
1. System Overview
High-level explanation of the 5-component architecture
2. Architecture Diagram
Interactive Mermaid flowchart with color-coded services
3. Component Deep Dive
Detailed explanation of each component:
4. Data Flow
Complete event journey with examples:
5. Development Guide
Practical instructions for:
6. Performance & Scalability
🎯 Impact on Contributors
Before This PR
After This PR
📊 Documentation Metrics
✨ Example Use Cases
Use Case 1: Understanding Rate Limit Handling
Before: Grep through
indexer.tsto understand retry logicAfter: Read "Event Indexer" section with diagram and explanation
Use Case 2: Adding a New Contract Blueprint
Before: Reverse-engineer existing blueprints
After: Follow step-by-step guide in "Adding a New Contract Blueprint"
Use Case 3: Debugging Event Loss
Before: Unclear where events might be dropped
After: Follow data flow diagram to identify bottleneck
Use Case 4: Optimizing Backend Performance
Before: Unclear what components exist and their interactions
After: Review architecture diagram to identify optimization points
🚀 Next Steps
This documentation provides the foundation for:
📝 Testing
To verify the documentation:
Diagram rendering:
Links:
Code examples:
Accuracy:
npm run dev:ws🙏 Acknowledgments
This architecture documentation was created by analyzing:
Special attention was paid to:
📌 Closes Issue
This PR resolves the issue requesting backend architecture documentation for new contributors looking to help with optimization and indexing bugs.
Before: Contributors struggled to understand the complex backend pipeline
After: Clear diagrams and documentation make the system accessible to everyone
Branch Information
docs/add-architecture-diagrammainReady for review! 🎉