Skip to content

Repository files navigation

Qalam-LMS

A learning management system for university students.

Node.js Express MySQL Sequelize EJS License: ISC


Table of Contents


Project Description

Qalam is a learning management system for university students. It is made in Node/Express with MySQL as the backend database. It utilizes Sequelize ORM for database operations. It uses EJS templating engine to render views. It has a fully responsive UI design to maintain responsiveness across all devices.


Core Functionalities

  1. User Registration and Login: Users can easily register and create an account. They can log in using their credentials to access the app's features.
  2. Admin Login: It allows the admin to log in and create courses, upload content to the courses, and delete courses as well.
  3. Student Login: It provides students to log in, register, and edit their user profile. It allows students to enroll in different courses, access course material, and download them.
  4. Dashboard: The app has a dashboard to display all active courses, ongoing/completed courses as well as other options such as a calendar.

Tech Stack

Layer Technology
Runtime Node.js
Web Framework Express
Database MySQL
ORM Sequelize
Views EJS
Authentication express-session, bcryptjs
Security csurf (CSRF protection)
File Uploads multer
Validation express-validator
Dev Tooling nodemon

Prerequisites

Make sure the following are installed and available on your machine before running the project:

  • Node.js (v16 or later recommended) and npm (bundled with Node.js)
  • MySQL Server (v5.7 or later) running locally on port 3306
  • Git

How to Run

To run this project on your local environment, follow the steps below.

1. Clone the repository

git clone https://github.com/u01qureshi/Qalam-LMS.git
cd Qalam-LMS

2. Install dependencies

Using npm:

npm install

Or using yarn:

yarn install

3. Set up the MySQL databases

The application uses two MySQL databases:

  • lms — stores application data (students, courses, course content, enrollments).
  • session — stores user sessions (created automatically on first run).

Create the databases by logging into the MySQL shell and running:

CREATE DATABASE lms;
CREATE DATABASE session;

The application tables are created automatically on startup via sequelize.sync() — you only need to create the empty databases above.

4. Configure database credentials

The database connection details are defined in two places. Update them to match your local MySQL credentials before running:

  • Application databaseutils/database.js

    const sequelize = new Sequelize('lms', '<your-db-user>', '<your-db-password>', {
        dialect: 'mysql',
        host: 'localhost'
    });
  • Session storeapp.js

    const options = {
        connectionLimit: 10,
        password: '<your-db-password>',
        user: '<your-db-user>',
        database: 'session',
        host: 'localhost',
        port: 3306,
        createDatabaseTable: true
    }

Security note: Credentials and session secrets are currently hardcoded. For a production deployment, move these values into environment variables (e.g. via a .env file loaded with dotenv) and never commit secrets to source control.

5. Start the application

npm run start

This starts the server with nodemon (auto-reload on file changes). Once running, open your browser at:

http://localhost:3000

Project Structure

Qalam-LMS/
├── app.js                 # Application entry point & server setup
├── controllers/           # Route handler logic
│   ├── admin.js
│   ├── auth.js
│   ├── course.js
│   └── student.js
├── middleware/
│   └── is_Auth.js         # Authentication guard
├── models/                # Sequelize models
│   ├── course.js
│   ├── course-content.js
│   ├── student.js
│   └── StudentCourse.js
├── routes/                # Express route definitions
│   ├── admin.js
│   ├── auth.js
│   ├── course.js
│   └── student.js
├── views/                 # EJS templates
├── public/                # Static CSS & client-side JS
├── assets/                # Images, logos, SVGs
├── uploads/               # User-uploaded files
└── utils/
    └── database.js        # Sequelize/MySQL connection

Available Scripts

Command Description
npm run start Starts the server with nodemon (development/auto-reload).

How to Contribute

To contribute into the project, look for already opened issues or open an issue and get it assigned to work on it. Clone the project, create a pull request with meaningful description and link the issue it resolves for better clarity.

Please also review the Contributing Guidelines and the Code of Conduct before submitting changes.

Leave a star ⭐ if you like the project


Project Images

Admin Page Login Page
Register Page Courses Page
Main Page Main Page 2

License

This project is licensed under the ISC License. See the LICENSE file for details.

About

It is a Learning Managment System for university students. It is made in Node, Express, MySQL and EJS templating engine.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages