Merged
Conversation
## Features Implemented ### Reports System - Custom report builder with query configuration - Report execution API with SQL injection protection - Report preview with pagination and table display - Saved reports CRUD (create, read, update, delete) - 10 pre-built report templates - Public/private report sharing - Search and filter capabilities ### Dashboards System (View-Only MVP) - Dashboard CRUD APIs - Metric widget (single number display) - Chart widget (bar charts with Recharts) - Responsive dashboard viewer with react-grid-layout - Dashboard listing and detail pages ## Technical Implementation ### Database (Migration 026) - custom_reports table with report configuration storage - custom_dashboards table with layout configuration - dashboard_widget_types table with 10 pre-configured widget types - 10 pre-built report templates seeded ### Backend - Query builder with field whitelisting and parameterized queries - CSV, Excel (xlsx), and PDF (jsPDF) export utilities - API authentication with bearer tokens - Rate limiting on all endpoints - Zod validation for all inputs ### Frontend - Report builder page with form-based configuration - Saved reports list with tabs (My Reports, Shared, Templates) - Report preview with pagination - Dashboard viewer with responsive grid layout - Widget components (Metric, Chart) ### Dependencies Added - recharts (charting library) - jspdf-autotable (PDF table generation) - react-grid-layout (dashboard grid positioning) ## Pages Created - /reports - Saved reports list - /reports/builder - Create new report - /reports/[id] - View and run report - /reports/[id]/edit - Edit report - /reports/preview - Report preview with results - /dashboards - Dashboard list - /dashboards/[id] - View dashboard ## Build Status ✅ Build passes with 0 errors ✅ All routes properly configured ✅ Design system compliant 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…mpatibility The reports and dashboards APIs were requiring bearer tokens for all requests, but the web UI uses session-based authentication (NextAuth). This change makes the GET endpoints work with session auth while keeping bearer token auth available for external API access. Changes: - Removed requireApiScope from GET /api/reports (list reports) - Added comment explaining web UI uses session auth - Reports now show public and system templates - Write operations (POST, PATCH, DELETE) still require API tokens This matches the pattern used by other M.O.S.S. APIs like /api/devices.
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.
Summary
Implements comprehensive custom reports and dashboards system for M.O.S.S. with MVP focus on report creation, execution, and dashboard viewing.
Features
Files Changed
Testing
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com