A full-stack library management system built with modern web technologies and enterprise-oriented database design principles.
The project follows a Monorepo architecture and implements advanced database techniques such as Transactions, Row-level Locking, Stored Procedures, and Triggers to ensure data consistency and reliability across borrowing, returning, and payment workflows.
- Book inventory management
- Borrow / return workflow
- Reader account management
- Staff management system
- Authentication & role-based authorization
- Stored Procedures for business operations
- Database Triggers for automated workflows
- Row-level locking using
FOR UPDATE - Automatic overdue fine generation
- Automatic reader suspension/reactivation
- Monorepo architecture
- RESTful API design
- JWT Authentication
- Modular backend structure
- Responsive frontend dashboard
- ReactJS
- Vite
- TailwindCSS
- Axios
- NestJS
- TypeScript
- MySQL2
- MySQL 8+
- Stored Procedures
- Triggers
- Views
- Transactions
Library-management/
├── backend/ # NestJS API server
├── frontend/ # React frontend application
├── database/ # SQL initialization scripts
├── package.json
└── README.md
Before running the project, make sure the following tools are installed on your machine:
- Git
- Node.js (LTS version recommended)
- MySQL 8+
Recommended database tools:
- DBeaver
- MySQL Workbench
Clone the repository:
git clone https://github.com/ThaiDevv/FullStack-Project-library-management.gitMove into the project directory:
cd FullStack-Project-library-managementInstall root dependencies:
npm installInstall backend dependencies:
cd backend
npm installInstall frontend dependencies:
cd ../frontend
npm installReturn to the root directory:
cd ..Create a new MySQL database:
CREATE DATABASE railway
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;Import the SQL initialization script located in:
database/init.sql
or:
railway.sql
The script will automatically create:
- tables
- triggers
- stored procedures
- views
- sample data
Create a .env file inside the backend/ directory:
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=
DB_NAME=railway
PORT=3000Start both frontend and backend concurrently:
npm run devFrontend:
http://localhost:5173
Backend API:
http://localhost:3000
Developed collaboratively by:
- Trần Văn Thái
- Trần Văn Ngọc Thắng
- Nguyễn Lê Huy Tâm
- Phạm Bá Trí Tâm
- Nguyễn Ngọc Gia Bảo