VLibrary is a comprehensive digital library platform transformed into a full-stack DBMS project. It utilizes a modern tech stack to handle book inventory, member registrations, and real-time borrowing transactions with automated fine calculations.
To run this project locally, follow these steps in order:
The project uses a Neon PostgreSQL database. Ensure your .env file in the backend/ folder contains the correct DATABASE_URL.
Initialize the Database: This step creates the tables and inserts initial sample data.
cd backend
npm run init-dbOpen a new terminal and run:
cd backend
npm run devThe server will start on http://localhost:3000.
Open another terminal (in the root project directory) and run:
npm run devThe frontend will be available at http://localhost:5173.
- Frontend: React 19, Vite, Tailwind CSS v4, Bootstrap 5
- Backend: Node.js, Express.js
- Database: Neon PostgreSQL (Cloud)
- Database Driver:
pg(node-postgres)
/pages: React components for Dashboard, Search, Librarian controls, etc./backend: Express server logic./routes: API endpoints for Books, Members, Borrowing, and Fines.database_schema.sql: SQL code for the relational schema.seed_data.sql: Initial sample data.
- Dashboard (
/dashboard): Real-time statistics fetched from Neon DB. - Search Books (
/search-books): Browse and borrow books directly into the database. - Librarian Dashboard (
/librarian): [ADMIN] Add new books, authors, register members, and manage fines/returns. - Reserves (
/reserves): View currently reserved course materials from the DB.
This project implements a normalized relational database with the following entities:
authors- Master list of writers.books- Catalog of book titles and ISBNs.book_copies- Individual physical copies with unique status tracking.members- Registered students and faculty.borrow_records- Live log of which member has which book.reservations- Waitlist for popular items.fines- Automatically generated penalty records for late returns.
- ACID Transactions: Ensures data consistency during borrowing and returns.
- Referential Integrity: Uses Foreign Keys to link authors, books, and members.
- Complexity: Automated fine generation based on
due_datecomparison in SQL. - Normalization: Designed up to 3rd Normal Form (3NF) to minimize redundancy.