Skip to content

Library-Management-System using MERN stack to perform CRUD across multiple documents

Notifications You must be signed in to change notification settings

sayakghorai34/Library-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go to the link for the UI-Preview: fronend/README.md

Live Link of the Project:

Basic Run Through of the Project

Screen.Recording.2024-03-29.at.11.30.52.PM.mov

How to run the project

  1. Clone the repository
git clone https://github.com/sayakghorai34/Library-Management-System.git
  1. Open the terminal and navigate to the project directory
cd Library-Management-System
  1. Go to backend directory and install dependencies
cd backend
npm install
  1. Locate and rename the .env.example file in the backend to .env and add the following environment variables
PORT=define any suitable port
MONGODB_URI=your mongodb connection string
  1. Run the following command to start the server
npm start

How to run the Client

  1. Go to the frontend directory and install the dependencies
cd frontend
npm install
  1. rename the .env.example file in the frontend to .env and add the following environment variables:
REACT_APP_API_URI=http://localhost:<port>/api

(Note: the URI should end with /api. Else The below modification needs to be done on the backend/server.js)

app.use('/api/books', bookRoutes);  //replace these /api with your URI trailer

app.use('/api/borrowers', borrowerRoutes);  //replace these /api with your URI trailer

app.use('/api/authors', authorRoutes);  //replace these /api wwith your URI trailer

app.use('/api/counts', countRoutes);    //replace these /api wwith your URI trailer
  1. Run the following command to start the client
npm start
  1. Open the browser and navigate to http://localhost:3000/ to view the client

Note:

  • Test(useless).js is just a checking file to see if the server is running or not. It is not a part of the project
  • Run the server before running the client(else the client will not fetch data until the server is running)
  • The project is still under development and some features may not work as expecte
  • the npm start command will start the server using nodemon. To change the behaviour, change the start script in package.json file in the backend directory
  • The project is still under development and hence the Demo UI or the video may not be exact same as the current UI

Contributed by: