Back

Course Recommender System

Mar 17, 2023
Next.jsDjangoDocker
Course Recommender System

For my university's final year project, I proposed a full-stack web application that can recommend relevant courses based on user's inputs. The full-stack web app consists of Next.js and Django app. Additionally, I used Django Rest Framework to enable my Django app to send and receive JSON responses, making it easy for my Next.js app to communicate with the server. I used Supabase for the database as it was free and I didn't want to spend too much on using Amazon's RDS.

Next.js app serves as where the user interacts with the system and visualizes the JSON data from Django app. On the other hand, the Django app handles all logic available from reading and modifying database to generating course recommendations.

Within the Django app, I proposed two types of recommender system, the first one being the Content-Based Filtering (CBF) Recommender System, and Collaborative Filtering (CF) Recommender System. As of writing this post, I had finished the both recommender systems.

For CBF Recommender System, I needed the gather my university's course data before I can do anything. I started with creating a simple web scraper to get a list of offered courses on my university's website and downloaded each course's pdf files. Then I used PyPDF2 to extract the pdf's texts and stored them into the database. Next, I used NumPy and scikit-learn to implement TF-IDF (Term Frequency - Inverse Document Frequency), a Natural Language Processing technique to vectorize each course descriptions and compared each other using Cosine Similarity to generate course recommendations which will be sent as a JSON response from the Django app.

For deployment, both apps were containerized and deployed to Digital Ocean's servers and for the web server, I used Caddy, an alternative to Nginx, to serve the containerized apps. I made these choices to cut down on costs while still maintaining performance.

With this project, I learned a lot, such as learning the new Redux Toolkit as I had only used the old Redux before, learned many new things about Django development as it had several convenient functionalities built-in, and lastly, practiced DevOps by dockerizing and using web servers for deployment.

Lastly, for reading all of this, I present to you, the website link