Skip to content

Project, for managing local library, where you can borrow books and pay for your borrowings, depending on the days you read the book.

License

Notifications You must be signed in to change notification settings

mkuchuman/DRF-Library

Repository files navigation

DRF Library Project

Overview

This project is a library system built with Django and Django Rest Framework (DRF). It provides an API for managing users, books, and book borrowing, and integrates with Stripe for rental and fine payments.

Features

  • User management (registration, authentication)
  • Book management (CRUD operations)
  • Book borrowing system
  • Integration with Stripe for rental payments and overdue fines
  • Support for periodic payments and reminders
  • Task queuing with Django Q

Technology Stack

  • Python 3.12
  • Django 5.1
  • Django Rest Framework (DRF)
  • Django Q (for task processing)
  • Stripe API (for payments)

Installation

1. Clone the repository

Clone the project from the repository:

git clone https://github.com/your-username/your-repo.git
cd your-repo

2. Install dependencies

Create a virtual environment and install dependencies:

python3 -m venv .venv
source .venv/bin/activate  # Linux/Mac
.venv\Scripts\activate  # Windows
pip install -r requirements.txt

3. Run the migrations:

python manage.py migrate

4. Stripe and Telegram configuration:

To enable payments with Stripe payments and Telegram notifications, edit .env.sample and rename ot into .env:

5. Run the development server

To start the development server:

python manage.py runserver

Running with Docker

To run the project using Docker, execute the following command:

docker-compose up --build

Usage

API Endpoints The main API endpoints include:

api/users/ — User management

api/books/ — Book management

api/borrowings/ — Book

api/payments/ — Payments

About

Project, for managing local library, where you can borrow books and pay for your borrowings, depending on the days you read the book.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published