Skip to content

udofia2/bibliotheca

Repository files navigation

Laravel Logo

Build Status Total Downloads Latest Stable Version License


Book Collection

Video Demo

Vidoe Demo

This is a Laravel & Inertia.js-based Book Collection application. It allows users to manage a collection of books, including functionalities to filter, view, create, edit, and delete books. The frontend is built using Vue.js and styled with Tailwind CSS.

Features

  • CRUD Operations: Create, Read, Update, and Soft Delete books.
  • Filter Books: Filter by status (available, borrowed, reserved) and published year.
  • Pagination: Paginated list of books with dynamic per-page item selection.
  • Responsive Design: Clean, mobile-first UI built with Tailwind CSS.

Requirements

Before you begin, ensure you have the following installed:

  • PHP (>= 8.1)
  • Composer
  • Node.js & NPM
  • Laravel (>= 9.x)
  • MySQL or any other database supported by Laravel

Setup Instructions

Follow the steps below to get your environment up and running.

1. Clone the Repository

git clone https://github.com/udofia2/bibliotheca.git
cd bibliotheca

2. Install Backend Dependencies

Install PHP dependencies using Composer:

composer install

3. Set up Environment Variables

Copy the .env.example file to .env:

cp .env.example .env

Edit the .env file to configure your database and other environment settings:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=bibliotheca
DB_USERNAME=root
DB_PASSWORD=

4. Generate Application Key

Run the following command to generate the application key:

php artisan key:generate

5. Run Migrations

Run the migrations to create the necessary database tables:

php artisan migrate

6. Seed the Database

If you'd like to populate the database with sample data, you can run:

php artisan db:seed

7. Install Frontend Dependencies

Install the frontend dependencies using NPM:

npm install

8. Build the Assets

Build the frontend assets:

npm run dev

9. Run the Application

Start the Laravel development server:

php artisan serve

Now, you can access the application by visiting http://127.0.0.1:8000 in your browser.


Usage

Pages

  1. Books Index: Displays a paginated list of books with filtering options (by status and year).
  2. Book Show: Displays the details of a single book.
  3. Create Book: A form to add a new book to the collection.
  4. Edit Book: A form to edit an existing book's details.

Filtering

You can filter the books by:

  • Status: Choose from available, borrowed, or reserved.
  • Year: Enter a specific year to filter books by their published year.

Pagination

The list of books is paginated. By difault the items per page is 3 but you can adjust with a query param ?page=1&perPage=2 (Example: http://localhost:8000/books?page=1&perPage=2)

Testing

To run tests:

php artisan test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages