MyLibrary is a simple library management web application built with Node.js, Express, and MongoDB (using Mongoose). This project demonstrates CRUD operations for managing authors and books, including uploading a cover image for each book.
Below is a grid of screenshots demonstrating various pages of the application:
![]() |
![]() |
![]() |
![]() |
![]() |
-
Author Management:
- Add, update, and delete authors
- View a list of authors
-
Book Management:
- Add, update, and delete books
- Upload a cover image for each book
- View a list of books
-
CRUD Demonstration:
- A simple example to illustrate managing related data using Node.js, Express, and MongoDB
The primary goal of MyLibrary is to serve as a learning tool for basic CRUD operations. It demonstrates how authors and books (with cover images) can be managed using a modern web stack. This project does not include full book file uploads (such as PDFs), keeping the focus on core functionality.
-
Clone the repository:
git clone https://github.com/prashantsaini1525/MyLibrary.git cd MyLibrary
-
Install dependencies:
npm install
-
Set Up Environment Variables:
-
Create a .env file in the root directory with your configuration:
MONGO_URI=your_mongodb_connection_string PORT=3000
- Run the Application:
-
Start the server:
npm start
-
Or use development mode:
npm run devStart
- Access the Application:
- Open your browser and navigate to http://localhost:3000.
-
server.js: Main file setting up Express and connecting to MongoDB.
-
models/: Contains Mongoose models for Authors and Books.
-
views/: Contains EJS templates for rendering the UI.
-
public/: Contains static assets (including cover images).
-
Book File Uploads: Add functionality to allow uploading complete book files (e.g., PDFs) using middleware like Multer.
-
User Authentication: Implement authentication for managing access to book and author data.
-
Enhanced UI/UX: Improve the frontend with modern frameworks or design enhancements.
Contributions are welcome! Feel free to fork the repository, open pull requests, or submit issues with suggestions and bug reports.
This project is licensed under the MIT License. See the LICENSE file for details.