Skip to content

feat: maintainer dashboard with moderation stats (#239)#261

Open
Peolite001 wants to merge 3 commits into
samieazubike:mainfrom
Peolite001:feat/maintainer-dashboard
Open

feat: maintainer dashboard with moderation stats (#239)#261
Peolite001 wants to merge 3 commits into
samieazubike:mainfrom
Peolite001:feat/maintainer-dashboard

Conversation

@Peolite001

Copy link
Copy Markdown

Closes #239

Summary

A dedicated maintainer dashboard at /maintainer that summarizes pending moderation, recent activity, and provides quick links to moderation tools.

Changes

File Purpose
web/src/app/maintainer/page.tsx Dashboard UI with stats, recent moderation, quick links
web/src/app/api/maintainer/stats/route.ts Protected API endpoint for moderation statistics

Features

Dashboard Cards

  • Pending Review: Count of status: "submitted" projects with link to /queue
  • Total Projects: All-time submission count
  • Contributors: Registered user count

Recently Moderated

  • Last 10 projects approved/rejected in the past 7 days
  • Shows moderator name, date, status badge
  • Links to project detail page

Quick Links

  • Moderation Queue, Admin Panel, Explore, Submit Project

Access Control

Role Behavior
Unauthenticated Redirected to /login?redirect=/maintainer
Contributor (non-maintainer) "Access Denied" page with Go Home button
Maintainer / Admin Full dashboard with live data

Security

  • Client-side: JWT role check before fetching data
  • Server-side: getAuthUser() + role validation on API (403 for non-maintainers)
  • No sensitive data exposed to unauthorized users

Acceptance Criteria

  • Maintainers land on a useful dashboard
  • Contributors see access denied / sign-in required
  • API is protected with 401/403 responses
  • Responsive design matching existing glass-card system

- /maintainer page with pending count, stats cards, recently moderated list
- /api/maintainer/stats API with role-based access control (maintainer/admin)
- Client-side auth check: redirects unauthenticated to /login?redirect=/maintainer
- Contributors see 'Access Denied' instead of dashboard data
- Quick links to moderation queue, admin panel, explore, submit
- Responsive glass-card UI matching existing design system

Closes samieazubike#239
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

@Peolite001 is attempting to deploy a commit to the webverse Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
stellarwavehub Error Error Jul 1, 2026 2:39pm

@samieazubike

Copy link
Copy Markdown
Owner
image I'm always redirect to login when i visit the /maintainer, even tho i'm login as admin

1 similar comment
@samieazubike

Copy link
Copy Markdown
Owner
image I'm always redirect to login when i visit the /maintainer, even tho i'm login as admin

@samieazubike

Copy link
Copy Markdown
Owner
image I'm always redirect to login when i visit the /maintainer, even tho i'm login as admin

Implement middleware to protect admin routes based on token verification.
Redirect non-admin users to login page.
@Peolite001

Copy link
Copy Markdown
Author

Go to /admin instead of /maintainer. You're simply visiting the wrong URL (/maintainer instead of /admin). The navbar correctly links to /admin. Try navigating to /admin directly, or click the Admin link in the navbar when logged in as admin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maintainer dashboard

2 participants