Skip to main content

Overview

This guide will help you set up ElectroFix AI locally and get your first multi-tenant repair shop management system running quickly.
ElectroFix AI is a Laravel 12-based SaaS platform for electronics repair shop management with multi-tenancy, AI diagnostics, inventory tracking, and billing capabilities.

Prerequisites

Before you begin, ensure you have:
  • PHP 8.2 or higher with required extensions (PDO, mbstring, OpenSSL, JSON, cURL)
  • Composer (PHP dependency manager)
  • MySQL 5.7+ or MariaDB 10.3+ (or SQLite for quick testing)
  • Git for cloning the repository

Quick Setup

1

Clone the Repository

Clone the ElectroFix AI repository to your local machine:
git clone <your-repository-url>
cd ElectroFix-AI
2

Install PHP Dependencies

Install all required PHP packages using Composer:
composer install
This will install:
  • Laravel 12 framework
  • Laravel Tinker
  • DomPDF for invoice generation
  • All development dependencies
3

Configure Environment

Create your environment configuration file:
cp .env.example .env
php artisan key:generate
For the fastest setup, use SQLite (default configuration):
.env
DB_CONNECTION=sqlite
Create the database file:
touch database/database.sqlite
For production-like setup with MySQL:
  1. Create a MySQL database:
CREATE DATABASE electrofix_ai CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  1. Update your .env file:
.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=electrofix_ai
DB_USERNAME=root
DB_PASSWORD=your_password
4

Run Migrations and Seeders

Set up the database schema and populate it with demo data:
php artisan migrate:fresh --seed
This command will:
  • Create all database tables (companies, users, orders, inventory, billing, etc.)
  • Seed two demo companies:
    • ElectroFix Cliente Demo (regular company)
    • ElectroFix Developer Lab (developer test company)
  • Create three demo users with different roles
  • Generate sample operational data (customers, equipments, orders)
  • Create inventory items and billing documents
The --seed flag is important! It creates demo users and companies that you’ll need to log in.
5

Start the Development Server

Launch the Laravel development server:
php artisan serve
You should see output similar to:
INFO  Server running on [http://127.0.0.1:8000].

Press Ctrl+C to stop the server
6

Access the Application

Open your browser and navigate to:
http://127.0.0.1:8000
You’ll see the ElectroFix AI landing page with a login option.

Demo Credentials

The seeder creates three demo users with different permission levels:
Email: developer@electrofix.ai
Password: password123
Role: Developer (global access)
Company: ElectroFix Developer Lab
All demo accounts use the password password123. Change these in production!

What You’ll See

After Login

Depending on the role you log in with, you’ll be redirected to different dashboards: Developer Dashboard (developer@electrofix.ai)
  • Global system overview
  • All companies management
  • Subscription insights
  • System-wide AI usage tracking
Admin Dashboard (admin@electrofix.ai)
  • Company profile management
  • Worker/user management
  • Subscription plan details
  • Company-wide statistics
Worker Dashboard (worker@electrofix.ai)
  • Assigned repair orders
  • Customer management
  • Equipment tracking
  • Inventory access (if permitted)
  • Billing/POS access (if permitted)

Key Features to Explore

Repair Orders

Create and track repair orders with:
  • Customer and equipment linking
  • Status tracking (Pending → In Progress → Completed/Cancelled)
  • AI-powered diagnostics (for Enterprise plans)
  • Technician assignment

Inventory Management

Manage repair parts and products:
  • Stock tracking with movement history
  • Low stock alerts
  • Product categories
  • Cost and sale price management

Billing & POS

Generate invoices and receipts:
  • Sale, Service, and Mixed document types
  • PDF generation with company branding
  • VAT/IVA calculation
  • Link to repair orders

Multi-Tenancy

Complete tenant isolation:
  • Company-specific data
  • Subscription-based feature access
  • Role-based permissions
  • AI usage limits per company

Testing AI Diagnostics

The AI diagnostic feature is available for Enterprise and Developer Test plans:
1

Log in as Admin or Developer

Worker accounts don’t have AI access by default.
2

Create a New Repair Order

Navigate to Worker DashboardOrdersNew Order
3

Enable AI Diagnosis

  • Select a customer and equipment
  • Enter symptoms (max 600 characters)
  • Check the “Request AI Diagnosis” checkbox
  • Submit the order
4

View AI Results

The AI will provide:
  • Probable diagnosis
  • Suggested repair steps
  • Estimated cost (parts + labor)
  • Replacement vs. repair recommendation
AI diagnostics use a local stub implementation. In production, this connects to your AI provider (OpenAI, Anthropic, etc.).

Next Steps

Installation Guide

Detailed setup for XAMPP, production environments, and troubleshooting

API Reference

Complete API documentation for integrations

User Roles

Understanding permissions and access control

Multi-Tenancy

How company isolation and data separation works

Common Issues

Solution: Clear Laravel caches and regenerate the application key:
php artisan optimize:clear
php artisan key:generate
php artisan config:cache
For SQLite:
  • Ensure database/database.sqlite exists
  • Check file permissions (must be writable)
For MySQL:
  • Verify MySQL service is running
  • Confirm database exists and credentials are correct
  • Test connection: mysql -u root -p
Solution: Ensure PHP version is 8.2 or higher:
php -v
Update PHP or install missing extensions:
# Ubuntu/Debian
sudo apt-get install php8.2-mysql php8.2-mbstring php8.2-xml php8.2-curl
Solution: Drop all tables and re-run migrations:
php artisan migrate:fresh --seed
This will delete ALL data in your database!

Development Workflow

For ongoing development:
# Clear all caches
php artisan optimize:clear

# Run tests
php artisan test

# Check routes
php artisan route:list

# Start development server
php artisan serve
The application uses Laravel 12 with Blade templates, Bootstrap 5, and vanilla JavaScript. No frontend build step required!

Build docs developers (and LLMs) love