Learning Management System

Sadusha Nadeesh
5 min readJun 4, 2021

--

LMS with Angular, NestJs, TypeORM and MySQL

This mock project is designed as par to the completion of training session and I would like to thank Krish for all the support given.

Abstract

OBJECTIVE :

This project “Learning Management System” is to design and develop an automated web application for managing the distance learning process of schools via Internet.

The system consists of registration module for the students to login and also a new user signup where the new students can register themselves. The students who were successfully registered, they can access the Subject wise modules, online quizzes and news center. Learning materials are categorized according to the grades and not eligible to take a test in the other levels.

PROJECT OVERVIEW :

In the existing learning system all the students are required to gather at a common location at a particular time to attend the lectures, because of which it lacks Geographical independence and Time independence. The students must attend the training classes as per the pre-defined schedule and they need to contact the training administrator if they desire to do a course and wait for the administrator to grant permission for taking the course Since the evaluation of test papers is done manually it takes more time and there is a chance that errors may creep in during the evaluation.

The students cannot pursue a course of his/her choice at any time, as the training for that course may not be available at that instant. The student has to wait for the training to conclude even if he/she is familiar with the course content and wants to write the test and they even need to contact the training staff for the study material and test result details. Since the details of all the students who are undergoing training are maintained manually it is difficult to search for required details and generate reports

MODULES :

This project involves mainly four modules.

1) Teacher module

2) Test module

3) User module

4) Email module

5) Inventory module

As per the time being this the project was only able to completed teacher module, test module and user module.

MODULES DESCRIPTION :

User module :

This module will provide registration and login. All the users are register with relevant grades and administrator can change the roles of the users for the privileges.

Teacher Module :

This module having privileges according to the role and can add subjects, contents relevant to each subjects and blog post creation.

Test module :

This module manages the quizzes/assignment creation. users can view each assignments and quizzes according to his/her grade. After each quizzes/assignment the results will be released instantly and the marks will enter to the respected database.

Email module :

This module will handles the email notifications and purchase emails etc. This module is yet to be developed.

Inventory module :

This module handles the inventory/shop for the users to order items through the application. This module too yet to be developed.

Tech stack/Environment

For the front-end: Angular (11.2.4)

For the back-end: Node Js (14.16.0), Nest Js, Type ORM with MySQL.

Introduction

The proposed system is designed to efficient management and to continue the education curriculum throughout the country without hold. With the Covid pandemic the education system was collapsed, and students had to face many challenges when learning.

There are many problems other than attending classes/school in a situation like a pandemic etc.

1. The students are not able to be attending to school with the lack of transportation, curfew situations etc.

2. If somehow a student absent, he/her will not be able to take that specific class session again.

Objective

As a Solution for those problems, this is a web solution where the students can learn like they were in school, classroom from home in a crisis.

• We are going to make an online Subject wise for each grade education management system.

• This is a web-based application so students can access anywhere remotely.

• This helps to face similar situation in the future, students can focus on learning.

  • Apart from a crisis, students can get to know educational news, notices etc.

Benefits

1. Teaching aids multimedia.

2. Online availability of subject material upgraded constantly.

3. 24/7 * 365 availability.

4. E -Library.

5. Lesser time consumption.

Architecture

This web application consists with main Services like,

1. Teacher module

- This manages the grade wise curriculum, online educational materials for each subject for each grade.

2. Auth module

- This service manages the student activities, student registry and grade enrollment.

3. Test module

- This Service manages the online quizzes, assessment creation, marks calculation.

4. Email module

  • This manages the applications email notifications.

5. Inventory module

  • This manages the online shop and ordering process.

(Email module and Inventory module still not developed)

Overview/ Code review

Auth module

User registration and login is a crucial and important process for almost every web application.

Authentication is an essential part of most applications. There are many different approaches and strategies to handle authentication. The approach taken for any project depends on its particular application requirements.

Creating Auth module

Back-end:

Create a nestJS application.

nest new auth-service

Then install necessary packages libraries,

for the database communication, used TypeORM with MySQL

npm install --save @nestjs/typeorm typeorm mysql2

Passport is the most popular node.js authentication library, well-known by the community and successfully used in many production applications.

For this project I used JWT functionality of NestJS.

  • Allow users to authenticate with username/password, returning a JWT for use in subsequent calls to protected API endpoints. We’re well on our way to meeting this requirement. To complete it, we’ll need to write the code that issues a JWT.
  • Create API routes which are protected based on the presence of a valid JWT as a bearer token

Syntax,

$ npm install --save @nestjs/jwt passport-jwt
$ npm install --save-dev @types/passport-jwt

for more security you can use Authguards.

Finally for the cookies,

npm i cookie-parser
npm i -D @types/cookie-parser

After all the necessary packages and libraries installation, we have to implement nestJS modules, controllers and services.

Modules

nest g module users

A module is a class annotated with a @Module() decorator. The @Module() decorator provides metadata that Nest makes use of to organize the application structure.

When we using JWT, we have to import it to the module.

It is best to use CLI commands to execute file creation. Otherwise you may miss some imports.

Controller

nest g controller users

A controller’s purpose is to receive specific requests for the application. The routing mechanism controls which controller receives which requests. Frequently, each controller has more than one route, and different routes can perform different actions.

In order to create a basic controller, we use classes and decorators. Decorators associate classes with required metadata and enable Nest to create a routing map (tie requests to the corresponding controllers).

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response