Backend API for Book Lending application
Add a .env file with the following:
SECRET_COOKIE=your-secret
JWT_SECRET=your-secret
CLOUDINARY_URL=your-cloudinary-url
MONGO_URI=your-mongo-uri
MAILTRAP_USER=your-username
MAILTRAP_PASS=your-password
The API is live at Swagger.io
- Version: 1.0.0
- Author: Tuong Huynh
- Show all books
- Search books by Title
- Pagination
- Show a book
- Add book (Require Admin)
- Update book (Require Admin)
- Delete book (Require Admin)
- Show all users
- Search users by Name
- Pagination
- Add user
- Show user
- Update user
- Delete user
- Show transactions
- Show transactions by User (Show all transactions if Admin)
- Search transactions by Id
- Pagination
- Show transaction (If user is not own this transaction, don't show)
- Add transaction (Require Admin)
- Update transaction (Require Admin)
- Delete transaction (Require Admin)
- Make finished (Require Admin)
- Register (Unique email)
- Login (JWT Token)
- Get user info
- Update info (name, phone)
- Update avatar
- Change password
- Add to cart
- Change quantity (decrease button, increase button, input number)
- Make transaction from cart (Require Auth)
- Auto delete items in cart after made transaction