Skip to content

titoRoosch/bookProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Book Management System

A full-stack system for managing books and authors built with Laravel 10, Vue 3, Inertia.js, Pinia, and Docker.

About the Project

This application allows users to create, view, update, and delete books and authors. It features:

  • Filterable and sortable book listing
  • Many-to-many relationships between books and authors
  • Real-time dashboard with metrics and charts
  • Full test coverage with Pest and Vitest

Tech Stack

  • Backend: Laravel 10, PHP 8, Pest (testing)
  • Frontend: Vue 3, Inertia.js, Pinia, Tailwind CSS, Vite
  • Database: PostgreSQL
  • Testing: Pest (PHP), Vitest (Vue)
  • Containerization: Docker, Docker Compose

Features

  • CRUD operations for Books and Authors

  • Pagination, filtering, and sorting for listings

  • Many-to-many relationships (books ↔ authors)

  • Dashboard with real-time metrics and charts

  • Dockerized environment for easy setup and deployment

  • Automated tests covering backend and frontend

Requirements

  • Docker
  • Docker Compose
  • npm
  • nvm (optional, for Node.js version control)

Setup Instructions

  1. Clone this repository.

  2. Copy the environment file:

    cp .env.example .env
  3. Build the Docker containers:

    docker-compose build
  4. Create a Docker network (if not already created):

    docker network create library_laravel_app_network
  5. Start the Docker containers:

    docker-compose up -d
  6. Access the application container:

    docker-compose exec web bash
  7. Install PHP dependencies with Composer:

    composer install
  8. Generate the Laravel application key:

    php artisan key:generate
  9. Set proper permissions for storage:

    chmod -R 775 storage/
    chown -R www-data:www-data storage/
  10. Clear config and cache:

    php artisan config:clear
    php artisan cache:clear
  11. Run the database migrations:

    php artisan migrate
  12. Exit the container:

    exit
  13. Install and build the frontend dependencies:

    npm install
    npm run dev
  14. Access Localhost:8000

  15. Register and navigate at will


Running Tests

Backend (PHP - Pest)

  1. Access the application container:

    docker-compose exec web bash
  2. Prepare the testing database:

    php artisan config:clear --env=testing
    php artisan migrate:fresh --seed --env=testing
  3. Exit the container:

    exit
  4. Run backend tests:

    docker-compose run --rm web vendor/bin/pest

Frontend (Vue - Vitest)

  1. Run frontend tests with:

    npx vitest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published