Skip to main content

System Requirements

Before installing ElectroFix AI, ensure your system meets these requirements:

Minimum Requirements

PHP

Version: 8.2 or higher
Required Extensions:
  • PDO (PHP Data Objects)
  • pdo_mysql or pdo_sqlite
  • mbstring
  • OpenSSL
  • JSON
  • cURL
  • XML
  • Tokenizer
  • Fileinfo

Database

Supported Databases:
  • MySQL 5.7+ or 8.0+
  • MariaDB 10.3+
  • SQLite 3.8.8+ (development only)
Recommended: MySQL 8.0+

Web Server

Development:
  • Built-in PHP server (via php artisan serve)
  • XAMPP/WAMP/MAMP
Production:
  • Apache 2.4+ with mod_rewrite
  • Nginx 1.18+

Additional Tools

  • Composer 2.0+
  • Git (for version control)
  • Node.js 18+ (optional, for asset compilation)
ElectroFix AI uses Laravel 12 which requires PHP 8.2+. Older PHP versions are not supported.

Installation Methods

XAMPP Installation (Windows/macOS/Linux)

This is the recommended method for local development on Windows.
1

Install XAMPP

  1. Download XAMPP from apachefriends.org
  2. Install with PHP 8.2+ support
  3. Start Apache and MySQL services from XAMPP Control Panel
Ensure you select PHP 8.2 or higher during installation. XAMPP 8.2.12 or newer is recommended.
2

Verify PHP Installation

Open a terminal/command prompt and check PHP version:
php -v
Expected output:
PHP 8.2.x (cli) (built: ...)
Verify required extensions:
php -m | grep -E "pdo|mysql|mbstring|openssl|json|curl"
3

Install Composer

  1. Download Composer from getcomposer.org
  2. Run the installer
  3. Verify installation:
composer --version
4

Create MySQL Database

  1. Open phpMyAdmin (http://localhost/phpmyadmin)
  2. Click “New” to create a database
  3. Enter database name: electrofix_ai
  4. Select collation: utf8mb4_unicode_ci
  5. Click “Create”
Alternatively, use MySQL CLI:
CREATE DATABASE electrofix_ai CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
5

Clone and Configure

Navigate to your XAMPP htdocs directory:
# Windows
cd C:\xampp\htdocs

# macOS/Linux
cd /Applications/XAMPP/htdocs
Clone the repository:
git clone <your-repo-url> ElectroFix-AI
cd ElectroFix-AI
Install dependencies:
composer install
6

Environment Configuration

Create and configure your .env file:
cp .env.example .env
Edit .env with your database settings:
.env
APP_NAME="ElectroFix AI"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost/ElectroFix-AI/public

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=electrofix_ai
DB_USERNAME=root
DB_PASSWORD=

SESSION_DRIVER=database
QUEUE_CONNECTION=database
CACHE_STORE=database
The default XAMPP MySQL root password is empty. If you’ve set a password, update DB_PASSWORD.
Generate application key:
php artisan key:generate
7

Run Migrations and Seeders

Set up the database schema and demo data:
php artisan migrate:fresh --seed
Expected output:
Dropped all tables successfully.
Migration table created successfully.
Migrating: 0001_01_01_000000_create_users_table
Migrated:  0001_01_01_000000_create_users_table (45.23ms)
...
Seeding: Database\Seeders\CompanySeeder
Seeded:  Database\Seeders\CompanySeeder (123.45ms)
...
Database seeding completed successfully.
8

Access the Application

Option 1: PHP Built-in Server
php artisan serve
Access at: http://127.0.0.1:8000Option 2: XAMPP Apache Access at: http://localhost/ElectroFix-AI/public
For XAMPP Apache, ensure mod_rewrite is enabled and .htaccess files are allowed.

Database Configuration Options

SQLite (Quick Testing)

For rapid local development without MySQL:
.env
DB_CONNECTION=sqlite
# Comment out or remove MySQL settings
Create the database file:
touch database/database.sqlite
php artisan migrate:fresh --seed
SQLite is perfect for quick testing but not recommended for production or multi-user scenarios.

MySQL Configuration

Recommended for production-like development:
.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=electrofix_ai
DB_USERNAME=root
DB_PASSWORD=your_password

MariaDB Configuration

Drop-in replacement for MySQL:
.env
DB_CONNECTION=mariadb
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=electrofix_ai
DB_USERNAME=root
DB_PASSWORD=your_password

Post-Installation Steps

1. Verify Installation

Check that all migrations ran successfully:
php artisan migrate:status
Expected output should show all migrations as “Ran”.

2. Test Login

Access the application and log in with demo credentials:
  • Email: admin@electrofix.ai
  • Password: password123
You should see the admin dashboard with company information.

3. Configure Application Settings

Update .env with your specific settings:
.env
# Application
APP_NAME="Your Company Name"
APP_URL=http://your-domain.com

# Mail (for notifications)
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your_username
MAIL_PASSWORD=your_password
MAIL_FROM_ADDRESS="noreply@yourcompany.com"
MAIL_FROM_NAME="${APP_NAME}"

# Logging
LOG_CHANNEL=stack
LOG_LEVEL=info

4. Cache Configuration

For better performance:
php artisan config:cache
php artisan route:cache
php artisan view:cache
Run php artisan optimize:clear whenever you modify .env or configuration files.

Seeded Demo Data

The --seed flag populates your database with:

Companies

  1. ElectroFix Cliente Demo
  2. ElectroFix Developer Lab
    • Owner: ElectroFix Platform Team
    • Email: dev-owner@electrofix.ai
    • Plan: Developer Test (999 users, active)
    • VAT: 16%
    • Currency: MXN

Users

RoleEmailPasswordCompanyPermissions
Developerdeveloper@electrofix.aipassword123Developer LabGlobal access, all features
Adminadmin@electrofix.aipassword123Cliente DemoBilling, Inventory, Management
Workerworker@electrofix.aipassword123Cliente DemoInventory only

Sample Data

  • Customers: 10-15 demo customers with contact information
  • Equipment: Various electronic devices linked to customers
  • Orders: Sample repair orders in different states
  • Inventory: 20-30 parts and products with stock levels
  • Billing Documents: Sample invoices and receipts

Troubleshooting

Cause: Missing PHP database extension.Solution:For MySQL:
# Ubuntu/Debian
sudo apt install php8.2-mysql
sudo systemctl restart apache2

# Enable in php.ini
extension=pdo_mysql
For SQLite:
# Ubuntu/Debian
sudo apt install php8.2-sqlite3

# Enable in php.ini
extension=pdo_sqlite
Cause: Missing PHP XML extension (required for PDF generation).Solution:
# Ubuntu/Debian
sudo apt install php8.2-xml

# macOS
brew reinstall php@8.2
Cause: Insufficient permissions on storage directories.Solution:
# Linux/macOS
sudo chmod -R 775 storage bootstrap/cache
sudo chown -R $USER:www-data storage bootstrap/cache

# Development (less secure but works)
chmod -R 777 storage bootstrap/cache
Windows:
  • Right-click storage and bootstrap/cache folders
  • Properties → Security → Edit
  • Give “Full Control” to your user account
Cause: Missing APP_KEY in .env.Solution:
php artisan key:generate
Verify .env now contains:
APP_KEY=base64:... (long random string)
Cause: MySQL server not running or wrong connection settings.Solution:
  1. Check MySQL is running:
# Linux
sudo systemctl status mysql
sudo systemctl start mysql

# macOS
brew services list
brew services start mysql

# XAMPP
# Use XAMPP Control Panel to start MySQL
  1. Verify credentials:
mysql -u root -p
  1. Check .env settings match your MySQL configuration.
Cause: Old MySQL version or wrong charset.Solution:Check MySQL version:
mysql --version
If using MySQL 5.5-5.7, edit app/Providers/AppServiceProvider.php:
use Illuminate\Support\Facades\Schema;

public function boot()
{
    Schema::defaultStringLength(191);
}
Then re-run migrations:
php artisan migrate:fresh --seed
Cause: PHP memory limit too low.Solution:
# Temporary increase
php -d memory_limit=-1 /usr/local/bin/composer install

# Or edit php.ini
memory_limit = 512M
Cause: Various potential issues.Solution:
  1. Clear all caches:
php artisan optimize:clear
  1. Check storage permissions:
chmod -R 775 storage bootstrap/cache
  1. Enable debug mode in .env:
APP_DEBUG=true
  1. Check logs:
tail -f storage/logs/laravel.log

Production Deployment

Production deployment requires additional security and optimization steps beyond this guide.

Pre-Deployment Checklist

  • Set APP_ENV=production in .env
  • Set APP_DEBUG=false in .env
  • Use strong, unique APP_KEY
  • Configure proper APP_URL
  • Set up MySQL/PostgreSQL (not SQLite)
  • Configure mail settings (SMTP)
  • Set up HTTPS/SSL certificates
  • Configure file permissions (755 for directories, 644 for files)
  • Enable caching:
    php artisan config:cache
    php artisan route:cache
    php artisan view:cache
    
  • Set up queue workers for background jobs
  • Configure backup strategy
  • Set up monitoring and logging
  • Web Server: Nginx with PHP-FPM
  • Database: MySQL 8.0+ or MariaDB 10.5+
  • PHP: 8.2+ with OPcache enabled
  • Process Manager: Supervisor (for queue workers)
  • Cache: Redis or Memcached
  • CDN: For static assets

Useful Commands Reference

# Development
php artisan serve              # Start dev server
php artisan optimize:clear     # Clear all caches
php artisan migrate:fresh      # Reset database
php artisan db:seed            # Run seeders only

# Database
php artisan migrate            # Run pending migrations
php artisan migrate:status     # Check migration status
php artisan migrate:rollback   # Rollback last batch

# Cache
php artisan config:cache       # Cache configuration
php artisan route:cache        # Cache routes
php artisan view:cache         # Cache views
php artisan cache:clear        # Clear application cache

# Testing
php artisan test               # Run tests
php artisan test --parallel    # Run tests in parallel

# Debugging
php artisan route:list         # List all routes
php artisan tinker             # Interactive console
tail -f storage/logs/laravel.log  # Watch logs

Next Steps

Quickstart Guide

Get up and running quickly with step-by-step instructions

Configuration

Customize ElectroFix AI for your business needs

API Documentation

Integrate with external systems and build custom features

Worker Management

Learn how to manage users, roles, and permissions

Getting Help

If you encounter issues not covered in this guide:
  1. Check the Laravel 12 documentation
  2. Review application logs in storage/logs/laravel.log
  3. Enable debug mode and check browser console for errors
  4. Consult the project README for additional troubleshooting steps
Remember to disable debug mode (APP_DEBUG=false) in production environments!

Build docs developers (and LLMs) love