Library Management is a full-stack Next.js application developed in March 2025 for a client to manage a library system. It supports user authentication, book browsing, borrowing with a limit of 3 books, and fine calculation for overdue returns, all powered by MongoDB for robust data management. Users can search books, view borrowing history, and manage profiles, while admins can add, edit, or delete books and view user details. Built with Next.js, React, Tailwind CSS, JavaScript, and MongoDB, the site ensures a responsive and intuitive experience, showcasing skills in database integration, dynamic routing, and modern UI design.

The landing page displays a grid of book cards with images and IDs, accessible only after login, with a navbar containing History and Login (or profile icon post-login).
Unauthenticated users clicking cards or navbar items are redirected to the /login route.


Unauthenticated users are redirected to the /login route, featuring a login form, with an option to navigate to the /register route for account creation.
Post-login, users see their profile image or first name’s initial in the navbar on the landing page.


Clicking a book card navigates to the /user route, showing detailed book information on the left with a 'Borrow Book' button, 'Return Book' if borrowed, or messages like 'No more books in the stock' or 'Maximum book borrow limit (3) has reached.'
The right side displays the user’s borrowed books with images, borrow dates, expired dates, and a red pop-up for overdue fines (100 TK per book per day, e.g., 400 TK for two books overdue by two days).





A search input box on the landing page allows users to filter book cards by title, author, genre, or ID, providing real-time results with MongoDB queries.

The /history route, accessible via the navbar, displays the user’s lifetime borrowing history in book cards, each showing the book image, borrowing date, and returning or expired date.

The /profile route shows the user’s personal information from registration, with options to upload, change, or remove a profile photo, update name, bio, password (but not email), and log out.

Admins access all user features plus two additional navbar items: Users and Admin. The /admin route allows adding new books via a form on the left and viewing/editing/deleting existing books in a row-based list on the right.
Books cannot be deleted if currently borrowed by any user, with MongoDB ensuring data integrity.

The /allUsers route, accessible to admins via the navbar, displays all user information in card format, including user image, name, email, and phone.

Built with Next.js for server-side rendering and dynamic routing, ensuring fast performance and SEO-friendly content delivery.
Integrates MongoDB for robust, real-time book and user data management, with Tailwind CSS for responsive, utility-first styling.