Efficiently manage books, readers, and lending processes with a robust digital platform
Book Club Library is a comprehensive web application designed specifically for the newly established Book Club Library in Colombo, Sri Lanka. This full-stack solution streamlines library operations by providing digital tools for managing books, readers, and lending processes with modern web technologies.
- Reader Management: Complete CRUD operations for library members
- Book Catalog: Comprehensive book inventory management
- Lending System: Track book loans and returns with due date calculations
- Overdue Management: Monitor and manage overdue books with notifications
- JWT-based authentication and authorization
- Secure password management with bcrypt
- Role-based access control for library staff
- Email notifications for overdue books using Nodemailer
- Automated reminder system for library members
- Audit Logging: Track all system activities for accountability
- Search & Filter: Advanced search capabilities for books and readers
- Responsive Design: Mobile-friendly interface built with Tailwind CSS
- Dashboard Analytics: Overview of library statistics and activities
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Tailwind CSS |
| Backend | Node.js, Express.js, TypeScript |
| Database | MongoDB with Mongoose ODM |
| Authentication | JWT (JSON Web Tokens) |
| Email Service | Nodemailer |
| Development | Nodemon, Vite |
| Security | bcrypt for password hashing |
Book-Club-Library/
โโโ client/ # Frontend (React + TypeScript)
โ โโโ public/
โ โโโ src/
โ โ โโโ assets/ # Static assets
โ โ โโโ components/ # Reusable React components
โ โ โโโ context/ # React context providers
โ โ โโโ pages/ # Page components
โ โ โโโ services/ # API service functions
โ โ โโโ types/ # TypeScript type definitions
โ โ โโโ App.tsx # Main App component
โ โ โโโ App.css # Global styles
โ โ โโโ index.css # Tailwind CSS imports
โ โ โโโ main.tsx # React entry point
โ โ โโโ router.tsx # Application routing
โ โโโ .gitignore
โ โโโ eslint.config.js
โ โโโ index.html
โ โโโ package.json
โ โโโ package-lock.json
โ โโโ README.md
โ โโโ tsconfig.app.json
โ โโโ tsconfig.json
โ โโโ tsconfig.node.json
โ โโโ vite.config.ts # Vite configuration
โ
โโโ server/ # Backend (Node.js + TypeScript)
โ โโโ node_modules/
โ โโโ src/
โ โ โโโ controllers/ # Route controllers
โ โ โโโ db/ # Database configuration
โ โ โโโ errors/ # Error handling
โ โ โโโ middlewares/ # Express middlewares
โ โ โโโ models/ # MongoDB models
โ โ โโโ routes/ # API routes
โ โ โโโ utils/ # Utility functions
โ โ โโโ index.ts # Server entry point
โ โโโ .env # Environment variables
โ โโโ nodemon.json # Nodemon configuration
โ โโโ package.json
โ โโโ package-lock.json
โ โโโ tsconfig.json
โ
โโโ postman/ # API Documentation
โโโ Book-Club-API.json # Postman collection
- Node.js (v16 or higher)
- MongoDB (local or MongoDB Atlas)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/yourusername/book-club-library.git cd book-club-library -
Backend Setup
cd server npm install -
Environment Configuration Create a
.envfile in the server directory:# Database MONGODB_URI=mongodb://localhost:27017/book-club-library # JWT JWT_SECRET=your-super-secret-jwt-key JWT_EXPIRES_IN=7d # Email Configuration (Nodemailer) EMAIL_HOST=smtp.gmail.com EMAIL_PORT=587 EMAIL_USER=your-email@gmail.com EMAIL_PASS=your-app-password # Server Configuration PORT=3000 NODE_ENV=development
-
Frontend Setup
cd ../client npm install -
Start Development Servers
Backend (Port 3000):
cd server npm run devFrontend (Port 5173):
cd client npm run dev
Import the Postman collection for complete API documentation:
- File:
postman/Book-Club-API.json - Base URL:
http://localhost:3000/api
| Method | Endpoint | Description |
|---|---|---|
| Authentication | ||
POST |
/auth/login |
User login |
POST |
/auth/register |
User registration |
POST |
/auth/forgot-password |
Request password reset |
| Readers | ||
GET |
/readers |
Get all readers |
POST |
/readers |
Add new reader |
PUT |
/readers/:id |
Update reader |
DELETE |
/readers/:id |
Delete reader |
| Books | ||
GET |
/books |
Get all books |
POST |
/books |
Add new book |
PUT |
/books/:id |
Update book |
DELETE |
/books/:id |
Delete book |
| Lending | ||
GET |
/lending |
Get lending records |
POST |
/lending |
Create lending record |
PUT |
/lending/:id/return |
Mark book as returned |
GET |
/lending/overdue |
Get overdue books |
POST |
/notifications/overdue |
Send overdue notifications |
- View complete list of registered library members
- Add new readers with detailed information
- Edit existing reader profiles
- Remove readers from the system
- Search and filter functionality
- Comprehensive book catalog display
- Add new books to the library collection
- Edit book information and details
- Remove books from inventory
- Category-based organization
- Issue books to registered readers
- Track all lending transactions
- View complete lending history
- Process book returns
- Calculate and display due dates automatically
- Identify readers with overdue books
- Display detailed overdue information
- Send automated email notifications
- Track overdue duration and penalties
- JWT-based authentication system
- Secure password hashing with bcrypt
- Role-based access control
- Session management and token refresh
- Staff login with secure credentials
- JWT token generation and validation
- Protected routes and middleware
- Session management
- Select reader and available book
- Automatic due date calculation
- Create lending record
- Track lending status
- Process returns and update records
- Identify overdue books automatically
- Generate email notifications
- Send reminders to readers
- Track notification history
Backend:
npm run dev # Start development server with nodemon
npm run build # Build TypeScript to JavaScript
npm start # Start production serverFrontend:
npm run dev # Start Vite development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint- TypeScript for type safety
- ESLint for code linting
- Consistent naming conventions
- Modular architecture
Ensure all environment variables are properly configured:
- Database connection strings
- JWT secrets
- Email service credentials
- API endpoints
# Backend
cd server
npm run build
npm start
# Frontend
cd client
npm run build
# Serve the dist folder with your preferred web server- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name
- GitHub: @Kaif-Zakey
- Email:kaifzakey22@gmail.com
- Book Club Library, Colombo, Sri Lanka for the project requirements
- Open source community for the amazing tools and libraries
- Contributors and testers who helped improve this application
Made with โค๏ธ for Book Club Library Management
ยฉ 2025 Book Club Library System. All rights reserved.