Skip to content

feat: FAQ portal, earnings analytics, sponsor checkout & admin moderation#3

Closed
AugistineCreates wants to merge 5 commits into
mainfrom
feat/learnvault-dashboard-features
Closed

feat: FAQ portal, earnings analytics, sponsor checkout & admin moderation#3
AugistineCreates wants to merge 5 commits into
mainfrom
feat/learnvault-dashboard-features

Conversation

@AugistineCreates
Copy link
Copy Markdown
Owner

@AugistineCreates AugistineCreates commented May 28, 2026

closes bakeronchain#144
closes bakeronchain#148
closes bakeronchain#146
closes bakeronchain#147

This PR delivers four major interactive frontend features requested across separate issues. Each feature has been implemented cleanly, following the project's premium design guidelines (glass-morphism, dark-mode styling, responsive layouts, and rich animations) with unit tests for each component.


1️⃣ Advanced FAQ & Help Center Portal (/faq)

An interactive FAQ page built to handle high user engagement.

  • Interactive Accordions — Custom accessible accordion widgets with smooth chevron-rotation transitions, full keyboard navigation support, and correct ARIA states.
  • Instant Search — High-performance client-side keyword filtering that narrows down matching questions in real-time as the user types.
  • Feedback System — Helpfulness rating system (thumbs up/down) with interactive state transitions and visual confirmation.
  • Premium Aesthetics — Vibrant background glow, glass-card layouts, and responsive font hierarchy.

Files Created/Modified:

  • src/components/FAQSection.tsx (Core accordion & search component)
  • src/components/FAQSection.test.tsx (Unit tests)
  • src/pages/FAQPage.tsx (FAQ route page with SEO tags)

2️⃣ Interactive Earnings & Payout Analytics (/donor page)

A premium data visualization dashboard designed to give creators and donors direct insight into their financial activity.

  • Recharts Area & Line Charts — Highly interactive, custom-styled charts with smooth gradient fills under the curves to track volume, gas costs, and net royalties over time.
  • Dynamic Time Interval Selector — Seamlessly toggle between 7 Days, 30 Days, and Year-to-Date (YTD) views with clean, animated transitions.
  • Premium Custom Tooltips — Sleek hover overlays showing real-time transaction details, gas cost breakdowns, and net payouts.
  • Responsive Legend — Informative and interactive chart legend matching the design system.

Files Created/Modified:

  • src/hooks/useEarningsAnalytics.ts (Mock data generation & date aggregation hook)
  • src/components/donor/EarningsAnalytics.tsx (Recharts integration component)
  • src/components/donor/EarningsAnalytics.test.tsx (Unit tests)
  • src/pages/Donor.tsx (Integrated analytics onto the live donor dashboard)

3️⃣ "Sponsor a Student" Scholarship Checkout (/sponsor/checkout)

A robust checkout page built to facilitate bulk licensing of courses for students.

  • Bulk Address Input — Multi-input textarea supporting comma, space, semicolon, and newline-separated Stellar wallet addresses, as well as drag-and-drop CSV/TXT file upload.
  • Real-Time Address Validator — Instant client-side validation that verifies Stellar syntax (correct G-prefix, 56 characters, valid base32 alphabet) and provides detailed inline badge feedback.
  • Gas & License Fee Estimator — Live calculation panel detailing standard license fees ($25/student) and Stellar network gas buffer estimates (0.05 XLM/student) converted into a USD grand total.
  • Interactive Receipt State — Beautiful confirmation panel upon successful checkout featuring recipient directories, a mock transaction hash link to the Stellar explorer, and one-click copy buttons.

Files Created/Modified:

  • src/components/sponsor/SponsorCheckout.tsx (Checkout and address validator UI)
  • src/components/sponsor/SponsorCheckout.test.tsx (Unit tests)
  • src/pages/SponsorCheckoutPage.tsx (Sponsor checkout route page)

4️⃣ Admin Content Moderation Dashboard (/admin/moderation)

A secure control panel enabling authorized administrators to moderate user uploads.

  • Moderation Feed Table — Structured data grid highlighting flagged materials, reasons for reporting, reporting users, and flagging dates.
  • Action Panel — Instant response actions (Approve, Deny, Suspend User) wired with visual feedback and integrated to communicate with /api/moderation/:id/:action.
  • Admin Authentication Gate — Fully protected route redirecting unauthorized users using the project's secure getAuthToken() middleware.

Files Created/Modified:

  • src/components/admin/ModerationSection.tsx (Moderation table & actions UI)
  • src/pages/AdminModeration.tsx (Authenticated wrapper page)
  • src/App.tsx (Registered routes and implemented lazy loading for all new pages)

🛠️ Routes Added

Route Path Feature
/faq Interactive Help Center & FAQ
/sponsor/checkout Bulk Student Scholarship Checkout
/admin/moderation Secured Content Moderation Control Panel

🧪 Testing Summary

  • Added comprehensive unit tests using Vitest and React Testing Library to verify interactive behaviors (such as accordion toggling, instant search, file uploads, address verification, and timeframe switches).
  • Run npm run test to verify all test suites pass.

@AugistineCreates AugistineCreates deleted the feat/learnvault-dashboard-features branch May 28, 2026 11:08
@AugistineCreates AugistineCreates restored the feat/learnvault-dashboard-features branch May 28, 2026 11:08
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.

Design ScholarNFT credential artwork (SVG template) Implement ScholarNFT initialize and admin storage

1 participant