WP Manifestindependent plugin directory
manifest / content / wordpress-library-manager-plugin

Library Manager

Stores books in a custom database table, exposes a secure REST API, and provides a React-based admin interface.

by Antigravity · github.com/emon0196/wordpress-library-manager-plugin

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/emon0196/wordpress-library-manager-plugin/archive/refs/heads/main.zip

WordPress Library Manager

A comprehensive WordPress plugin for managing a library of books. Features a custom database table, a secure REST API, and a React-based Admin Dashboard.

Features

  • Custom Database Table: Optimized storage for book records.
  • REST API: Full CRUD operations with secure authentication (Nonce & Capabilities).
  • React Admin Dashboard: Modern Single Page Application (SPA) for managing books.
  • Filtering & Pagination: Efficient data handling.
  • Status Management: Visual indicators for book availability.

Installation

  1. Download the plugin ZIP file from GitHub.
  2. Go to your WordPress Admin -> Plugins -> Add New -> Upload Plugin.
  3. Upload wordpress-library-manager.zip and Activate.
  4. Upon activation, the database table wp_library_books will be created automatically.

Usage

Navigate to Library Manager -> Dashboard in the admin menu.

  • Add Book: Click "Add New Book", fill in the details (Title, Author, Year, Status) and save.
  • Edit Book: Click the "Edit" button on any book row.
  • Delete Book: Click the "Delete" button (requires confirmation).
  • Filter: Use the status dropdown to filter the list.

REST API Documentation

Base URL: /wp-json/library/v1

Get Books

  • Endpoint: GET /books
  • Params: page, per_page, status, author, year
  • Response: List of books object.

Get Single Book

  • Endpoint: GET /books/{id}
  • Response: Single book object.

Create Book

  • Endpoint: POST /books
  • Headers: X-WP-Nonce: <nonce>
  • Body: { "title": "...", "author": "...", ... }
  • Response: Created book object.

Update Book

  • Endpoint: PUT /books/{id}
  • Headers: X-WP-Nonce: <nonce>
  • Body: Fields into update.

Delete Book

  • Endpoint: DELETE /books/{id}
  • Headers: X-WP-Nonce: <nonce>
  • Status: 204 No Content.

Development

  1. Clone the repository.
  2. Run npm install to install dependencies.
  3. Run npm start for development (hot reloading).
  4. Run npm run build for production build.

License

GPL-2.0-or-later