Skip to content

feat: Add credential analytics dashboard#127

Merged
Josie123-Dev merged 2 commits into
GuardZero144:mainfrom
Rampop01:main
Jul 23, 2026
Merged

feat: Add credential analytics dashboard#127
Josie123-Dev merged 2 commits into
GuardZero144:mainfrom
Rampop01:main

Conversation

@Rampop01

@Rampop01 Rampop01 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

This PR implements the Credential Analytics Dashboard to fulfill issue #43. It introduces a new set of data-aggregation endpoints on the backend and pairs them with a responsive, chart-driven dashboard on the frontend.

Fixes

Backend Changes

  • Analytics Module: Scaffolded a brand new AnalyticsModule integrating TypeORM repositories for Identity, Verification, and SharedData.
  • Analytics Controller: Exposed the GET /analytics/dashboard REST endpoint, delivering structured usage metrics.
  • Analytics Service: Built comprehensive data aggregation logic:
    • Tracks total vs. active vs. revoked credentials.
    • Monitors total verifications and categorizes them by status (Approved, Rejected, Pending, Expired).
    • Analyzes total sharing patterns including active and expired shares.
    • Computes an interactive 7-day time-series trend of created verifications.
  • App Module: Imported and registered the AnalyticsModule in app.module.ts.

Frontend Changes

  • Data Visualization: Installed recharts to enable dynamic and rich metric charting.
  • Analytics Component: Created a new CredentialAnalyticsDashboard UI component containing:
    • High-level metric summary cards (Total Credentials Issued, Verifications, Data Shares).
    • A responsive LineChart plotting the 7-day verification trend.
    • A responsive PieChart demonstrating verification rates by status.
  • Main App Layout: Updated src/app/page.tsx to include a brand new 'Analytics Dashboard' tab, making the dashboard directly accessible from the central navigation menu.

Acceptance Criteria Covered

  • ✅ Statistics are accurate (driven by TypeORM counts and aggregations).
  • ✅ Reports are useful (exposes actionable dashboard metrics).
  • ✅ Visualizations are clear (implemented beautiful interactive charts via Recharts).
  • ✅ Data is aggregated correctly.
  • ✅ Performance is good (SQL aggregations at the database level).

- Created backend Analytics module (controller, service, module) to compute metrics
- Added recharts dependency to frontend
- Added CredentialAnalyticsDashboard component
- Updated page.tsx to include the Analytics Dashboard tab
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

@Rampop01 is attempting to deploy a commit to the Josie's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Rampop01

Copy link
Copy Markdown
Contributor Author

@Josie123-Dev this is my PR to issue #43 , kindly review.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sure-data Ready Ready Preview, Comment Jul 23, 2026 5:29pm

@Josie123-Dev

Copy link
Copy Markdown
Member

@Rampop01 kindly resolve merge conflict at backend/src/app.module.ts

@Rampop01

Copy link
Copy Markdown
Contributor Author

@Rampop01 kindly resolve merge conflict at backend/src/app.module.ts

Okay, on it

# Conflicts:
#	backend/src/app.module.ts
@Rampop01

Copy link
Copy Markdown
Contributor Author

@Josie123-Dev it has been fixed

@Josie123-Dev
Josie123-Dev merged commit d334b73 into GuardZero144:main Jul 23, 2026
2 checks passed
@Josie123-Dev

Copy link
Copy Markdown
Member

Thank you @Rampop01 for your contribution

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.

[Hard] Add credential analytics dashboard

2 participants