Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/alber1802/AvaluoVehicular/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through setting up Avalúo Vehicular on your local machine without Docker. You will configure a full Laravel 12 + React 19 development environment — including the PHP backend, Vite-powered frontend, SQLite database, and queue worker — all running concurrently via a single composer dev command. This approach is best for active feature development, where you want fast hot-module replacement and direct access to logs and the file system.

Prerequisites

Before you begin, make sure the following tools are installed and available on your PATH:
  • PHP 8.2 or higher — required by composer.json ("php": "^8.2")
  • Composer — PHP dependency manager
  • Node.js 20 or higher — required to run Vite 7 and build React assets
  • SQLite — the default database driver (DB_CONNECTION=sqlite)

Installation

1

Clone the Repository

Download the source code from GitHub:
git clone https://github.com/alber1802/AvaluoVehicular.git
cd AvaluoVehicular
2

Install PHP Dependencies

Install all Laravel backend packages defined in composer.json, including Laravel 12, Fortify, Inertia.js, Spatie Permissions, and PDF generation libraries:
composer install
3

Install Node.js Dependencies

Install frontend packages defined in package.json, including React 19, TypeScript, TailwindCSS 4, Radix UI components, Vite 7, and ESLint/Prettier tooling:
npm install
4

Copy Environment File

Create your local environment configuration from the provided example:
cp .env.example .env
Open .env and review the defaults. The most relevant settings for local development are:
APP_NAME="Sistema de Avalúo Vehicular"
APP_URL=http://localhost:8000
APP_LOCALE=es
DB_CONNECTION=sqlite
5

Generate Application Key

Generate a unique APP_KEY used by Laravel to encrypt cookies, sessions, and other sensitive data:
php artisan key:generate
6

Create the SQLite Database

Laravel’s SQLite driver requires the database file to exist before running migrations:
touch database/database.sqlite
7

Run Database Migrations

Apply all migrations to create the application schema — vehicle records, appraisal evaluations, user management, roles, and permissions:
php artisan migrate
8

Start the Development Servers

Launch all development processes in a single terminal using the composer dev script. This runs three concurrent processes managed by concurrently:
  • php artisan serve — PHP development server on http://localhost:8000
  • php artisan queue:listen --tries=1 — Queue worker for background jobs
  • npm run dev — Vite dev server with hot-module replacement
composer dev
The application will be available at http://localhost:8000 once all three processes have started.

Development Commands

Use these commands during day-to-day development:
CommandDescription
composer devStart PHP server, queue worker, and Vite concurrently
npm run devStart only the Vite frontend dev server
npm run buildBuild frontend assets for production
npm run lintRun ESLint with auto-fix (eslint . --fix)
npm run formatFormat all files in resources/ with Prettier
npm run typesRun TypeScript type-checking without emitting files
php artisan testRun the PHPUnit test suite (clears config cache first)

Cache Management

Clear All Caches

When switching branches, pulling changes, or debugging unexpected behavior, clear all framework caches at once:
php artisan optimize:clear

Rebuild Caches for Production-like Testing

After clearing, you can pre-compile configuration and routing for faster response times:
php artisan config:cache
php artisan route:cache
php artisan view:cache
Do not commit cached files to version control. Running php artisan optimize:clear before switching branches is a good habit to avoid stale cache conflicts.

Fix Storage Permissions

On Linux and Mac, Laravel requires write access to the storage and bootstrap/cache directories. If you see Permission denied errors, reset the permissions:
chmod -R 775 storage bootstrap/cache
If you are running a web server (e.g. Apache or Nginx) instead of php artisan serve, the web server user (commonly www-data) also needs write access:
chown -R $USER:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache

Build docs developers (and LLMs) love