A web-based library management system built with Node.js, Express, MySQL and EJS templating.
- User authentication (Admin/Student roles)
- Book management (Add, search, download)
- Article management (Create, view)
- Student feedback system
- Book transaction tracking
- Image gallery
- Responsive design
- Backend: Node.js, Express
- Database: MySQL
- Views: EJS templates
- Frontend: HTML, CSS, Bootstrap
- Authentication: Passport.js
- File uploads: express-fileupload
- Clone the repository
git clone https://github.com/Namithesh/modern-library.git
cd modern-library- Install dependencies
npm install- Configure environment variables Create a
.env
file with:
DB_HOST=localhost
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_DATABASE=library
SESSION_SECRET=your_session_secret
- Initialize MySQL database
- Create a database named
library - Import schema from
sql.txt
- Start the server
npm startThe app will be running at http://localhost:3000
- Manage books and articles
- Track book transactions
- View student feedback
- Manage student accounts
- Upload gallery images
- Browse and download books
- Create and view articles
- Submit feedback
- View gallery
├── client/ # Frontend assets
├── server/ # Backend code
│ ├── models/ # Database models
│ ├── routes/ # Route handlers
│ ├── auth.js # Authentication
│ └── server.js # Entry point
├── views/ # EJS templates
└── static/ # Static files