The dashboard has been transformed from a static mockup to a dynamic, database-driven interface.
A new aggregate endpoint /api/user/dashboard was created to reduce multiple round-trips and provide a cohesive snapshot of the user's state.
- User Stats: Now sourced from
UserStatsContext(which calls/api/user/stats), providing real-time Level, Streak, and XP. - Learning Progress: The
ProgressOverviewcomponent now fetches the user's active roadmaps and their actual completion percentages from theRoadmapCompletiontable. - Activity Feed: The
ActivityFeedcomponent now displays actualXpTransactionlogs, mapping internal reward types (e.g.,TOPIC_COMPLETION) to human-readable actions. - Continue Learning: The "Continue Learning" section now identifies roadmaps the user has actually started, sorting them by the most recently updated.
- Certificates: The certificate widget now queries the
Certificationtable and displays a list of earned credentials with verification links.
- Loading States: Skeleton loaders (via
animate-pulse) have been implemented for all async components to prevent layout shift and improve perceived performance. - Empty States: Proper "No data" views have been added for users who haven't yet started a roadmap or earned a certificate.
The dashboard now reflects the true state of the user's learning journey, eliminating all mock data and providing a real-time window into their progress.