Skip to main content

System Requirements

Before installing Sistema de Abogados, ensure your system meets the following requirements:

PHP

Version 8.0.2 or higher

Composer

Latest version for dependency management

MySQL

Version 5.7 or higher / MariaDB 10.3+

Node.js

Version 14.x or higher with npm
Make sure you have PHP extensions enabled: OpenSSL, PDO, Mbstring, Tokenizer, XML, Ctype, JSON, BCMath

Installation Steps

1

Clone the Repository

Clone the Sistema de Abogados repository to your local machine:
git clone https://github.com/your-organization/sistema-abogados.git
cd sistema-abogados
2

Install PHP Dependencies

Install all required PHP dependencies using Composer:
composer install
This will install the following key packages:
  • Laravel Framework 9.19+ - The PHP framework foundation
  • Laravel Sanctum 3.0+ - API authentication
  • Laravel Scout 10.0+ - Full-text search functionality
  • Laravel Tinker 2.7+ - Interactive REPL
  • Spatie Laravel Permission 5.9+ - Role and permission management
  • Guzzle HTTP 7.2+ - HTTP client library
  • Laravel Breeze 1.18+ - Authentication scaffolding
  • Laravel Pint 1.0+ - Code style fixer
  • Pest 1.16+ - Testing framework
  • Faker - Fake data generation
  • Laravel Lang Common 2.0+ - Language translations
3

Install Node.js Dependencies

Install frontend dependencies and compile assets:
npm install
Key frontend packages include:
  • Vite - Modern build tool
  • Alpine.js - Lightweight JavaScript framework
  • Tailwind CSS - Utility-first CSS framework
  • SweetAlert2 - Beautiful alert popups
4

Configure Environment

Copy the example environment file and configure it:
cp .env.example .env
You must configure the .env file before proceeding. See the Configuration page for detailed information.
At minimum, set these variables:
.env
APP_NAME="Sistema de Abogados"
APP_URL=http://localhost:8000

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=sesionv2
DB_USERNAME=root
DB_PASSWORD=your_password
5

Generate Application Key

Generate a unique application encryption key:
php artisan key:generate
This command sets the APP_KEY value in your .env file, which is used for encrypting user sessions and other encrypted data.
6

Create Database

Create the MySQL database for the application:
mysql -u root -p
CREATE DATABASE sesionv2 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
EXIT;
Make sure the database name matches the DB_DATABASE value in your .env file.
7

Run Database Migrations

Execute migrations to create all required database tables:
php artisan migrate
This will create tables for:
  • Users and authentication (users, password_resets, personal_access_tokens)
  • Roles and permissions (roles, permissions, model_has_roles, etc.)
  • Application entities (clientes, expedientes, actividades, etc.)
  • Additional features (conciliadores, documentos, and more)
If you need to reset the database and start fresh, use:
php artisan migrate:fresh
This will delete all existing data!
8

Seed the Database

Populate the database with initial roles and an admin user:
php artisan db:seed
This will create:Default Roles:
  • admin - Full system access
  • asistente - Assistant role
  • abogado - Lawyer role
Default Admin User:
Change the default admin password immediately after first login!
To run migrations and seeders in one command:
php artisan migrate:fresh --seed
9

Build Frontend Assets

Compile the frontend assets for production or development:
npm run dev
The development server will watch for changes and hot-reload automatically.
10

Configure Storage Permissions

Set proper permissions for storage and cache directories:
chmod -R 775 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache
Using 777 permissions is only acceptable in development environments. Use proper user/group permissions in production.
11

Start the Application

Start the Laravel development server:
php artisan serve
The application will be available at http://localhost:8000
php artisan serve --port=8080

Post-Installation Steps

Configure Spatie Permissions

The application uses Spatie Laravel Permission for role-based access control. After installation:
  1. The permission tables are automatically created via migrations
  2. Default roles are seeded (admin, asistente, abogado)
  3. Configure cache settings in config/permission.php if needed
php artisan permission:cache-reset

Set Up Laravel Scout (Optional)

If you plan to use search functionality:
# Publish Scout configuration
php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"

# Index your models
php artisan scout:import "App\Models\Cliente"
php artisan scout:import "App\Models\Expediente"
See the Configuration page for Scout driver options.

Configure Queue Workers (Optional)

For background job processing:
# Run queue worker
php artisan queue:work

# With specific connection
php artisan queue:work redis --queue=default

Verification

Verify your installation by checking:
php artisan about
This displays your application environment, configuration, and Laravel version.

Troubleshooting

Solution: Ensure you have PHP 8.0.2+ and all required extensions:
php -v
php -m | grep -E 'pdo|mbstring|xml|openssl'
Solution: Check database credentials in .env and ensure MySQL is running:
php artisan config:clear
php artisan migrate:status
Solution: Fix storage permissions:
sudo chown -R $USER:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache
Solution: Clear npm cache and try again:
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
Solution: Rebuild assets and clear cache:
npm run build
php artisan config:clear
php artisan cache:clear
php artisan view:clear

Next Steps

Now that you have installed Sistema de Abogados, proceed to:

Configuration

Configure environment variables and services

Creating Cases

Learn how to create and manage legal cases

Managing Expedientes

Guide to conciliation process management

Build docs developers (and LLMs) love