A comprehensive Library Management System designed to automate book rentals, tracking, and payments. The system features real-time notifications via Telegram and automated fine calculations for overdue returns.
- User Management: Secure JWT authentication and profile management.
- Book Inventory: Full CRUD for books with automated stock tracking.
- Borrowing Logic: Borrow books with inventory validation (prevents borrowing out-of-stock items).
- Automated Payments: Integrated with Stripe API for renting fees and overdue fines.
- Telegram Notifications: Instant alerts for new borrowings and returns.
- Daily Overdue Check: Automated Celery Beat tasks to notify administrators about overdue books every morning.
- API Documentation: Interactive documentation via Swagger.
- Python 3.12 / Django / Django REST Framework
- PostgreSQL (Database)
- Redis & Celery (Background tasks & scheduling)
- Stripe API (Payment processing)
- Docker & Docker Compose (Containerization)
- Telegram Bot API
git clone [https://github.com/nastyagst/Library-Service-Project.git]
cd library-service-apiPOSTGRES_DB=library POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres POSTGRES_HOST=db POSTGRES_PORT=5432
STRIPE_SECRET_KEY=your_stripe_secret_key TELEGRAM_BOT_TOKEN=your_bot_token TELEGRAM_CHAT_ID=your_chat_id
docker-compose up --builddocker-compose exec app python manage.py createsuperuserOnce the server is running, you can access the documentation at:
The project is covered by a comprehensive test suite (Users, Books, Borrowings, Payments).
docker-compose exec app python manage.py testThe bot notifies the administrator when:
-
A new borrowing is created.
-
A book is returned.
-
Every morning, it sends a summary of all overdue borrowings (via Celery Beat).