Skip to content

A simple library management system implemented in nodejs with mysql database

Notifications You must be signed in to change notification settings

v1bh475u/Library_Management_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library Management System

This is a simple library management system that allows users to add, delete, and search for books in a library. The system is implemented in node.js,ejs and mysql.

Setup

  1. Clone the repository
  2. Go to your sql command line and write the following:
source path/to/db.sql

Note: The path must be absolute path to the db.sql file present in the repository. 3. Go to the cloned repository and run the following command:

npm install
  1. Add your mysql username and password in the .env file. You can change the port number in the .env file as well.
  2. Run the following command to start the server:
npm start
  1. Go to your browser and type the following in the address bar:
localhost:the_port_number_you_specified

Features

A user can:

  1. Request to checkin/checkout a book.
  2. Request for admin privileges.
  3. View his/her borrowing history.
  4. Search for books.
  5. View all books.

An admin can do all the above and:

  1. Add a book.
  2. View all the requests made by users.
  3. Approve/Reject a user's request.

Feedback System: User gets notified when his/her request is approved/rejected.

Security

  • Passwords are hashed and salted before storing in the database.
  • SQL injection is prevented by using prepared statements.
  • JWT tokens are used for authentication.
  • Authentication checks are in place for all routes.

Spam-proof!

Users can request for a book only once before the admin approves/rejects the request.

Users can request for admin privileges only once before the admin approves/rejects the request.

Default Admin: {username: admin, password: admin}

About

A simple library management system implemented in nodejs with mysql database

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published