A full-stack system for managing books and authors built with Laravel 10, Vue 3, Inertia.js, Pinia, and Docker.
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
- 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
-
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
- Docker
- Docker Compose
- npm
- nvm (optional, for Node.js version control)
-
Clone this repository.
-
Copy the environment file:
cp .env.example .env
-
Build the Docker containers:
docker-compose build
-
Create a Docker network (if not already created):
docker network create library_laravel_app_network
-
Start the Docker containers:
docker-compose up -d
-
Access the application container:
docker-compose exec web bash -
Install PHP dependencies with Composer:
composer install
-
Generate the Laravel application key:
php artisan key:generate
-
Set proper permissions for storage:
chmod -R 775 storage/ chown -R www-data:www-data storage/
-
Clear config and cache:
php artisan config:clear php artisan cache:clear
-
Run the database migrations:
php artisan migrate
-
Exit the container:
exit -
Install and build the frontend dependencies:
npm install npm run dev
-
Access Localhost:8000
-
Register and navigate at will
-
Access the application container:
docker-compose exec web bash -
Prepare the testing database:
php artisan config:clear --env=testing php artisan migrate:fresh --seed --env=testing
-
Exit the container:
exit -
Run backend tests:
docker-compose run --rm web vendor/bin/pest
-
Run frontend tests with:
npx vitest