Skip to content

Dashboard implementation#193

Merged
Hexstar-labs merged 2 commits intoBrainTease:mainfrom
teslims2:dashboard-implementation
Mar 30, 2026
Merged

Dashboard implementation#193
Hexstar-labs merged 2 commits intoBrainTease:mainfrom
teslims2:dashboard-implementation

Conversation

@teslims2
Copy link
Copy Markdown
Contributor

PR: Dashboard Implementation

Summary

Implement the missing dashboard shown after login (for authenticated users), with:

  • Welcome message with user name/email
  • BST token balance from GET /users/:id/token-balance
  • Enrolled courses progress from GET /users/:id/progress
  • Recent credentials from GET /credentials/:userId
  • Course title lookup from GET /courses/:id for progress entries

Implementation details

  • New route: apps/frontend/src/app/dashboard/page.tsx
  • Locale-aware route link: apps/frontend/src/app/[locale]/dashboard/page.tsx
  • Protected route handling using existing ProtectedRoute and auth context
  • Navbar updated to include /dashboard

UX/Loading

  • Skeleton loaders while API data loads
  • Graceful message when no enrolled courses/credentials exist
  • Error banner when dashboard data fetch fails

Tests & mocks

  • Added apps/frontend/src/__tests__/pages/DashboardPage.test.tsx
  • Updated MSW handlers in apps/frontend/src/__tests__/mocks/handlers.ts for dashboard endpoints (/users/me, /users/:id/token-balance, /users/:id/progress, /credentials/:userId, /courses/:id)

Notes

  • On first run, install dependencies and fix k6@^0.50.0 resolution issue in pipeline if needed.
  • Branch pushed to dashboard-implementation.
  • Open PR on GitHub: https://github.com/teslims2/Brain-Storm/pull/new/dashboard-implementation
    #Closes Frontend: Dashboard — build student dashboard page #35

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 29, 2026

@teslims2 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Hexstar-labs Hexstar-labs merged commit cda70a0 into BrainTease:main Mar 30, 2026
3 of 13 checks passed
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.

Frontend: Dashboard — build student dashboard page

2 participants