In the modern e-learning ecosystem, personalized dashboards have become a necessity. Students, trainers, and administrators want tailored insights—like progress tracking, suggested courses, and learning analytics. By integrating AI models, these dashboards can recommend courses, identify weak areas, and even predict student performance.
This article will guide you step by step to build a production-ready AI-powered personalized learning dashboard using:
Angular for frontend
ASP.NET Core Web API for backend
ML/AI services for recommendations and analytics
We will focus on dynamic dashboards, personalization, data persistence, and scalability.
1. Understanding the System Architecture
A modern AI-powered learning dashboard has three main layers:
1. Frontend (Angular)
Displays widgets like Course Progress, Recommended Lessons, Performance Graphs
Sends user actions and feedback to the backend
Supports dynamic widgets and drag-drop layouts
2. Backend (ASP.NET Core)
Serves API endpoints for user data, courses, and analytics
Integrates AI/ML models to generate recommendations
Stores user preferences and dashboard layout
3. AI Service / Machine Learning
Recommends courses or content using collaborative filtering or content-based models
Predicts student performance based on historical activity
Suggests skill gaps and next learning steps
High-Level Flow
User -> Angular Frontend -> ASP.NET Core API -> AI/ML Service
<- Response <- <- Predictions/Recommendations
2. Project Setup
Step 1: Create Backend Project
dotnet new webapi -n LearningDashboardAPI
cd LearningDashboardAPI
Step 2: Install Required Packages
For ML.NET recommendations or predictive models:
dotnet add package Microsoft.ML
dotnet add package Microsoft.ML.Recommender
For AI/ML API integration:
dotnet add package System.Net.Http.Json
Step 3: Create Models
Models/UserDashboard.cs
public class UserDashboard
{
public string UserId { get; set; } = string.Empty;
public List<WidgetConfig> Widgets { get; set; } = new List<WidgetConfig>();
}
Models/WidgetConfig.cs
public class WidgetConfig
{
public string Id { get; set; } = Guid.NewGuid().ToString();
public string Type { get; set; } = string.Empty; // progress, recommendations, charts
public string Title { get; set; } = string.Empty;
public int PositionX { get; set; }
public int PositionY { get; set; }
public int Width { get; set; } = 300;
public int Height { get; set; } = 250;
}
Models/CourseRecommendation.cs
public class CourseRecommendation
{
public string CourseId { get; set; } = string.Empty;
public string CourseName { get; set; } = string.Empty;
public double Score { get; set; }
}
3. AI-Based Recommendation Service
Step 1: Using ML.NET Collaborative Filtering
using Microsoft.ML;
using Microsoft.ML.Trainers;
public class RecommendationService
{
private MLContext _mlContext;
private ITransformer? _model;
public RecommendationService()
{
_mlContext = new MLContext();
TrainModel();
}
private void TrainModel()
{
// Sample: user-course interactions
var data = _mlContext.Data.LoadFromTextFile<UserCourseData>("Data/UserCourses.csv", hasHeader: true, separatorChar: ',');
var pipeline = _mlContext.Recommendation().Trainers.MatrixFactorization(
new MatrixFactorizationTrainer.Options
{
MatrixColumnIndexColumnName = nameof(UserCourseData.UserId),
MatrixRowIndexColumnName = nameof(UserCourseData.CourseId),
LabelColumnName = nameof(UserCourseData.Rating),
NumberOfIterations = 20,
ApproximationRank = 100
});
_model = pipeline.Fit(data);
}
public float PredictRating(int userId, int courseId)
{
if (_model == null) return 0;
var predictionEngine = _mlContext.Model.CreatePredictionEngine<UserCourseData, CourseRatingPrediction>(_model);
return predictionEngine.Predict(new UserCourseData { UserId = userId, CourseId = courseId }).Score;
}
}
Models/UserCourseData.cs
public class UserCourseData
{
public int UserId { get; set; }
public int CourseId { get; set; }
public float Rating { get; set; }
}
public class CourseRatingPrediction
{
public float Score { get; set; }
}
Step 2: Expose Recommendations via API
[ApiController]
[Route("api/[controller]")]
public class RecommendationsController : ControllerBase
{
private readonly RecommendationService _recommendationService;
public RecommendationsController(RecommendationService recommendationService)
{
_recommendationService = recommendationService;
}
[HttpGet("{userId}")]
public IActionResult GetRecommendations(int userId)
{
var recommendedCourses = new List<CourseRecommendation>();
for (int courseId = 1; courseId <= 10; courseId++)
{
recommendedCourses.Add(new CourseRecommendation
{
CourseId = courseId.ToString(),
CourseName = $"Course {courseId}",
Score = _recommendationService.PredictRating(userId, courseId)
});
}
var sorted = recommendedCourses.OrderByDescending(c => c.Score).ToList();
return Ok(sorted);
}
}

Join the conversation! Your thoughts help the community grow.