Overview
This guide walks you through setting up ElectroFix AI for local development using XAMPP (or similar LAMP/WAMP stack) with MySQL.Prerequisites
Required Software
- PHP: Version 8.2 or higher
- Composer: Latest stable version
- XAMPP/LAMP/WAMP: For Apache and MySQL
- Node.js: For asset compilation (if needed)
- Git: For version control
System Requirements
- PHP Extensions:
- PDO (MySQL/SQLite)
- Mbstring
- OpenSSL
- JSON
- Tokenizer
- XML
- Ctype
- BCMath
Installation Steps
1. Clone the Repository
2. Install Dependencies
3. Environment Configuration
Copy the example environment file:.env with your local configuration:
4. Generate Application Key
5. Database Setup
Option A: MySQL (XAMPP)
- Start XAMPP and ensure MySQL is running
- Create a database:
- Run migrations:
Option B: SQLite (Simpler)
- Create the database file:
- Ensure
.envhas:
- Run migrations:
6. Seed Demo Data
Populate the database with sample data:- 2 demo companies
- 3 test users (admin, worker, developer)
- Sample customers, equipment, and orders
- Inventory items
- Billing documents
7. Start Development Server
http://localhost:8000
Demo Login Credentials
After seeding, you can log in with:Admin User
- Email:
admin@electrofix.ai - Password:
password123 - Company: ElectroFix Cliente Demo
- Access: Full access to billing and inventory
Worker User
- Email:
worker@electrofix.ai - Password:
password123 - Company: ElectroFix Cliente Demo
- Access: Inventory only (no billing)
Developer User
- Email:
developer@electrofix.ai - Password:
password123 - Company: ElectroFix Developer Lab
- Access: Full access (testing account)
Development Tools
Laravel Tinker
Interactive REPL for testing:Laravel Pail
Real-time log monitoring:Code Quality
Run Laravel Pint for code formatting:Testing
Run the test suite:Debugging Tools
Enable Debug Mode
In.env:
Log Channels
Logs are written tostorage/logs/laravel.log by default.
Available channels:
stack: Multiple channelssingle: Single filedaily: Rotating daily logsstderr: Standard error output
.env:
Email Testing
For local email testing, use log driver:Queue Workers
For background job processing:Common Issues
Permission Errors
Ensure storage and cache directories are writable:Database Connection Failed
Verify:- MySQL is running (check XAMPP control panel)
- Database exists
- Credentials in
.envare correct - Port 3306 is not blocked
Application Key Not Set
Run:Cache Issues
Clear application cache:Quick Setup Script
Use the composer setup script for automated installation:composer install- Creates
.envfrom.env.example - Generates application key
- Runs migrations
Next Steps
- Configuration Guide - Configure environment variables
- Database Migrations - Understand database schema
- Seeders - Learn about demo data
- Production Deployment - Deploy to production