A comprehensive library management system built with Django that allows users to manage books, rentals, events, and study room reservations.
- User Authentication (Customers, Employees, Authors)
- Book Management
- Rental System
- Study Room Reservations
- Event Management
- Payment Processing
- RESTful API
- Backend: Django 4.2
- Frontend: HTML5, CSS3, Bootstrap 5, JavaScript
- Database: MySQL
- API: Django REST Framework
- Clone the repository:
git clone https://github.com/yourusername/library-management-system.git
cd library-management-system- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
Create a
.envfile in the project root and add:
DEBUG=True
SECRET_KEY=your-secret-key
DATABASE_URL=mysql://user:password@localhost:3306/library_db
- Run migrations:
python manage.py migrate- Create superuser:
python manage.py createsuperuser- Run the development server:
python manage.py runserverlibrary_project/
├── library_project/ # Project configuration
├── library/ # Main application
├── accounts/ # User management app
├── templates/ # HTML templates
├── static/ # Static files
└── manage.py # Django management script
The API endpoints are available at /api/ and include:
- Books
- Rentals
- Events
- Study Rooms
- Customers
- Invoices
- SQL Injection Prevention
- XSS Protection
- CSRF Protection
- Password Hashing
- Session Security
- Input Validation
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.