Skip to content

Latest commit

 

History

History
102 lines (81 loc) · 2.73 KB

README.md

File metadata and controls

102 lines (81 loc) · 2.73 KB

Library API 📚

DRF Team Project

The goal of this project is to implement an online management system for book borrowing. This system will streamline the library's administrative processes and greatly improve the user experience.

📍 Features

Functional :

  • Web-based
  • Manage books inventory
  • Manage books borrowing
  • Manage customers
  • Display notifications
  • Handle payments

Non-functional :

  • 5 concurrent users
  • Up to 1000 books
  • 50k borrowings/year
  • ~30MB/year

⚙️ Installation

  1. Python3 must be already installed.

    git clone https://github.com/lgSilay/library-service-project.git
    cd library-service-project
    python3 -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
    pip install -r requirements.txt
    #create .env file based on env.sample
    python manage.py makemigrations
    python manage.py migrate
  2. Load prepared data:

    python3 manage.py loaddata library_serice_data.json
    
  3. After loading, by default, you will have these users:

    • Admin user: user1@email.com
    • Default users:
      • user2@email.com
      • user3@email.com
      • user4@email.com
      • user5@email.com
  • Password for any of them: GGduIU@

🐳 Run with Docker

Docker should be installed.

docker-compose up --build

✅ Accessing the Application

You can now access the API by opening your web browser and navigating to http://localhost:8000.

🧾 Available urls

📕 Book Service

  • api/books/books/

  • api/books/books//

  • api/books/books//upload-image/

  • api/books/books/?title=...&author-id=...&author-first-name...&author-last-name=...&available&unavailable

  • api/books/authors/

  • api/books/authors//

  • api/books/authors//upload-image/

  • api/books/authors//subscribe

  • api/books/authors/?books-count=...&books-gt=...&books-lt=...&first-name=...&last-name=...&no-books&has-books

👤 Users Service

  • api/user/register/
  • api/user/token/
  • api/user/token/refresh/
  • api/user/token/verify/
  • api/user/me/
  • api/user/telegram

🤝 Borrowings Service:

  • api/borrowing_service/borrowings/
  • api/borrowing_service/borrowings/?user_id=...&is_active=...
  • api/borrowing_service/borrowings//
  • api/borrowing_service/borrowings//return

💸 Payments Service

  • api/payments/payments/
  • api/payments/payments//
  • api/payments/payments//renew/
  • api/payments/payments/success/
  • api/payments/payments/cancel/

📃 Documentations

  • api/doc/swagger/
  • api/doc/redoc/

📋 DB structure

DB structure