A modern web application built with Laravel 12, Inertia.js, React, and ShadcnUI, containerized with Docker.
This project leverages several powerful technologies:
- Laravel 12 - PHP web application framework
- Inertia.js - Modern monolithic architecture connecting Laravel to React
- React - JavaScript library for building user interfaces
- ShadcnUI - A collection of reusable UI components
- FrankenPHP - Modern PHP application server
- Docker - Containerization platform
- SQLite - Embedded database
- Docker and Docker Compose
- Git
-
Clone the repository:
git clone <repository-url> cd <repository-name>
-
Start the development environment:
docker-compose up -d
-
Install PHP dependencies:
docker-compose run --rm composer install
-
Install JavaScript dependencies:
docker-compose run --rm npm install
-
Build frontend assets:
docker-compose run --rm npm run dev
-
Generate application key:
docker-compose exec app php artisan key:generate
-
Run database migrations:
docker-compose exec app php artisan migrate
The application should now be accessible at https://localhost
(you may need to accept the self-signed certificate).
For live frontend development:
docker-compose run --rm npm run dev
To deploy to production:
-
Ensure your environment variables are properly set for production.
-
Build and start the production containers:
docker-compose -f docker-compose.prod.yml up -d
-
Run database migrations:
docker-compose -f docker-compose.prod.yml exec app php artisan migrate --force
The production environment uses optimized Docker images with precompiled assets.
- ESLint - JavaScript linting
- Prettier - Code formatter
- TypeScript - Static type checking
Run the frontend linting:
docker-compose run --rm npm run lint
Format frontend code:
docker-compose run --rm npm run format
- Laravel Pint - PHP code style fixer
- PHPStan/Larastan - Static analysis tool
- Rector - PHP code quality tool and automatic refactoring
Run the backend code style fixes:
docker-compose run --rm composer pint
Run static analysis:
docker-compose run --rm composer analyse
The project follows the standard Laravel directory structure with additional organization for React components:
app/
- Laravel PHP coderesources/js/
- React components and frontend coderesources/css/
- CSS and stylingpublic/
- Static assets and compiled frontend coderoutes/
- Application routesdatabase/
- Database migrations and seeders