https://github.com/shuvoprogram/build_book_catalog_back-end_prisma
A book catalog is a comprehensive list or database of books, typically organized by various criteria such as author, title, genre, or subject, providing a valuable resource for library management and book enthusiasts.
https://github.com/shuvoprogram/build_book_catalog_back-end_prisma
express jsonwebtoken prisma typescript zod
Last synced: about 2 months ago
JSON representation
A book catalog is a comprehensive list or database of books, typically organized by various criteria such as author, title, genre, or subject, providing a valuable resource for library management and book enthusiasts.
- Host: GitHub
- URL: https://github.com/shuvoprogram/build_book_catalog_back-end_prisma
- Owner: ShuvoProgram
- Created: 2023-09-09T17:18:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-20T10:34:06.000Z (over 1 year ago)
- Last Synced: 2025-02-15T03:29:34.837Z (3 months ago)
- Topics: express, jsonwebtoken, prisma, typescript, zod
- Language: TypeScript
- Homepage: https://book-catalog-backend-topaz.vercel.app/api/v1
- Size: 187 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Book Catalog Backend
This robust backend API powers the Book Catalog application, implementing custom authentication and role-based authorization for managing users, categories, books, and orders.
## Live Link
[Live Link to the API](https://book-catalog-backend-topaz.vercel.app/api/v1/)

**Token-Based Authentication:**
To ensure data security and access control, certain APIs require an authentication token with the appropriate role for CRUD operations, while others are publicly accessible.**Role-Based Authorization:**
For CRUD actions and sensitive operations, please provide a valid authentication token with the correct role to access these APIs securely.## Application Routes
### User
- `POST https://book-catalog-backend-topaz.vercel.app/api/v1/auth/signup`: Create a new user.
- `GET https://book-catalog-backend-topaz.vercel.app/api/v1/users`: Get a list of all users.
- `GET https://book-catalog-backend-topaz.vercel.app/api/v1/users/:id`: Get a single user by ID. Replace `:id` with a valid user ID from the database.
- `PATCH https://book-catalog-backend-topaz.vercel.app/api/v1/users/:id`: Update a user's information by ID. Replace `:id` with a valid user ID from the database.
- `DELETE https://book-catalog-backend-topaz.vercel.app/api/v1/users/:id`: Delete a user by ID. Replace `:id` with a valid user ID from the database.
- `GET https://book-catalog-backend-topaz.vercel.app/api/v1/profile`: Get the profile information of the currently authenticated user.### Category
- `POST https://book-catalog-backend-topaz.vercel.app/api/v1/categories/create-category`: Create a new category.
- `GET https://book-catalog-backend-topaz.vercel.app/api/v1/categories`: Get a list of all categories.
- `GET https://book-catalog-backend-topaz.vercel.app/api/v1/categories/:id`: Get a single category by ID. Replace `:id` with a valid category ID from the database.
- `PATCH https://book-catalog-backend-topaz.vercel.app/api/v1/categories/:id`: Update a category by ID. Replace `:id` with a valid category ID from the database.
- `DELETE https://book-catalog-backend-topaz.vercel.app/api/v1/categories/:id`: Delete a category by ID. Replace `:id` with a valid category ID from the database.### Books
- `POST https://book-catalog-backend-topaz.vercel.app/api/v1/books/create-book`: Create a new book.
- `GET https://book-catalog-backend-topaz.vercel.app/api/v1/books`: Get a list of all books.
- `GET https://book-catalog-backend-topaz.vercel.app/api/v1/books/:categoryId/category`: Get all books within a specific category. Replace `:categoryId` with a valid category ID from the database.
- `GET https://book-catalog-backend-topaz.vercel.app/api/v1/books/:id`: Get a single book by ID. Replace `:id` with a valid book ID from the database.
- `PATCH https://book-catalog-backend-topaz.vercel.app/api/v1/books/:id`: Update a book by ID. Replace `:id` with a valid book ID from the database.
- `DELETE https://book-catalog-backend-topaz.vercel.app/api/v1/books/:id`: Delete a book by ID. Replace `:id` with a valid book ID from the database.### Orders
- `POST https://book-catalog-backend-topaz.vercel.app/api/v1/orders/create-order`: Create a new order.
- `GET https://book-catalog-backend-topaz.vercel.app/api/v1/orders`: Get a list of all orders.
- `GET https://book-catalog-backend-topaz.vercel.app/api/v1/orders/:orderId`: Get a single order by order ID. Replace `:orderId` with a valid order ID from the database.## profile
- `GET https://book-catalog-backend-topaz.vercel.app/api/v1/profile`: Get a single profile by profile ID. Replace `:profileId` with a valid profile ID from the database.
Feel free to use these routes to interact with the Book Catalog Backend API. Make requests to the appropriate endpoints to manage users, categories, books, and orders.