The RESTful API for a library service platform.
- Users can register with their email and password to create an account.
- Users can login with their credentials and receive a JWT token for authentication.
- Users can logout and invalidate their JWT token.
- Users can create and update their profile, including profile picture and other details.
- Users can retrieve their own profile.
- User with admin permission can create/update/retrieve/delete books and category.
- User who is authenticated can retrieve books and category.
- User with admin permission can create/update/retrieve/delete borrowing.
- User who is authenticated can create/retrieve/return borrowing.
- User with admin permission can create/update/retrieve/delete rating.
- User who is authenticated can create/retrieve rating for all books (only one time).
- User who is authenticated can create payments and pay for a start rent the book and can pay for end rent the book.
- When a user rents/returns a book, a message about this is sent to the user by mail or in a telegram channel
- When the user does not return the book within the specified period,
- he is sent a daily message about the debt by mail or in a telegram channel
- User who is authenticated can filtering next endpoint:
- Borrowing (by borrow_date, expected_return, actual_return, book, user);
- Book (by title, author);
- Category (by name);
- Only authenticated users can perform actions such as creating borrowing/payment and add stars to the book.
- User with admin permission can create/update/retrieve/delete user profile, book, category, borrowing, payment,
- Users can update their own profile.
- User can use token authentication (JWT)
- The API well-documented with clear instructions on how to use each endpoint.
- The documentation include sample API requests and responses for different endpoints.
- You can tests next endpoint:
- borrowing;
- book;
- category;
- payment;
- Using Postgres database
- Clone this repository
- Create venv: python -m venv venv
- Activate venv: source venv/bin/activate
- Install requirements: pip install -r requirements.txt
- Run: python manage.py runserver
- Create user via: user/register
- Get access token via: user/token